[Pkg-ofed-commits] [dapl] 01/03: Imported Upstream version 2.0.19

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Wed Jul 2 14:44:53 UTC 2014


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

ana pushed a commit to branch master
in repository dapl.

commit cd1b0d796a31a109f1150bb9adc4fa0574039429
Author: Ana Guerrero López <ana at ekaia.org>
Date:   Wed Jul 2 16:44:41 2014 +0200

    Imported Upstream version 2.0.19
---
 AUTHORS                                          |    17 +
 COPYING                                          |    36 +
 ChangeLog                                        |  3039 +++++
 Makefile.am                                      |   435 +
 Makefile.in                                      |  3509 +++++
 NEWS                                             |     0
 README                                           |   434 +
 aclocal.m4                                       |  8854 +++++++++++++
 config.h.in                                      |    62 +
 config/compile                                   |   142 +
 config/config.guess                              |  1411 ++
 config/config.sub                                |  1500 +++
 config/depcomp                                   |   530 +
 config/install-sh                                |   323 +
 config/ltmain.sh                                 |  8413 ++++++++++++
 config/missing                                   |   360 +
 configure                                        | 14602 +++++++++++++++++++++
 configure.in                                     |   101 +
 dapl.spec                                        |   183 +
 dapl.spec.in                                     |   197 +
 dapl/common/dapl_adapter_util.h                  |   302 +
 dapl/common/dapl_cno_util.c                      |   313 +
 dapl/common/dapl_cno_util.h                      |    66 +
 dapl/common/dapl_cookie.c                        |   360 +
 dapl/common/dapl_cookie.h                        |    76 +
 dapl/common/dapl_cr_accept.c                     |   247 +
 dapl/common/dapl_cr_callback.c                   |   549 +
 dapl/common/dapl_cr_handoff.c                    |    65 +
 dapl/common/dapl_cr_query.c                      |    98 +
 dapl/common/dapl_cr_reject.c                     |   137 +
 dapl/common/dapl_cr_util.c                       |   103 +
 dapl/common/dapl_cr_util.h                       |    58 +
 dapl/common/dapl_csp.c                           |   102 +
 dapl/common/dapl_debug.c                         |   238 +
 dapl/common/dapl_ep_connect.c                    |   416 +
 dapl/common/dapl_ep_create.c                     |   335 +
 dapl/common/dapl_ep_create_with_srq.c            |   355 +
 dapl/common/dapl_ep_disconnect.c                 |   183 +
 dapl/common/dapl_ep_dup_connect.c                |   127 +
 dapl/common/dapl_ep_free.c                       |   204 +
 dapl/common/dapl_ep_get_status.c                 |   113 +
 dapl/common/dapl_ep_modify.c                     |   642 +
 dapl/common/dapl_ep_post_rdma_read.c             |   100 +
 dapl/common/dapl_ep_post_rdma_read_to_rmr.c      |    90 +
 dapl/common/dapl_ep_post_rdma_write.c            |    99 +
 dapl/common/dapl_ep_post_recv.c                  |   120 +
 dapl/common/dapl_ep_post_send.c                  |    97 +
 dapl/common/dapl_ep_post_send_invalidate.c       |    92 +
 dapl/common/dapl_ep_query.c                      |   122 +
 dapl/common/dapl_ep_recv_query.c                 |    98 +
 dapl/common/dapl_ep_reset.c                      |   105 +
 dapl/common/dapl_ep_set_watermark.c              |    99 +
 dapl/common/dapl_ep_util.c                       |   585 +
 dapl/common/dapl_ep_util.h                       |    87 +
 dapl/common/dapl_evd_connection_callb.c          |   244 +
 dapl/common/dapl_evd_cq_async_error_callb.c      |    90 +
 dapl/common/dapl_evd_dequeue.c                   |   134 +
 dapl/common/dapl_evd_dto_callb.c                 |   164 +
 dapl/common/dapl_evd_free.c                      |   136 +
 dapl/common/dapl_evd_post_se.c                   |    97 +
 dapl/common/dapl_evd_qp_async_error_callb.c      |   155 +
 dapl/common/dapl_evd_resize.c                    |   136 +
 dapl/common/dapl_evd_un_async_error_callb.c      |    92 +
 dapl/common/dapl_evd_util.c                      |  1535 +++
 dapl/common/dapl_evd_util.h                      |   174 +
 dapl/common/dapl_get_consumer_context.c          |    98 +
 dapl/common/dapl_get_handle_type.c               |    87 +
 dapl/common/dapl_hash.c                          |   478 +
 dapl/common/dapl_hash.h                          |   109 +
 dapl/common/dapl_hca_util.c                      |   176 +
 dapl/common/dapl_hca_util.h                      |    60 +
 dapl/common/dapl_ia_close.c                      |    87 +
 dapl/common/dapl_ia_ha.c                         |    77 +
 dapl/common/dapl_ia_open.c                       |   462 +
 dapl/common/dapl_ia_query.c                      |   233 +
 dapl/common/dapl_ia_util.c                       |  1140 ++
 dapl/common/dapl_ia_util.h                       |   158 +
 dapl/common/dapl_init.h                          |    57 +
 dapl/common/dapl_llist.c                         |   343 +
 dapl/common/dapl_lmr_free.c                      |   135 +
 dapl/common/dapl_lmr_query.c                     |    86 +
 dapl/common/dapl_lmr_sync_rdma_read.c            |    83 +
 dapl/common/dapl_lmr_sync_rdma_write.c           |    83 +
 dapl/common/dapl_lmr_util.c                      |    93 +
 dapl/common/dapl_lmr_util.h                      |    63 +
 dapl/common/dapl_mr_util.c                       |   113 +
 dapl/common/dapl_mr_util.h                       |    96 +
 dapl/common/dapl_name_service.c                  |   264 +
 dapl/common/dapl_name_service.h                  |    61 +
 dapl/common/dapl_provider.c                      |   453 +
 dapl/common/dapl_provider.h                      |   108 +
 dapl/common/dapl_psp_create.c                    |   205 +
 dapl/common/dapl_psp_create_any.c                |   215 +
 dapl/common/dapl_psp_free.c                      |   152 +
 dapl/common/dapl_psp_query.c                     |   102 +
 dapl/common/dapl_pz_create.c                     |   100 +
 dapl/common/dapl_pz_free.c                       |    88 +
 dapl/common/dapl_pz_query.c                      |    86 +
 dapl/common/dapl_pz_util.c                       |   111 +
 dapl/common/dapl_pz_util.h                       |    51 +
 dapl/common/dapl_ring_buffer_util.c              |   317 +
 dapl/common/dapl_ring_buffer_util.h              |    78 +
 dapl/common/dapl_rmr_bind.c                      |   319 +
 dapl/common/dapl_rmr_create.c                    |   140 +
 dapl/common/dapl_rmr_free.c                      |    95 +
 dapl/common/dapl_rmr_query.c                     |    93 +
 dapl/common/dapl_rmr_util.c                      |    84 +
 dapl/common/dapl_rmr_util.h                      |    86 +
 dapl/common/dapl_rsp_create.c                    |   213 +
 dapl/common/dapl_rsp_free.c                      |   154 +
 dapl/common/dapl_rsp_query.c                     |   100 +
 dapl/common/dapl_set_consumer_context.c          |    86 +
 dapl/common/dapl_sp_util.c                       |   280 +
 dapl/common/dapl_sp_util.h                       |    63 +
 dapl/common/dapl_srq_create.c                    |   151 +
 dapl/common/dapl_srq_free.c                      |   133 +
 dapl/common/dapl_srq_post_recv.c                 |   123 +
 dapl/common/dapl_srq_query.c                     |    97 +
 dapl/common/dapl_srq_resize.c                    |   109 +
 dapl/common/dapl_srq_set_lw.c                    |    99 +
 dapl/common/dapl_srq_util.c                      |   138 +
 dapl/common/dapl_srq_util.h                      |    54 +
 dapl/common/dapl_timer_util.c                    |   319 +
 dapl/common/dapl_timer_util.h                    |    47 +
 dapl/include/dapl.h                              |  1275 ++
 dapl/include/dapl_debug.h                        |   112 +
 dapl/include/dapl_ipoib_names.h                  |   262 +
 dapl/include/dapl_vendor.h                       |   116 +
 dapl/openib_cma/dapl_ib_cm.c                     |  1297 ++
 dapl/openib_cma/dapl_ib_cq.c                     |   559 +
 dapl/openib_cma/dapl_ib_dto.h                    |   472 +
 dapl/openib_cma/dapl_ib_extensions.c             |   329 +
 dapl/openib_cma/dapl_ib_mem.c                    |   380 +
 dapl/openib_cma/dapl_ib_qp.c                     |   331 +
 dapl/openib_cma/dapl_ib_util.c                   |  1094 ++
 dapl/openib_cma/dapl_ib_util.h                   |   323 +
 dapl/openib_cma/linux/openib_osd.h               |    15 +
 dapl/openib_scm/dapl_ib_cm.c                     |  1681 +++
 dapl/openib_scm/dapl_ib_cq.c                     |   705 +
 dapl/openib_scm/dapl_ib_dto.h                    |   527 +
 dapl/openib_scm/dapl_ib_extensions.c             |   371 +
 dapl/openib_scm/dapl_ib_mem.c                    |   382 +
 dapl/openib_scm/dapl_ib_qp.c                     |   471 +
 dapl/openib_scm/dapl_ib_util.c                   |   725 +
 dapl/openib_scm/dapl_ib_util.h                   |   381 +
 dapl/openib_scm/linux/openib_osd.h               |    21 +
 dapl/udapl/dapl_cno_create.c                     |   101 +
 dapl/udapl/dapl_cno_free.c                       |    87 +
 dapl/udapl/dapl_cno_modify_agent.c               |    80 +
 dapl/udapl/dapl_cno_query.c                      |    92 +
 dapl/udapl/dapl_cno_wait.c                       |   123 +
 dapl/udapl/dapl_evd_clear_unwaitable.c           |    79 +
 dapl/udapl/dapl_evd_create.c                     |   184 +
 dapl/udapl/dapl_evd_disable.c                    |    78 +
 dapl/udapl/dapl_evd_enable.c                     |    91 +
 dapl/udapl/dapl_evd_modify_cno.c                 |   110 +
 dapl/udapl/dapl_evd_query.c                      |   112 +
 dapl/udapl/dapl_evd_set_unwaitable.c             |   101 +
 dapl/udapl/dapl_evd_wait.c                       |   277 +
 dapl/udapl/dapl_init.c                           |   306 +
 dapl/udapl/dapl_lmr_create.c                     |   506 +
 dapl/udapl/libdaplofa.map                        |     7 +
 dapl/udapl/libdaploscm.map                       |     7 +
 dapl/udapl/linux/dapl_osd.c                      |   599 +
 dapl/udapl/linux/dapl_osd.h                      |   586 +
 dat/common/dat_api.c                             |  1077 ++
 dat/common/dat_dictionary.c                      |   420 +
 dat/common/dat_dictionary.h                      |   112 +
 dat/common/dat_dr.c                              |   327 +
 dat/common/dat_dr.h                              |   103 +
 dat/common/dat_init.c                            |   152 +
 dat/common/dat_init.h                            |   106 +
 dat/common/dat_sr.c                              |   447 +
 dat/common/dat_sr.h                              |   104 +
 dat/common/dat_strerror.c                        |   611 +
 dat/include/dat2/dat.h                           |  1379 ++
 dat/include/dat2/dat_error.h                     |   380 +
 dat/include/dat2/dat_ib_extensions.h             |   503 +
 dat/include/dat2/dat_platform_specific.h         |   271 +
 dat/include/dat2/dat_redirection.h               |   858 ++
 dat/include/dat2/dat_registry.h                  |   132 +
 dat/include/dat2/dat_vendor_specific.h           |    81 +
 dat/include/dat2/udat.h                          |   503 +
 dat/include/dat2/udat_config.h                   |    89 +
 dat/include/dat2/udat_redirection.h              |   356 +
 dat/include/dat2/udat_vendor_specific.h          |    83 +
 dat/udat/libdat2.map                             |    78 +
 dat/udat/linux/dat_osd.c                         |   183 +
 dat/udat/linux/dat_osd.h                         |   415 +
 dat/udat/udat.c                                  |   409 +
 dat/udat/udat_api.c                              |   260 +
 dat/udat/udat_sr_parser.c                        |  1216 ++
 dat/udat/udat_sr_parser.h                        |    63 +
 man/dapltest.1                                   |   390 +
 man/dat.conf.5                                   |    62 +
 man/dtest.1                                      |    78 +
 test/dapltest/Makefile.am                        |    67 +
 test/dapltest/Makefile.in                        |  1264 ++
 test/dapltest/NEWS                               |     0
 test/dapltest/README                             |   293 +
 test/dapltest/cmd/dapl_fft_cmd.c                 |   325 +
 test/dapltest/cmd/dapl_getopt.c                  |   153 +
 test/dapltest/cmd/dapl_limit_cmd.c               |   222 +
 test/dapltest/cmd/dapl_main.c                    |   143 +
 test/dapltest/cmd/dapl_netaddr.c                 |   137 +
 test/dapltest/cmd/dapl_params.c                  |   281 +
 test/dapltest/cmd/dapl_performance_cmd.c         |   297 +
 test/dapltest/cmd/dapl_qos_util.c                |    59 +
 test/dapltest/cmd/dapl_quit_cmd.c                |   132 +
 test/dapltest/cmd/dapl_server_cmd.c              |   114 +
 test/dapltest/cmd/dapl_transaction_cmd.c         |   453 +
 test/dapltest/common/dapl_endian.c               |    98 +
 test/dapltest/common/dapl_global.c               |    34 +
 test/dapltest/common/dapl_performance_cmd_util.c |    57 +
 test/dapltest/common/dapl_quit_cmd_util.c        |    37 +
 test/dapltest/common/dapl_transaction_cmd_util.c |    62 +
 test/dapltest/include/dapl_bpool.h               |    62 +
 test/dapltest/include/dapl_client_info.h         |    47 +
 test/dapltest/include/dapl_common.h              |    53 +
 test/dapltest/include/dapl_execute.h             |    40 +
 test/dapltest/include/dapl_fft_cmd.h             |    72 +
 test/dapltest/include/dapl_fft_util.h            |    97 +
 test/dapltest/include/dapl_getopt.h              |    52 +
 test/dapltest/include/dapl_global.h              |    39 +
 test/dapltest/include/dapl_limit_cmd.h           |    69 +
 test/dapltest/include/dapl_mdep.h                |    40 +
 test/dapltest/include/dapl_memlist.h             |    57 +
 test/dapltest/include/dapl_params.h              |    75 +
 test/dapltest/include/dapl_performance_cmd.h     |    69 +
 test/dapltest/include/dapl_performance_stats.h   |    65 +
 test/dapltest/include/dapl_performance_test.h    |    91 +
 test/dapltest/include/dapl_proto.h               |   667 +
 test/dapltest/include/dapl_quit_cmd.h            |    44 +
 test/dapltest/include/dapl_server_cmd.h          |    44 +
 test/dapltest/include/dapl_server_info.h         |    58 +
 test/dapltest/include/dapl_tdep.h                |    81 +
 test/dapltest/include/dapl_tdep_print.h          |    68 +
 test/dapltest/include/dapl_test_data.h           |   106 +
 test/dapltest/include/dapl_transaction_cmd.h     |    69 +
 test/dapltest/include/dapl_transaction_stats.h   |    50 +
 test/dapltest/include/dapl_transaction_test.h    |   101 +
 test/dapltest/include/dapl_version.h             |    41 +
 test/dapltest/mdep/linux/dapl_mdep_user.c        |   546 +
 test/dapltest/mdep/linux/dapl_mdep_user.h        |   203 +
 test/dapltest/test/dapl_bpool.c                  |   359 +
 test/dapltest/test/dapl_client.c                 |   559 +
 test/dapltest/test/dapl_client_info.c            |    56 +
 test/dapltest/test/dapl_cnxn.c                   |    68 +
 test/dapltest/test/dapl_execute.c                |    98 +
 test/dapltest/test/dapl_fft_connmgt.c            |   118 +
 test/dapltest/test/dapl_fft_endpoint.c           |   264 +
 test/dapltest/test/dapl_fft_hwconn.c             |   217 +
 test/dapltest/test/dapl_fft_mem.c                |   216 +
 test/dapltest/test/dapl_fft_pz.c                 |   247 +
 test/dapltest/test/dapl_fft_queryinfo.c          |   596 +
 test/dapltest/test/dapl_fft_test.c               |    92 +
 test/dapltest/test/dapl_fft_util.c               |   360 +
 test/dapltest/test/dapl_limit.c                  |  1536 +++
 test/dapltest/test/dapl_memlist.c                |   123 +
 test/dapltest/test/dapl_performance_client.c     |   490 +
 test/dapltest/test/dapl_performance_server.c     |   391 +
 test/dapltest/test/dapl_performance_stats.c      |   374 +
 test/dapltest/test/dapl_performance_util.c       |   618 +
 test/dapltest/test/dapl_quit_util.c              |    43 +
 test/dapltest/test/dapl_server.c                 |   855 ++
 test/dapltest/test/dapl_server_info.c            |    53 +
 test/dapltest/test/dapl_test_data.c              |    56 +
 test/dapltest/test/dapl_test_util.c              |   680 +
 test/dapltest/test/dapl_thread.c                 |   127 +
 test/dapltest/test/dapl_transaction_stats.c      |   176 +
 test/dapltest/test/dapl_transaction_test.c       |  2265 ++++
 test/dapltest/test/dapl_transaction_util.c       |   747 ++
 test/dapltest/test/dapl_util.c                   |   219 +
 test/dapltest/udapl/udapl_tdep.c                 |   112 +
 test/dtest/Makefile.am                           |    14 +
 test/dtest/Makefile.in                           |   510 +
 test/dtest/README                                |    19 +
 test/dtest/dtest.c                               |  2147 +++
 test/dtest/dtestx.c                              |  1298 ++
 279 files changed, 113519 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..b2c6a58
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,17 @@
+This is an incomplete list of people who have contributed to the 
+DAPL project:
+
+ Caitlin Bestler
+ Philip Christopher
+ Jay Danielsen
+ Arlin Davis
+ Tom Duffy
+ Matthew Finlay
+ Jimmy Hill
+ James Lentini
+ Gil Rubin
+ Steve Sears
+ Randy Smith
+ Stan Smith
+ Anthony Topper
+ Steve Wise 
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..2012c04
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+# Copyright (c) 2005 Voltaire Inc.  All rights reserved.
+# Copyright (c) 2005 Intel Corporation. All rights reserved.
+# Copyright (c) 2004-2005, Mellanox Technologies, Inc. All rights reserved. 
+# Copyright (c) 2003 Topspin Corporation.  All rights reserved. 
+# Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+#
+# This Software is licensed under one of the following licenses:
+#
+# 1) under the terms of the "Common Public License 1.0" a copy of which is
+#    in the file LICENSE.txt in the root directory. The license is also
+#    available from the Open Source Initiative, see
+#    http://www.opensource.org/licenses/cpl.php.
+#
+# 2) under the terms of the "The BSD License" a copy of which is in the file
+#    LICENSE2.txt in the root directory. The license is also available from
+#    the Open Source Initiative, see
+#    http://www.opensource.org/licenses/bsd-license.php.
+#
+# 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+#    copy of which is in the file LICENSE3.txt in the root directory. The 
+#    license is also available from the Open Source Initiative, see
+#    http://www.opensource.org/licenses/gpl-license.php.
+#
+# Licensee has the right to choose one of the above licenses.
+#
+# Redistributions of source code must retain the above copyright
+# notice and one of the license notices.
+#
+# Redistributions in binary form must reproduce both the above copyright
+# notice, one of the license notices in the documentation
+# and/or other materials provided with the distribution.
+#
+
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..7b86f8e
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,3039 @@
+commit 0ef94459e0a0175233b43b3fcbaaac2596e1042d
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 29 14:33:28 2009 -0700
+
+    scm, cma: dat max_lmr_block_size is 32 bit, verbs max_mr_size is 64 bit
+    
+    mismatch of device attribute size restricts max_lmr_block_size to 32 bit
+    value. Add check, if larger then limit to 4G-1 until DAT v2 spec changes.
+    
+    Consumers should use max_lmr_virtual_address for actual max
+    registration block size until attribute interface changes.
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit f91f27eaaab28b13a631adf75b933b7be3afbc0f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 29 10:51:03 2009 -0700
+
+    scm: increase default MTU size from 1024 to 2048
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 8d6846056f4c86b6a06346147df55d37c4ba9933
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 29 10:49:09 2009 -0700
+
+    openib_scm, cma: use direct SGE mappings from dat_lmr_triplet to ibv_sge
+    
+    no need to rebuild scatter gather list given that DAT v2.0
+    is now aligned with verbs ibv_sge. Fix ib_send_op_type_t typedef.
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit c61f75b3412935e7d4a7a1acc9c495dcb4ac7e24
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 29 08:39:37 2009 -0700
+
+    dtest: add flush EVD call after data transfer errors
+    
+    Flush and print entries on async, request, and receive
+    queues after any data transfer error. Will help
+    identify failing operation during operations
+    without completion events requested.
+    Fix -B0 so burst size of 0 works.
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit c88a191c7a408b0fb3dfb418a77a5b3b5afc778e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 22 13:16:19 2009 -0700
+
+    dtest/dapltest: Cleanup code with Lindent
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 8699a9f1bd2bb45b04b87f887698707ba7b62d0a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 21 15:51:24 2009 -0700
+
+    ibal-scm: remove, obsolete
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 67ddd6bfba46f1f7a61b772257132f1257d05c96
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 21 15:44:15 2009 -0700
+
+    scm, cma provider: Cleanup code with Lindent
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d0898091090ff19be7929fed0d14f1ca696d5e53
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 21 15:39:01 2009 -0700
+
+    udapl: Cleanup code with Lindent
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit a688d1cfb52fde256c5bfd95a27f940dd17e7ced
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 21 15:31:20 2009 -0700
+
+    dapl common: Cleanup code with Lindent
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 2bded73c7f68cfb870e432ab3ebae7427d595cbe
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 21 12:52:29 2009 -0700
+
+    dat: Cleanup code with Lindent
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 31e7b9210fc5334ff3be62558e74e3fdf01d6cbd
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 20 12:28:08 2009 -0700
+
+    Release 2.0.18
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 29bf0a24f54c45d2742026756f31f1a1f26fb6f3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Apr 16 14:35:18 2009 -0700
+
+    dapltest: reset server listen ports to avoid collisions during long runs
+    
+    If server is running continuously the port number increments
+    from base without reseting between tests. This will
+    eventually cause collisions in port space.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit c27af8de0501d132b8152ec8546023cdba212de5
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Thu Apr 16 10:21:51 2009 -0700
+
+    To avoid duplicating port numbers between different tests, the next port
+    number to use must increment based on the number of endpoints per thread *
+    the number of threads.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 3084310197c20aaa50abe82260fc835786f591f5
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Thu Apr 16 10:21:45 2009 -0700
+
+    dapltest assumes that events across multiple endpoints occur in a specific
+    order.  Since this is a false assumption, avoid this by directing events to
+    per endpoint EVDs, rather than using shared EVDs.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit ef87a0a462f4fa07ac252e28d3aeb44af73cc202
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Thu Apr 16 10:21:41 2009 -0700
+
+    Synchronization is missing between removing items from an EVD and queuing
+    them.  Since the removal thread is the user's, but the queuing thread is
+    not, the synchronization must be provided by DAPL.  Hold the evd lock
+    around any calls to dapls_rbuf_*.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit f5e86d28f803162ffdf94b41ec7435dec92f728d
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Thu Apr 16 10:21:26 2009 -0700
+
+    Communication to the CR thread is done using an internal socket.  When a
+    new connection request is ready for processing, an object is placed on
+    the CR list, and data is written to the internal socket.  The write causes
+    the CR thread to wake-up and process anything on its cr list.
+    
+    If multiple objects are placed on the CR list around the same time, then
+    the CR thread will read in a single character, but process the entire list.
+    This results in additional data being left on the internal socket.  When
+    the CR does a select(), it will find more data to read, read the data, but
+    not have any real work to do.  The result is that the thread spins in a
+    loop checking for changes when none have occurred until all data on the
+    internal socket has been read.
+    
+    Avoid this overhead by reading all data off the internal socket before
+    processing the CR list.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 2ab52e9b1ab37c6eb44206c135e0568a8c2d01fa
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Thu Apr 16 10:21:13 2009 -0700
+
+    The dapl connect call takes as input an address (sockaddr) and a port number
+    as separate input parameters.  It modifies the sockaddr address to set the
+    port number before trying to connect.  This leads to a situation in
+    dapltest with multiple threads that reference the same buffer for their
+    address, but specify different port numbers, where the different threads
+    end up trying to connect to the same remote port.
+    
+    To solve this, do not modify the caller's address buffer and instead use
+    a local buffer.  This fixes an issue seen running multithreaded tests with
+    dapltest.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 7947026ede478f08b4a7b8cb607f457765bf2afa
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Thu Apr 16 10:21:03 2009 -0700
+
+    Windows socket calls should check return values against SOCKET_ERROR to
+    determine if an error occurred.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit e66e42fc44c50c8202f7c98f76d799a69aa3f1b6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 10 08:33:41 2009 -0700
+
+    Build: add new file dapl/openib_cma/linux/openib_osd.h to EXTRA_DIST
+    
+    Fix rpmbuild problem with new cma osd include file.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit acb213adb3268e9bf6999e2bf040d4a71212b701
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 10 08:32:24 2009 -0700
+
+    dapl scm: reduce wait time for thread startup.
+    
+    thread startup wait reduce to 2ms to reduce open times.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 55459699fa9c0e5fb7e2b17822f0916412c64b35
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 10 08:31:22 2009 -0700
+
+    dapl-scm: getsockopt optlen needs initialized to size of optval
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d710c5327e05a40796341d16b45a2b098b03f588
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:17:32 2009 -0700
+
+    The connection request thread adds sockets to a select list unless
+    the cr->socket is invalid and the cr request state is set to destroy.  If the
+    cr->socket is invalid, but the cr->state is not destroy, then the cr->socket
+    is added to an FD set for select/poll.  This results in select/poll
+    returning an error when select is called.  As a result, the cr thread never
+    actually blocks during this state.
+    
+    Fix this by only destroying a cr based on its state being set to destroy
+    and skip adding cr->sockets to the FD set when they are invalid.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 0be961c432f897d4f92d9a24dcb7c42ad30ea160
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:08:16 2009 -0700
+
+    Make sure all locks are initialized properly and don't zero their memory
+    once they are.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 9abdc26cd6154aa55588759ba54c9ca69e3fe2b5
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:08:13 2009 -0700
+
+    The lock functions are defined just a few lines beneath the prototypes
+    as inline.  Remove the duplicate prototypes.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 9578c4aeb9878d98374e4b7abc02db182aef82c6
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:08:07 2009 -0700
+
+    Make sure all locks are initialized and don't zero out their memory once
+    they are.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 97edcbb662b489303ef68c0da02831efaddeed91
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:08:03 2009 -0700
+
+    The IBAL library allocates a small number of threads for callbacks to the
+    user.  If the user blocks all of the callback threads, no additional
+    callbacks can be invoked.  The DAPL IBAL provider cancels listen requests
+    from within an IBAL callback, then waits for a second callback to confirm
+    that the listen has been canceled.  If there is a single IBAL callback
+    thread, or multiple listens are canceled simultaneously, then the provider
+    can deadlock waiting for a cancel callback that never occurs.
+    
+    This problem is seen when running dapltest with multiple threads.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 3e56e63bcb68de352edadafdcfcc4cb222c08c7b
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:57 2009 -0700
+
+    We need to check the return value from select for errors before checking
+    the FD sets.  An item may be in an FD set but select could have returned
+    an error.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit a8a977becaeefe0d7f8e01e01631a11988d2d54e
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:53 2009 -0700
+
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit ecc79cc0a1ae2bdbb3dfd19e15b3b562ac9a2957
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:49 2009 -0700
+
+    Enable building with CQ_WAIT_OBJECTS support to directly wait on CQ
+    completion channels in the Windows version of the openib_scm provider.
+    Also minor fixup to use DAPL_DBG_TYPE_UTIL for debug log messages
+    instead of DAPL_DBG_TYPE_CM.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 73728763666a46df5789af93b50db53cdf64afd6
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:44 2009 -0700
+
+    The IBAL-SCM provider will run into an inifinite loop if the check for
+    cr->socket > SCM_MAX_CONN - 1 fails.  The code continues back to the start
+    of the while loop without moving to the next connection request entry
+    in the list.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 9b1b396539926d36ffacfff04fbe7c081e436b45
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:40 2009 -0700
+
+    next_cr is set just before and inside the check
+    if ((cr->socket == DAPL_INVALID_SOCKET && cr->state == SCM_DESTROY)
+    Remove setting it inside the if statement.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 7b49a9850f62276bb7bfccb2d85a1e94e311813c
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:35 2009 -0700
+
+    Some errors on windows are more easily interpretted in hex than decimal.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 08ee072a1396ac2c28983878dbc6b02feb035787
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:32 2009 -0700
+
+    The WinOF HCA driver cannot handle transitioning from RTS -> RESET ->
+    INIT -> ERROR.  Simply delete the QP and re-create it to reinitialize
+    the endpoint until the bug is fixed.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 51ef5d96ce67d6141ec02b2a318f1b6e12be1bcf
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:23 2009 -0700
+
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit a8582be0e1fc89e856f1d0b43a3c1b271295a352
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:07:18 2009 -0700
+
+    Convert the openib_cma provider to common code between linux and windows.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit cc2a71dfe0c35a70f6b1ba66070a3a06059a8bb5
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Apr 10 08:06:53 2009 -0700
+
+    Move from using pipes to sockets for internal communication.  This
+    avoids issues with windows only supporting select() on sockets.
+    
+    Remove windows specific definition of dapl_dbg_log.
+    
+    Update to latest windows libibverbs implementation using completion
+    channel abstraction to improve windows scalability and simplify
+    porting where FD's are accessed directly in Linux.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit b3ad2ed97399a24a869841e17d1314e11c379aae
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 31 05:41:50 2009 -0800
+
+    Release 2.0.17
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 5d732929f8a90a490994e8e35a3666c3647ad4fe
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 31 05:22:11 2009 -0800
+
+    dapl: ia64 build problem on SuSE 11, atomic.h no longer exists.
+    
+    Add autotools check for SuSE 11 and include intrinsics.h
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d7b8654db3a1f4ead16cb2e6d15f0902a322a188
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Mar 16 13:23:50 2009 -0800
+
+    Release 2.0.16
+    
+    Fix changelog year in spec file.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 08d9e26a85911f99d47cbb92ec8bccfc7f073be0
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Mar 16 13:15:22 2009 -0800
+
+    Release 2.0.16
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 42c97b2a11d63ac6ba8a15fe8c82061e7da6e136
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Mar 13 12:39:12 2009 -0800
+
+    uDAPL: scm provider, remove query gid/lid from connection setup phase
+    
+    move lid/gid queries from the connection setup phase
+    and put them in the open call to avoid overhead
+    of more fd's during connections. No need
+    to query during connection setup since uDAPL
+    binds to specific hca/ports via dat_ia_open.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 775394b73980a7bc0af018a33d2a5bb795469c78
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Mar 12 12:44:43 2009 -0800
+
+    Build: missing new linux/osd include file in EXTRA_DIST
+    
+    Add dapl/openib_scm/linux/openib_osd.h to EXTRA_DIST
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 647e288c1c9af5261495a5ed88e6ecbe1daf6d6e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Mar 12 12:11:21 2009 -0800
+
+    Build: spec files missing Requires(post) statements for sed/coreutils
+    
+    needed for anaconda install
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 1f5b3b7cab0785b64e8dab035dd4cd27111497d3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Mar 4 10:04:13 2009 -0800
+
+    dapl scm: remove unecessary thread when using direct objects
+    
+    A thread is created for processing events on devices without
+    direct event objecti support. Since all openfabrics devices support
+    direct events there is no need to start a thread. Move this under
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 66e4236e2c57dbaf860b7c20809b65a4fbbafa6f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 3 11:08:12 2009 -0800
+
+    dtestx: add missing F64u definition for windows
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d9e771da16ec2b360a222ceccbbca5d088e20ee5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 3 09:25:26 2009 -0800
+
+    uDAPL common: add 64 bit counters for IA, EP, and EVD's.
+    
+     -DDAPL_COUNTERS to build-in counters for cma and scm providers.
+     New extension calls in dat_ib_extensions.h for counters
+    	dat_print_counters, dat_query_counters
+     Counters for operations, async errors, and data
+     Update dtestx (-p) with print and query counter examples
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 5e6ad3cdaa1d72523ad6b38d8306e0a2d0f1ada6
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Tue Feb 17 07:24:27 2009 -0800
+
+    Modify the openib_scm provider to support both OFED and WinOF releases.
+    This takes advantage of having a libibverbs compatibility library.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 0425c24c3b66e672bba346a1d0946b11c7b8b11e
+Author: Stan Smith <stan.smith at intel.com>
+Date:   Fri Jan 30 09:52:33 2009 -0800
+
+    Update the dapl.git tree with the latest SVN version of the
+    ibal-scm provider.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 83543b6cca342e25fd6408454f1261ec6835a172
+Author: Stan Smith <stan.smith at intel.com>
+Date:   Fri Jan 30 09:52:25 2009 -0800
+
+    Merge SVN IBAL provider code back into the main git tree.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit be0b6122d0fe4f93afc8cf3ec961702faf82fb44
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Jan 30 09:52:11 2009 -0800
+
+    Changes to dtest to support building on Windows.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 9f87610c4b37e4db4d74205c14028582a2f6a79e
+Author: Stan Smith <stan.smith at intel.com>
+Date:   Fri Jan 30 09:48:26 2009 -0800
+
+    Add return codes to various functions.
+    Add script (batch file) for Windows testing.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 723067550265defdcfe6e00460a4f89f7a81fbf1
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Jan 30 09:46:40 2009 -0800
+
+    Merge OFED and WinOF trees for common dapl code.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 5b37e080e1ecc6903b3ab1ac9b0d4c9f8a18b790
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 16 08:16:13 2009 -0800
+
+    dtest/dapltest: use $(top_builddir) for .la files during test builds
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit bd655d4fdd7e63e7fdeed3979926da5582f71e4b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Nov 26 07:12:30 2008 -0800
+
+    Release 2.0.15
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 5d5dec42717c963d1644ee3e716459dc5d58e930
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Oct 27 08:48:53 2008 -0800
+
+    dapltest: transaction test moves to cleanup stage before rdma_read processing is complete
+    
+    With multiple treads, the transaction server tread can move to cleanup
+    stage and unregister memory before the remote client process has
+    completed the rdma read. In lieu of a rewrite to add sync messages
+    at the end of transaction test phase, just add a delay before cleanup.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 101a843e59b881bc131dfd5c2aec7e54d44f35c0
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 14 11:56:35 2008 -0700
+
+    Current static registration (SR) assumes DAT_OVERRIDE or /etc/dat.conf.
+    Change SR to include sysconfdir. SR file access in the following order:
+    
+    - DAT_OVERRIDE
+    - sysconfdir
+    - /etc
+    
+    if DAT_OVERRIDE is set, assume administration override
+    and do not failover to other locations. Add debug
+    messages for each failure and retries.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Acked-by: Doug Ledford <dledford at redhat.com>
+
+commit c98d2169b839a73d76691acf510dd8976ddc850a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Oct 3 08:00:56 2008 -0700
+
+    Release 2.0.14
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit c26d0bb065f3734f09058e1e6d26dde4a3738e55
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Oct 3 05:40:04 2008 -0700
+
+    dat.conf: add ofa-v2-iwarp entry for iwarp devices
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d54c35c8a9ba33a464ca15f4a65b914688e5194d
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Oct 3 05:30:10 2008 -0700
+
+    dapl: adjust max_rdma_read_iov to 1 for query on iWARP devices
+    
+    iWarp spec allows only one iov on rdma reads
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 9584df22d0cb3aa5a2a2a04bf427524d17650ef7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Oct 1 08:17:49 2008 -0700
+
+    dtest: reduce default IOV's during dat_ep_create for iWARP devices
+    
+    iWarp adapters tend to have less IOV resources then IB adapters.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 8ca9898621acf5b9769d46ea34ee8ca1eecaf2ff
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Sep 26 12:43:13 2008 -0700
+
+    dtest: fix 32-bit build issues in dtest and dtestx examples.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 42a3a4edf30115a35d9d599b51f8756814e62368
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Sep 26 08:48:31 2008 -0700
+
+    Revert "Release 2.0.14"
+    
+    This reverts commit 816d1c3acfb4a457c6b1cc07d657f018312f2a63.
+    
+    missed some fixes for package release.
+
+commit 816d1c3acfb4a457c6b1cc07d657f018312f2a63
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Sep 24 12:13:37 2008 -0700
+
+    Release 2.0.14
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit c00d858da3113ce5463d408ab5e13e17cc9529e4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Sep 24 08:33:32 2008 -0700
+
+    build: $(DESTDIR) prepend needed on install hooks for dat.conf
+    
+    All install directives that automake creates automatically
+    have $(DESTDIR) prepended to them so that a make
+    DESTDIR=<some_path> install will work. The hand written
+    install hooks for dat.conf was missing DESTDIR.
+    
+    Signed-off-by: Doug Ledford <dledford at redhat.com>
+
+commit 860db3be4907c8ff290ce7c6b631b2117f5080bd
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Sep 24 08:26:28 2008 -0700
+
+    dapl scm: UD shares EP's which requires serialization
+    
+    add locking around the modify_qp state changes to avoid
+    unnecessary modify_qp calls during multiple resolve
+    remote AH connection events on a single EP.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit f2c214647b5ce53e52052d6b6bea3fbace7cc20a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sat Sep 20 16:02:00 2008 -0700
+
+    dtestx: Add new options to test UD.
+    
+    - many to one/many EP remote AH resolution, data flow
+    - bi-directional EP remote AH resolution, data flow
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 3c218b5ed65d0b7349a86eb0fe6f6bf57e3eccd6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sat Sep 20 15:58:59 2008 -0700
+
+    dapl: fixes for IB UD extensions in common code and socket cm provider.
+    
+     - Manage EP states base on attribute service type.
+     - Allow multiple connections (remote_ah resolution)
+       and accepts on UD type endpoints.
+     - Supply private data on CR conn establishment
+     - Add UD extension conn event type - DAT_IB_UD_PASSIVE_REMOTE_AH
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 01cdd688ddebec8df6f17f92c3b72a410f50dd6f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sat Sep 20 15:49:40 2008 -0700
+
+    dapl: add provider specific attribute query option for IB UD MTU size
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit ee3d9ce2389a14c85405dfdff67f04a5f5679e32
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 15:52:37 2008 -0700
+
+    Release 2.0.13
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit f37589927fabf0feb3a09c4c7c03e18df5749fef
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 12:24:49 2008 -0700
+
+    dapl build: add correct CFLAGS, set non-debug build by default for v2
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 280f3aec6d0fa9d7e36f75711471e35333ee34cf
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 12:22:19 2008 -0700
+
+    dapl providers: fix compiler warnings in cma and scm providers
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 60c0589a2aba520ae67b1c8eaad5a167edb6fba3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 12:20:08 2008 -0700
+
+    dat: fix compiler warnings in dat common code
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit fb3e368db07d02a3daa1d12d71f62ac4e7a5ef23
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 12:18:48 2008 -0700
+
+    dapl: fix compiler warnings in common code
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 38a53ae75bce5059a84262fe1b40eacf92b22287
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 12:16:58 2008 -0700
+
+    dtest/dapltest: fix compiler warnings
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 45900087764917b354411fdd2b3880473d553ab8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Aug 22 14:51:22 2008 -0700
+
+    dapl cma: debug message during query needs definition for inet_ntoa
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 99d46313a03af18771966cf86fcc934d179627b5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Aug 21 12:54:58 2008 -0700
+
+    Release 2.0.12
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 0b2a3fac8d28d5b3c2e1416fa696fe4cbc672f00
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:51:00 2008 -0700
+
+    dapl scm: fix corner case that delivers duplicate disconnect events
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 96f6822b90fa880a6c6a64b1e183064a449f7237
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:47:19 2008 -0700
+
+    dat: include stddef.h for NULL definition in dat_platform_specific.h
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 283e37c09ad072d69d29e28225e9a6e8bf3f75f0
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:27:08 2008 -0700
+
+    dapl: add debug messages during async and overflow events
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 4a7965ac07b7f2ee1deb5b144ed50b30c1749d38
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:24:33 2008 -0700
+
+    dapltest: add check for duplicate disconnect events in transaction test
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 7e8986f2c6496851b724a007458881c3248ac998
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:22:42 2008 -0700
+
+    dtestx: fix stack corruption problem with hostname strcpy
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit ee2a553762abd6ebede99db5d26d1ba1d74ba3cb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Aug 14 09:42:57 2008 -0700
+
+    dapl scm: use correct device attribute for max_rdma_read_out, max_qp_init_rd_atom
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 142a8e4a99259fa6fe31f74ce6d0dac1017f381b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Aug 14 09:19:53 2008 -0700
+
+    dapl scm: change IB RC qp inline and timer defaults.
+    
+    rnr nak can be the result of any operation not just
+    message send recevier not ready. Timer is much too
+    large given this case.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 36088a92d87e833bae535fcea0c45417dec34e65
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Aug 14 09:12:38 2008 -0700
+
+    dapl scm: add mtu adjustments via environment, default = 1024.
+    
+    DAPL_IB_MTU adjusts path mtu setting for RC qp's. Default setting
+    is min of 1024 and active mtu on IB device.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit a7dabdc4c1ddc62cc0384d60e8157ee829f12898
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 13 14:17:40 2008 -0700
+
+    dapl scm: change connect and accept to non-blocking to avoid blocking user thread.
+    
+    The connect socket that is used to exchange QP information is now non-blocking
+    and the data exchange is done via the cr thread. New state RTU_PENDING added.
+    On the passive side there is a new state ACCEPT_DATA used to avoid read blocking
+    on the user accept call.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 7e25c0f21d755cce3aa7aff993fb0baddaafc0e8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jul 29 08:18:25 2008 -0700
+
+    dapl scm: update max_rdma_read_iov, max_rdma_write_iov EP attributes during query
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit fd9909618fdfff0eb2c8ce97bff61ea98ec44a8e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sun Jul 20 13:20:45 2008 -0700
+
+    Release 2.0.11
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 0003bb7866af3ba73cc79c703b565a8012439bb1
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sun Jul 20 13:17:22 2008 -0700
+
+    dtestx: add -d option to test new IB UD extension.
+    
+    modify dtestx to connect peer UD QP's and exchange/verify messages as an example for new extension.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 9816ac15f98f6e73cf7b371ac6e1e312d4171c0b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sun Jul 20 13:13:09 2008 -0700
+
+    dapl scm: add support for UD extensions in Openfabrics socket cm provider
+    
+    add qp_type in connection information exchange
+    add new post_send_ud call
+    changes to connection manager to support qp types beyond RC.
+    changes to connection events to use new extended event calls.
+    exchange address handle information during connection phase.
+    changes to modify_qp to handle both RC and UD types.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 927dac5b61e64868089acd49d468b98327e14a1a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sun Jul 20 13:07:34 2008 -0700
+
+    dapl: add support for UD extensions in common code.
+    
+    allow EP create for extended service types.
+    extend connection event types to include UD AH resolution/exchange.
+    add new extended connect and connect request upcalls for providers.
+    - dapls_evd_post_cr_event_ext
+    - dapls_evd_post_connection_event_ext
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit be3d6a53f3340294697706ce50a05faf151aacc7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Sun Jul 20 12:57:49 2008 -0700
+
+    dat: New definitions for IB unreliable datagram extension
+    
+    Extend EP dat_service_type, with DAT_IB_SERVICE_TYPE_UD
+    Add IB extension call dat_ib_post_send_ud().
+    Add address handle definition for UD calls.
+    Add IB event definitions to provide remote AH via connect and connect requests
+    Roll IB extension version to 2.0.2
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 8f65d4c96a7e13f7092d82f2f5aad477a61a57c1
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jul 18 07:46:20 2008 -0700
+
+    dat: allow TYPE_ERR messages to be turned off with DAT_DBG_TYPE
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 4fefc6bca4e21c9d757923bf13bc93c62dbff17d
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 25 08:02:11 2008 -0700
+
+    dapltest: manpage - rdma write example incorrect
+    
+    parameter for rdma write should be RW and not WR
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 68638bde71b529a142c13ac332cd44435cabc896
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 23 15:26:30 2008 -0700
+
+    dapl: remove needless terminating 0 in dto_op_str functions.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit cb1f2a144ecd375d2143d6e176a6a92a18556d7e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 23 10:52:46 2008 -0700
+
+    Release 2.0.10
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit d9b3c06ae98ac4d3b264384f6510137166d78cb0
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 23 10:35:17 2008 -0700
+
+    remove reference to doc/dat.conf in makefile.am
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit b052d402e09ac78281a25af2c8fe902fa71f5c6f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Jun 19 13:34:49 2008 -0700
+
+    dapl scm: fix ibv_destroy_cq busy error condition during dat_evd_free.
+    
+    Problem surfaced while running Intel MPI 3.1 and mpich2-test suite.
+    dapli_destroy_cm was incorrectly removing reference to qp_handle in endpoint
+    and destroy_cq and destroy_pd code was ignoring verbs errors.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit e466d8e330c45176c5f00efda79ad745bf3f71a4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 18 14:21:28 2008 -0700
+
+    dapl scm: add stdout logging for uname and gethostbyname errors during open.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 8e1f4db702cacdd2b9b95083db54ec38c9d2f5e5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 18 14:19:51 2008 -0700
+
+    dapl scm: support global routing and set mtu based on active_mtu
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit fc65a08727c59c304dad20337a8bff803f2302c0
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 18 13:59:44 2008 -0700
+
+    dapl scm: Adding socket cm provider for better scalability on large homogeneous clusters.
+    
+    Bring socket cm provider back to life with some changes:
+    
+    better threading support for exchanging QP information.
+    Avoid blocking during connect to support dynamic connection
+    model with MPI implementations.
+    
+    consumer control of ack timeout/retries.
+    
+    disconnect/reject capabilities via socket exchange.
+    
+    version support for wire protocol to insure compatibility
+    with peer scm provider. Add gids to exchange.
+    
+    validated with Intel MPI on a 14,000+ core fabric using IB DDR.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 0855af175fec2f1bec8391ebae2a2cdff26a3359
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 11 10:43:24 2008 -0700
+
+    dapl: add opcode to string function to report opcode during failures.
+    
+    Need to use cookie opcode during failures in lieu of cqe opcode.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit ec6296e7f0a843c69231f8284ae780014fa26fbe
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 16 14:59:43 2008 -0700
+
+    dapl: remove unused iov buffer allocation on the endpoint
+    
+    provider's manage iov space on stack during posting.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit c678414ced8bc9cbe21b2fc1d54aa2af73ba6528
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 16 13:59:11 2008 -0700
+
+    dapl: endpoint pending request count is wrong
+    
+    The code assumes every cookie allocated during posting of
+    requests gets completed. This incorrect assumption results in
+    wrong pending count. Remove request_pending field and replace
+    with direct call, dapl_cb_pending, to provide accurate
+    data to consumer.
+    
+    Add debug print if consumer overruns request queue.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit c446a3a3f3ecbd91ab583fee35bf613ab10defcd
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 2 12:40:45 2008 -0700
+
+    dapl extension: dapli_post_ext should always allocate cookie for requests.
+    
+    extension didn't allocate cookie if completion was suppressed which resulted
+    segfault during provider post call. Provider's expect cookie for wr_id,
+    even with surpressed completions, to handle events during errors.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 2583f07d9d0f55eee14e0b0e6074bc6fd0712177
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue May 20 14:35:43 2008 -0700
+
+    Release 2.0.9
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 9b38e7b792c48ea63c2078fc6c10bb843d96bd06
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue May 20 21:56:06 2008 -0700
+
+    dtest,dtestx,dapltest: fix build issues with Redhat EL5.1
+    
+    need include files/definitions for sleep, getpid, gettimeofday
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 8084ebf39729bac310447467b518df4248e9e2b6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue May 20 14:31:09 2008 -0700
+
+    dapl: Fix long delays with the cma provider open call when DNS is not configure on server.
+    
+    Open call should default to netdev names when resolving local IP address for cma binding to match dat.conf settings. The open code attempts to resolve with IP or Hostname first and if there is no DNS services setup the failover to netdev name resolution is delayed for as much as 20 seconds.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 2f603b03f4cebe7c414cbaeecb7155f7bf1fb115
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue May 20 14:30:05 2008 -0700
+
+    dapl: change cma provider to use max_rdma_read_in,out from ep_attr instead of HCA max values when connecting.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 7a0e5fad6de7c6affc4ba3c608b0c56f4206c48c
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 30 14:48:21 2008 -0700
+
+    Release 2.0.8
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 561f09ab6f9fd46a6075ecb54ca7693f2b12f311
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 30 13:51:41 2008 -0700
+
+    dapl: fix post_send, post_recv to handle 0 byte's and NULL iov handles
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 0289daa3fcc4451bace8cc6b6e20ddb7bbade07e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 30 13:25:53 2008 -0700
+
+    dat: udat_sr_parser ia_name will fail on comments, turn down debug message
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit b93b91d48186d100c48f1a479776d56476847607
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 29 16:15:44 2008 -0700
+
+    dat: cleanup error handling with static registry parsing of dat.conf
+    
+    change asserts to return codes, add log messages, and
+    report errors via open instead of asserts during dat
+    library load.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit b6b1f152efabe064ab8bdcdeecbd1edd30eb732f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 28 10:14:20 2008 -0700
+
+    dapl: cma provider needs to support lower inline send default for iWARP
+    
+    IB and iWARP work best with different defaults. Add transport check
+    and set default accordingly. 64 for iWARP, 200 for IB.
+    
+    DAPL_MAX_INLINE environment variable is still used to override.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit be32d7d5beeeceac5dbb1974d3217265dc4d5461
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 28 09:44:12 2008 -0700
+
+    dtestx: need to include string.h for memset/strcpy declarations
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit a192465714e7607529303a80d8f9a312e0c7aec6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 28 08:41:05 2008 -0700
+
+    dapl: add vendor_err with DTO error logging
+    
+    DAPL_GET_CQE_VENDOR_ERR added to get vendor_err via cq entry.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 6ac657a4e7e5e27254a024fca7fdead569043f9a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 25 15:12:34 2008 -0700
+
+    dapl: add check before destroying cm event channel in release
+    
+    library may be loaded and unloaded without calling open
+    in which case the cm event channel is not created.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit c1eb23352f44aec6faeef37d8f0c3180f6259cf8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 22 12:55:13 2008 -0700
+
+    dapl: evd_alloc doesn't check for direct_object_create errors.
+    
+    Fix error check in dapls_ib_wait_object_create() and dat_evd_alloc.
+    When attempting to create large number of evd's that exceed
+    open files limit the error was not propagated up causing
+    a segfault. Note: there are 3 FD's required for each EVD
+    2 for pipe, and one for cq event_channel.
+    
+    Change the error reporting to indicate correct return
+    code and send to log with non-debug builds.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit c5c6229b3e7744782cace0ca1f5f1fa89198bd3a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 14 13:10:13 2008 -0700
+
+    dapl: change packaging to modify OFA provider contents of dat.conf instead of file replacement.
+    
+    Change the packaging to update only the OFA provider contents in dat.conf. This allows other
+    dapl providers, other then OFA, to co-exist and configure properly. Adding manpage to explain
+    syntax of this static configuration file.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit d32b27d991bc1314eea055ce3f55bb585b11aaac
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 11 11:37:48 2008 -0700
+
+    dapl openib_cma: fix hca query to use correct max_rd_atom values
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit ac4ccfd144c01b7f4285b0cecc6218c58d0482a8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 9 17:26:06 2008 -0700
+
+    dat: add logging by default during library load failures.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 1794e94754a1e58fcf214c2802e950124bbd1316
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 8 17:32:03 2008 -0700
+
+    dtest: add private data validation with connect and accept.
+    
+    Include code, with build option, to validate private data with
+    consumer rejects.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 46f21284bc05e76e82b9ad6cd9f1dbc9bcde0a28
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 8 17:25:11 2008 -0700
+
+    dapl: add hooks in evd connection callback code to deliver private data with consumer reject.
+    
+    PEER rejects can include private data. The common code didn't support delivery
+    via the connect event data structure. Add the necessary hooks in
+    dapl_evd_connection_callback function and include checks in openib_cma
+    provider to check and delivery properly. Also, fix the private data size
+    check in dapls_ib_reject_connection function.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 90e04c6f76dd5cfebd2f2867bfe22e85b0c2f461
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 7 15:47:57 2008 -0700
+
+    dapl: increase reject private data size to avoid odd byte offets.
+    
+    remove reject type checking on passive side since it will
+    always be non-consumer from active side.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 353a1c8a00bb2a1380fd7a372973a5a70828da35
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 4 16:04:11 2008 -0800
+
+    dapl: update vendor information for OFA v2 provider.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit dbf1ea37f43caec61911dea06af801c2f906db0a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 4 16:03:03 2008 -0800
+
+    dapl: add provider vendor revision data in private data with reject
+    
+    Add 1 byte header containing provider/vendor major revision
+    to distinguish between consumer and non-consumer rejects.
+    Validate size of consumer reject privated data.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 0f71b9be594739a1fba7d74929eacd42a8cee392
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Apr 3 17:06:27 2008 -0800
+
+    dapl: add support for logging errors in non-debug build.
+    
+    Add debug logging (stdout, syslog) for error cases during
+    device open, cm, async, and dto operations. Default settings
+    are ERR for DAPL_DBG_TYPE, and stdout for DAPL_DBG_DEST.
+    
+    Change default configuration to build non-debug.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit bea882ad9b11ac7188628a939f5227e22c914169
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Apr 3 16:23:29 2008 -0800
+
+    dapl: add support for private data in CR reject.
+    
+    Private data support via dat_cr_reject was added to
+    the v2 DAT specification but dapl was never extended
+    to support at the provider level.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit b5b096b6b6949fcb9fa711ab4784f41f1bb87525
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 1 11:02:37 2008 -0800
+
+    dapl: calculate private data size based on transport type and cma_hdr overhead
+    
+    Need to adjust CM private date size based on different transport types.
+    Add hca_ptr to dapls_ib_private_data_size call for transport type
+    validation via verbs device. Add definitions to include iWARP size
+    of 512 and subtract 36 bytes for cma_hdr overhead.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 632af34f0ea15e12b572c656fe2ef561a0ad62b7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Mar 26 17:58:17 2008 -0800
+
+    Remove improperly licensed GETOPT code from dtest source tree.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 88069fdd21f92923388dec7adbde0d1bc334e7c4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 18 15:04:34 2008 -0800
+
+    remove unnecessary assert from dapl_ep_free.
+    
+    dat_ep_free must handle the case where a consumer calls
+    free in CONNECTED or DISCONNECT_PENDING states. After
+    free calls disconnect, there may be a pending event,
+    in which case the providers dapls_ib_qp_free will block
+    accordingly and handle pending events.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit b3f020e5cba765077049a8cf61c4ce5009fa1031
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Fri Mar 14 14:31:40 2008 -0700
+
+    fix openib_scm compiler warning
+    
+    Cast to socklen_t since accept(2) expects an unsigned argument.
+    
+    Makes the openib_scm provider now build successfully when using
+    make VERBS=<provider> (the -Werror flag was causing the build
+    failure)
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 441996f05d3cc8b09c94c166ef736bc50c24de7e
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Fri Mar 14 14:31:34 2008 -0700
+
+    fix provider-specific compiler warnings
+    
+    Initialize ds_array_start_p otherwise the compiler would claim
+    that this variable could be used with an uninitialized value.
+    
+    Makes the uDAPL providers now build successfully when using make
+    VERBS=<provider> (the -Werror flag was causing the build failure)
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 5a710fc43ad004ecb4603db1359abb4a4fcd77e3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 11 09:25:07 2008 -0800
+
+    uDAPL: fix query to adjust max sge for default inline of 64 bytes
+           and include missing max_rdma_write_iov ep_attr field
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit e2c6bf57f78dfebc21e168df01e5876202053e08
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Fri Mar 7 09:39:22 2008 -0800
+
+    uDAT: fix reuse of va_list in debugging mode
+    
+    Make sure we reinitialize the va_list since va_list is undefined
+    if a function traverses the va_list with va_arg.
+    
+    This patch fixes the uDAT debugging case when both stdout and
+    syslog output is wanted.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 4c9cd7a7268c0d8afb5b4d9b31537bc50cac18fe
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Mar 6 15:40:35 2008 -0800
+
+    Add hostname and process id to debug output to aid
+    scale-up and out debug.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 460aa6f089fcdb34d78af1c8391cbecbcc6b0db3
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Sat Feb 23 21:03:21 2008 -0800
+
+    fix reuse of va_list in debugging mode
+    
+    Make sure we reinitialize the va_list since va_list is undefined
+    if a function traverses the va_list with va_arg.
+    
+    This patch fixes the debugging case when both stdout and syslog
+    output is wanted.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit da80af8c76f220508407a2e171c8b28b43b35bf9
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 16:54:45 2008 -0800
+
+    Fix memory leak in provider specific post send/recv if there's
+    more than DEFAULT_DS_ENTRIES iovecs.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit d78ee9f95fbe48f71eb247b01c598994edfa4d17
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:19:42 2008 -0800
+
+    Guarantee NUL termination if hostname gets truncated.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 3484fa0d2b1a5549d83ecc82d89b72bb86f8fe4e
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:19:37 2008 -0800
+
+    Make sure we don't leak the hash table if dapl_hca_alloc fails.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit e4ed56be6bd64684564169d89df7ca30faffdb53
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:19:32 2008 -0800
+
+    Fix memory leak.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 9efd005b185cfd970d2f8c58f05cf2eaae0dcdc8
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:19:27 2008 -0800
+
+    Fix memory leak in error path.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit d971e799bb5385a8c847cf3f863f19854e95c1b2
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:19:22 2008 -0800
+
+    Fix memory leak
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit c21f2f455af7934675a58ff825bed6cf54d457c9
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:19:17 2008 -0800
+
+    Fix memory leak.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit ee46aa47e2a4deeded347fe18bd6321db61c6594
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Feb 15 10:10:01 2008 -0800
+
+    Release 2.0.7
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit f0ca504bc2639cb7a48528d45e9026b54dab3e57
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:46:56 2008 -0800
+
+    uDAT: Make sure we initialize the dictionary entry early enough so that
+    we can base our cleanup decisions on that variable being
+    initialized.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 6b11838043a6012668c7e1a22a869e9e84dc40d6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:46:18 2008 -0800
+
+    uDAT: Make sure we stay within bounds when manipulating the ia_name.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 3eab70b4d34f850661b51dc1b856cd8d672a5cc9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:44:56 2008 -0800
+
+    uDAT: Make sure we stay within bounds when manipulating the ia handle.
+    Fix typo in comment.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 7fe64f10874667062e067efb7ea8c3d385ae90b7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:43:39 2008 -0800
+
+    uDAT: Zero-out memory otherwise we might base our cleanup decisions on
+    uninitialized memory.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit f510e7e8f5b72a6262a7f8b255926cf96c65b654
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Feb 13 20:39:26 2008 -0800
+
+    Modify default configure options to match rpm spec file
+     --enable-debug, --enable-ext-type=ib
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 75273f1a5c599777bb43add93f30563689fdbc10
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 11 15:43:03 2008 -0800
+
+    udapl OFA provider: set listen backlog to default cma backlog max.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 7f173ecd7e18f25bc21a42651603922e7d71f7c7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 11 14:50:33 2008 -0800
+
+    The OFA dapl provider is checking for incorrect return code
+    from rdma_bind_addr and rdma_listen calls. This causes an error
+    to be returned back to the consumer instead of correctly
+    incrementing the seed port and re-calling the OFA provider
+    until a valid port is issued. The seed value (1000) is also
+    incorrect and should start a non-privledged port (1024) to
+    avoid EPERM errors when seeding the starting port value.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 7bcb67ba7c9b37d7c122773f542c7f7f718d4a49
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 4 16:16:10 2008 -0800
+
+    Release 2.0.6 - ChangeLog
+
+commit bead5f36542a8a4c790bda8ecc8dde3e630c15e6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 4 16:14:02 2008 -0800
+
+    Release 2.0.6
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 8c5beb870048aca286f7396549771ccb075c5c1b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 4 16:12:47 2008 -0800
+
+    Fix OFED v2 package to build against and target /dat2/include directory.
+    
+    Prevous patch missed dat_osd.h, dapltest/dtest incorrect.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 42a63bb0271f91541e7b3c3967a9a977ef6660ae
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 4 13:00:45 2008 -0800
+
+    uDAT/DAPL: Fix package to build against and target /dat2/include directory.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit b3294c738d61f44ae4d0888662bdd6b64f6d6b1f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 29 16:34:49 2008 -0800
+
+    Release 2.0.5 - ChangeLog updated
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 356cf91905d39ade06d76ab9ace6203cd7907d93
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 29 16:33:10 2008 -0800
+
+    libdat: rename libdat.so to libdat2.so to coexist with v1 devel
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d9a9f46ee220ec9c479756acc306ed68060a662f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jan 28 13:55:35 2008 -0800
+
+    Release 2.0.4 - README
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 533983cec914a7ecc6829934a56f867d7870e301
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jan 28 12:06:03 2008 -0800
+
+    Release 2.0.4 Changelog
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit bfc5bd4b4190c7302b08c3922c17e2131bfbe605
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jan 28 12:04:18 2008 -0800
+
+    Relase package 2.0.4
+
+commit 95935648f81ac5177ae7120b35e55483902b8c64
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jan 23 16:40:48 2008 -0800
+
+    dapltest does not include definitions for inet_ntoa.
+    At load time the symbol was resolved but with the
+    default definition of int, instead of char*, it caused
+    segfault. Add correct include files in dapl_mdep_user.h
+    for linux.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 3c1bb0e56c14c5ad50876820e25933c1f4c3dde4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jan 23 14:46:30 2008 -0800
+
+    Add freeaddrinfo to deallocate getaddrinfo buffer.
+    Cleanup a few printf messages.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit a4a8ad5eb1b15be19b3a343dee71ad3013d3f4bd
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jan 23 14:25:21 2008 -0800
+
+    Fix for uDAPL v2 using extended operation. After extension completion,
+    the DTO cookie must be checked for type before deallocating to handle
+    inbound immediate data in receive. The sample dtestx client will fail
+    when running loopback if the rdma immediate is received from remote
+    before the rdma immediate request completion fires.
+    
+    Bug causes following dtestx client error:
+    dat_ib_post_rdma_write_immed
+       returned DAT_INSUFFICIENT_RESOURCES : DAT_RESOURCE_MEMORY
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 6dcf1763c153c27c29ba76bac35be4f6935ddd96
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Jan 17 11:30:27 2008 -0800
+
+    WinOF: update dapltest,dtest directories for windows build
+    WinOF: add README.windows
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 9bececbb32dd31d4a3528e8f000a773e5c593430
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Jan 17 11:24:46 2008 -0800
+
+    WinOF: update dtestx for windows build
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 4dc8c5defef0f52da751a1eca4d4f35de911c3c0
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Jan 17 11:23:21 2008 -0800
+
+    WinOF: add build enviroment, cleanup old makefiles
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 5a9e035fa33a6307b3d2b370f64639b14dfca87e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 15 16:59:34 2008 -0800
+
+    WinOF: name collision with ibal verbs ib_cm_handle_t
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 7c5418a781c1dfdb37b09450b5df40363dce84b4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 15 16:06:10 2008 -0800
+
+    dtest: dat_evd_query for correct size
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 6de5e635c01e78bde6e153b727926da900677d52
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 15 16:03:27 2008 -0800
+
+    dapltest: WinOF support.
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+
+commit c680e95b96e57bd8b69b1c73e95730854fcea028
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 15 14:54:57 2008 -0800
+
+    openib_cma: fix cleanup issues in destroy_cm_id
+                add macros to convert SID and PORT
+                fix init/responder settings in accept
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit f8f867e52ffc36a31830dd4003eb2a4b4d265c93
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 15 14:49:54 2008 -0800
+
+    Modifications for WinOF build and endian support for RMR info
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 4c1fc48d2825efcffaa8cdf7efbdd2d41aeb56ab
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jan 15 14:39:18 2008 -0800
+
+    WinOF: DAT_API changes, white space and tab cleanup
+           IBAL provider code added
+    
+    Common code: initialize cookie pool buffer
+                 add dapl extension DTO counter
+                 add get_cqe_op_str debug call
+                 remove excess dbg in evd_dequeue
+                 add dbg assert to sp_search_cr
+                 IBAL provider support _VENDOR_IBAL_
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 68f2ad0af3623dec27b1223aeaca6357348eef4b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 4 08:32:39 2008 -0800
+
+    Windows specific -
+       IBAL support in evd_create
+       Build IB extensions by default
+    Common code -
+       check return status, evd_free, evd_wait
+       add dapl_event_str function
+       definitions for dat_os_library_error, dat_os_ungetc
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d21f36406408245ac979f0b9594e7d1d0b9a3852
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 4 08:32:19 2008 -0800
+
+    Common code -
+       Missing DAT_API defs
+       casting to fix build issues
+       bitmaps for extension debug
+       DAPL_BAD_PTR macro
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 258678a381c6a0170020c48b0ba627e820abd3e7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 4 08:31:59 2008 -0800
+
+    Common code -
+       Add DAT_API definitions for dat_redirection.h, udat_redirection.h
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 87d0b46a0c0f25e8828d7425e0173a0304a23f8b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 4 08:31:27 2008 -0800
+
+    Windows specific -
+       Add dapl_ep fields ibal_cm_handle, recv_disc, sent_disc for IBAL provider
+       Support for direct object on CQ
+       INIT and FINI changes
+       setup dat.conf default path, fix sr parsing
+    Common code -
+       Add Stan Smith as contributor
+       O/S independent dat_os_library_error()
+    
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit b3ba3dc9743baf3bff243e8969edf3395d1118dd
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Dec 11 14:44:24 2007 -0800
+
+    2/2 uDAPL changes to sync common code base with WinOF
+     - add DAT_API to specify calling conventions (windows=__stdcall, linux= )
+     - cleanup platform specific definitions for windows
+     - c++ support
+     - add handle check macros DAT_IA_HANDLE_TO_UL and DAT_UL_TO_IA_HANDLE
+
+commit 92d7eef38877ad472a91e5e9f88e4e49657716bf
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Dec 11 14:43:05 2007 -0800
+
+    1/2 uDAT changes to sync common code base with WinOF
+     - add DAT_API to specify calling conventions (windows=__stdcall, linux= )
+     - cleanup platform specific definitions for windows
+     - c++ support
+     - add handle check macros DAT_IA_HANDLE_TO_UL and DAT_UL_TO_IA_HANDLE
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: Stan Smith <stan.smith at intel.com>
+
+commit 95764c6da28284d29071cf01d1a09bdcb967a971
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Dec 4 13:19:27 2007 -0800
+
+    - Fix size of evd request queue on creation
+    - Add query and checking of DTO request queue
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 9bc97e65c1240224d7dc9d6ac9a48e7aed199ee6
+Merge: 11a165a... abb4356...
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Nov 27 13:31:32 2007 -0800
+
+    master_dat2.0_merge
+
+commit abb4356cd765d38cf5cff2dfbdb610b380f944a2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Nov 20 12:10:39 2007 -0800
+
+    Release 2.0.3
+
+commit d2c66eb7363234c5a9fb82aa92df1c132e46477e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Nov 20 12:07:58 2007 -0800
+
+    - Lower default settings (rdma ops, inline sends) for latest iWARP/IB devices
+    - Add missing ia_query for max_iov_segments_per_rdma_write
+    - Cleanup CMA code no longer supported by rdma_cm
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 3a3519167bd65bd999424788f139b930b099b405
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Nov 19 15:26:44 2007 -0800
+
+    Change dapltest timers to use gettimeofday instead of get_cycles for better portability.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 11a165a1868b1748fe476e08fc40af620f961cd2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Oct 31 10:58:51 2007 -0800
+
+    - DAT/DAPL Version 1.2.3 Release 1
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit bc2d39a78e31c5e9463c8fa16f0ecaf49f75a15f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Oct 31 10:55:48 2007 -0800
+
+    ChangeLog update
+
+commit 7d3ec3d68a756f895a6c6ba8ed3d7a1d602468e9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Oct 31 10:55:05 2007 -0800
+
+    - DAT/DAPL Version 2.0.2 Release 1
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 43931378b9d4f5f721da828623f1e391f32f446b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 30 09:06:24 2007 -0800
+
+    - Add ChangeLog
+    - update cma provider to report remote and local ports via dat_ep_query.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit a65da8a86ed637bacc32e3518d6c37eeb3b496bf
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Oct 25 14:37:14 2007 -0700
+
+    Fix dapltest endian issue with mem_handle, mem_address.
+    
+    Signed-off-by: Shirley Ma <xma at us.ibm.com>
+
+commit 8196f1655fe6088c66dafa6ad8e4474ea8ebe1d9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Oct 25 14:36:12 2007 -0700
+
+    Fix dapltest endian issue with mem_handle, mem_address.
+    
+    Signed-off-by: Shirley Ma <xma at us.ibm.com>
+
+commit 39667dbb0160d395fb20eb53a1b4e995e2e623dd
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 16 14:23:17 2007 -0700
+
+     Fix dtest to build properly with extensions.
+    
+     Modify dat.h dat_event to include event_extension_data[8].
+     Extend struct dat_event outside of extension build
+     switch to enable non-extended applications to work
+     with extended libraries. Otherwise, there is a potential
+     for the event callee to write back too much event data
+     and exceed callers non-extended event buffer.
+    
+     Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d7134fb2bcad6f4f68410af997f8791edd788cfb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 16 14:10:52 2007 -0700
+
+        Use inet_ntoa instead of open coding it. IP addresses were being
+        reversed on PowerPC.
+    
+        On PowerPC the timebase ticks at a different frequency to the CPU.
+        dapltest currently assumes a 1:1 relationship, and gives bogus values
+        when scaling timebase to real time.
+    
+        To fix this, look at the timebase field in /proc/cpuinfo instead. To
+        keep things consistent with x86, scale that value to MHz.
+    
+        Signed-off-by: Anton Blanchard <anton at samba.org>
+
+commit c6710c291a4f7c0845a4535767d41d66f092fabf
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 16 14:09:56 2007 -0700
+
+    Use inet_ntoa instead of open coding it. IP addresses were being
+    reversed on PowerPC.
+    
+    On PowerPC the timebase ticks at a different frequency to the CPU.
+    dapltest currently assumes a 1:1 relationship, and gives bogus values
+    when scaling timebase to real time.
+    
+    To fix this, look at the timebase field in /proc/cpuinfo instead. To
+    keep things consistent with x86, scale that value to MHz.
+    
+    Signed-off-by: Anton Blanchard <anton at samba.org>
+
+commit 9446029979a55e6e477fb31cfdf9ce0dc77ffa8f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 16 14:02:36 2007 -0700
+
+     Minor clean-up of cr/lf
+    
+     Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 33fd0628497911df11dea640aea4660e54989ed6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 16:01:37 2007 -0700
+
+    Final changes for 2.0.1-1 package, OFED 1.3 ALPHA
+    Fix build issue with SLES 10, gcc++ compiler
+    
+     Signed-off-by: Jimmy Hill <jimmy.hill at us.ibm.com>
+     Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit bc5f16991d75ff9d09e3e3a3cc8c2d6801a9d61f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 14:50:02 2007 -0700
+
+    Final changes for package 1.2.2-1, OFED 1.3 ALPHA
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 52bc16939e87587f8208e775dd061f54196a9acb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 11:58:46 2007 -0700
+
+    Change v2 dat.conf provider names to associate with ib net devices
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d22e62f989dd16d503d5430ffe6f55075139e057
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 11:43:34 2007 -0700
+
+    Change DT_Mdep_GetTime to use gettimeofday() which has more resolution
+    than times().
+    
+    Signed-off-by: Anton Blanchard <anton at samba.org>
+
+commit a64eae5bd36598a5c93010e07869e95599aa8ceb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 11:41:40 2007 -0700
+
+    Change v2 dat.conf provider names to associate with ib net devices
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 870764dfad8df0ffe6d3d449e7a8e296cfee8ef5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 11:35:21 2007 -0700
+
+    Change DT_Mdep_GetTime to use gettimeofday() which has more resolution
+    than times().
+    
+    Signed-off-by: Anton Blanchard <anton at samba.org>
+
+commit 66bf23e3e53f370c92803f162144947f29ce06d8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 11:30:15 2007 -0700
+
+    Change DT_Mdep_GetTime to use gettimeofday() which has more resolution
+    than times().
+    
+    Signed-off-by: Anton Blanchard <anton at samba.org>
+
+commit c220760bbb1f6357b6e187ff6c5e576dd74fd504
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 2 10:39:09 2007 -0700
+
+    Fix dapl to compile as both 32bit and 64bit on PowerPC. Instead of using
+    the kernel atomic routines, code them explicitely like x86 does.
+    
+    Signed-off-by: Anton Blanchard <anton at samba.org>
+
+commit 9ffdf3722e5a9cde3fd6add5d7b3940a7ea9f71f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Sep 28 17:04:54 2007 -0700
+
+    Clean up packaging, modify dat.conf for v2.0 cma provider name change to ofa
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 493e65b5b47f47e4824f775959fd98e56aeaccc4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Sep 28 17:03:41 2007 -0700
+
+    Clean up packaging, modify dat.conf for cma provider name change to ofa
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 99f0a0bf0a0d99fee0729fba0fcdf6f3e89e2ec4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Sep 20 12:25:55 2007 -0700
+
+      Modifications to coexist with 2.0 libraries
+         - fix RPM specfile, configure.in,  1.2.2 package
+         - modify dat.conf
+    
+        Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 7ff4a8a8e861b0701b5b2a6fc95e6aa8b36d2662
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Sep 20 10:55:19 2007 -0700
+
+    Modifications to coexist with 1.2 libraries
+     - cleanup CR-LF in dtestx
+     - fix RPM specfile, 2.0.1 package
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 230767742b8287490373c09d1bd346337b375b48
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jun 22 11:48:20 2007 -0700
+
+    Update copyright in specfile
+
+commit 5294cbe5e58f67d0a98862edea3684fff6e773bb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jun 22 11:47:14 2007 -0700
+
+    Update Copyright in specfile
+
+commit 3654c6ef425f94b9f27a593b0b8c1f3d7cc39029
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 6 13:20:38 2007 -0700
+
+    Update specfile to reflect DAT/DAPL 1.2.1 release
+
+commit babb95eff1bcef88bed46e92c323193d8f039eff
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 6 11:48:07 2007 -0700
+
+    More changes to the release notes
+
+commit 0f299bf1deb9198b2f008c3ffa717bef252b6097
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jun 5 15:56:17 2007 -0700
+
+    Update release notes
+
+commit ad70f98a228ade4a863ca349990eaa7ab1e82ec2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jun 5 15:52:18 2007 -0700
+
+    Add release notes updated for OFED 1.2 release
+
+commit f332badb80f0b1d88bf2d70dba0c90afc40f088f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu May 31 12:43:28 2007 -0700
+
+    Add provider specific interface to uDAPL for extensions support.
+    Fix memory leak with extensions, missing cookie deallocation when processing extended DTO events
+    Remove unnecessary check on dats_set_ia_handle in dat_ia_openv
+    Clean up specfile and some extra LF's
+
+commit 4d7e30586402149228a30bea3036466395577ec4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed May 16 12:56:39 2007 -0700
+
+    add iwarp extension include file
+
+commit d9963cc9984c06f147b92877945e847f657cd512
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed May 16 12:52:38 2007 -0700
+
+    clean up some CR's in include files
+
+commit 80f4e8c4be02bac5d472e1e6c4937079882a0388
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed May 9 16:21:16 2007 -0700
+
+    Take out references to specific 1.1 verbs definitions (ibv_comp_channel).
+
+commit 544fbb873d5320e9606f176c4b71bcba0e257d7d
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed May 9 12:51:53 2007 -0700
+
+    Bug Fixes:
+    	- 606: Return local and remote ports with dat_ep_query
+    	- 585: Add bonding example to dat.conf
+
+commit e64079f7b961aa9a672711f0e933a77f3999d302
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon May 7 15:54:59 2007 -0700
+
+    Update dapltest to use default device OpenIB-cma
+    Fix dapltest manpage, example for performance test wrong
+
+commit 7cda2304a6880371ec2d9451a4f83a7a254bc474
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon May 7 12:49:18 2007 -0700
+
+    Fix issues with IB DTO extensions
+     - debug print_cqe updated for latest IBV definitions
+     - dapli_evd_cq_to_event modified to handle both post and receive extensions
+     - dtestx example tested with rdma_write_imm, fetch_add, and cmp_swap
+     - modify cookie DTO types to support extensions properly
+
+commit 82a6750d31cd432c7e09298fc98c0e7e74abd012
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri May 4 17:17:41 2007 -0700
+
+    Add new dapl functions for 2.0 (stubs for now)
+    - dapl_ep_post_send_invalidate
+    - dapl_ep_post_rdma_read_to_rmr
+    - dapl_ia_ha
+    - dapl_csp_create, query, free
+    - dapl_cno_trigger
+    - dapl_cno_fd_create
+    - dapl_extensions
+    
+    Add new 2.0 parameters to existing API's
+    - dapl_cr_reject
+    - dapl_rmr_bind
+
+commit 8679aaf56c781715adc132a38a731e36194570f1
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu May 3 09:44:43 2007 -0700
+
+    update dtestx.c, default provider OpenIB-cma
+
+commit 527f6d19125e9eec7ecef03a8633626b0043a2f4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed May 2 17:27:44 2007 -0700
+
+    Added IB extensions and dtestx as an example program using
+    rdma write with immediate and atomic operations
+
+commit 83ac961b505346708f12d59152146f3b04c8306f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 30 10:55:59 2007 -0700
+
+    Fixes atomic operation build problem with ia64 and RHEL5.
+
+commit 04da88bb70ee33b249a4cf2f5a92122eeec83e3c
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Apr 26 17:29:37 2007 -0700
+
+    Update README and dapltest manpage
+
+commit 9a951d0a8713657da90568c0613eb48f5010cf1e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 3 16:35:17 2007 -0700
+
+    Cleanup RPM specfile for the dapl package, move to 1.2-1 release.
+
+commit a93f0ffcd6a46735c97ec34de564a7a91f9fc5c2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 3 14:38:31 2007 -0700
+
+    Add support for multiple IB devices to dat.conf to support IPoIB HA failover.
+
+commit 5434b720b36de2f262a02ff9dfccd99953c09e59
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Mar 15 10:46:33 2007 -0800
+
+    Fix ia64 builds on SUSE
+
+commit b0f9eef1aa7f279802da233480cf6c495e16565b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Mar 14 13:29:08 2007 -0800
+
+    DAT 2.0 support for new DAT_VA_TYPE added to uDAPL and openib-cma provider
+
+commit 61858b925f4c1a6f9edba6389a5bd601daf936e9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Mar 14 11:08:19 2007 -0800
+
+    change DAT_VERSION major and minor numbers to 2.0
+
+commit 6dcb2e083bda8f2521bd3515b329c5465e1ac724
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Mar 14 10:43:56 2007 -0800
+
+    add provider support to dtest, set default to OpenIB-cma
+
+commit ff8eb667c1000be6c68ca291e7ed7bd080cb73f4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 13 16:20:20 2007 -0800
+
+    add provider option to dtest, set default to OpenIB-cma
+
+commit 76a43cace54567135bac7ae54e336c6595b65fd9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Mar 9 13:09:14 2007 -0800
+
+    Initial build with DAT 2.0 definitions and IB extensions. IB extensions configurable with --enable-ext-type=ib
+
+commit 921687efed992e6ab72dfb731687b6816324a024
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Mar 8 16:01:29 2007 -0800
+
+    Update the README
+
+commit 52ed210ae99b291f72441e71459006b5f2c851ce
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Mar 7 15:34:41 2007 -0800
+
+    - Fix bug 408, dapltest compilation failure on 32 bit arch
+    - Update libdat.spec.in file to build uDAPL RPMs correctly
+
+commit e3f6aca57a8fa5cbaaf872bf6844feb7d5e1e66c
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Mar 5 14:15:49 2007 -0800
+
+    Fix build issues with dtest and dapltest. Define build tree path to dat/include.
+
+commit f1f829a28e645831c3bcd1eb2d465fcb7a1fd5d8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Feb 28 17:14:55 2007 -0800
+
+    Add dapltest headers to EXTRA_DIST
+    Modify dtest to delay before accepting
+    
+    Signed-off-by: Vladimir Sokolovsky <vlad at mellanox.co.il>
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 46b830a4664d5fee2daf1ebdc4e95ecb7c580e80
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 26 13:54:15 2007 -0800
+
+    Adding dtest and dapltest to the build. Manual pages created.
+
+commit d245664e27148e54469268ad81f41b2a894a131a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 19 16:21:30 2007 -0800
+
+    uDAPL changes to support exchanging and validation of the device responder_resources and the
+    initiator_depth during connection establishment
+
+commit 2280f833090aa9f750d5be8f9b06e7e08e642da5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Dec 6 11:49:27 2006 -0800
+
+    Update cma provider to sync with rdma_ucm changes
+
+commit 89448545b415b6dff57e3314b020619f6b979ef8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Dec 4 13:54:20 2006 -0800
+
+    Update autogen to create config directory
+
+commit 0a917b104eba0aae6c6ef49c7990a2dc7efc759d
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Tue Nov 7 20:22:05 2006 +0000
+
+    r10074: Added support for new ib verbs client register event. No extra processing required at the uDAPL
+    level.
+    
+    Fix some issues supporting create qp without recv cq handle or recv qp resources. IB verbs assume a
+    recv_cq handle and uDAPL dapl_ep_create assumes there is always recv_sge resources specified.
+    
+    Fix some timeout and long disconnect delay issues discovered during scale-out testing. Added support
+    to retry rdma_cm address and route resolution with configuration options. Provide a disconnect call
+    when receiving the disconnect request to guarantee a disconnect reply and event on the remote side.
+    The rdma_disconnect was not being called from dat_ep_disconnect() as a result of the state changing
+    to DISCONNECTED in the event callback.
+    
+    Here are the new options (environment variables) with the default setting:
+    
+    DAPL_CM_ARP_TIMEOUT_MS   4000
+    DAPL_CM_ARP_RETRY_COUNT  15
+    DAPL_CM_ROUTE_TIMEOUT_MS  4000
+    DAPL_CM_ROUTE_RETRY_COUNT 15
+
+commit c73aeb904504a0bc6cce0fb1248af9ba39521395
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Thu Oct 12 22:41:33 2006 +0000
+
+    r9802: Remove Socket CM provider from build and dat.conf configuration. No longer needed nor supported.
+
+commit b1d94b26610f682cdd43bde2aecf5004e0865422
+Author: Steve Wise <swise at opengridcomputing.com>
+Date:   Tue Sep 12 18:15:39 2006 +0000
+
+    r9442: Update obsolete CLK_TCK to CLOCKS_PER_SEC
+    Signed-off-by: Steve Wise <swise at opengridcomputing.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 99a5dddd07d4c271ebb075b5b0f800101f850a56
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Thu Sep 7 18:09:11 2006 +0000
+
+    r9346:
+    inadvertently added evdtest to makefile when testing dat_evd_set_unwaitable fix with openib_cma provider
+
+commit b53a87c856d9754313da9543a1dac5c6f1307085
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Wed Sep 6 20:36:09 2006 +0000
+
+    r9315:
+    Fill out some unitialized fields in the ia_attr structure
+    returned by dat_ia_query().
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: Robert Walsh <robert.walsh at qlogic.com>
+
+commit b6c4e84399d0aa44c72c6ca870409c3666d7e79b
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Fri Aug 11 20:44:23 2006 +0000
+
+    r8895: Update dtest to support multiple segments on rdma write and change makefile to use OpenIB-cma by default.
+
+commit 4737c63d79b23c3aff329e864dd50e3cffb6a17f
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Wed Jul 19 17:15:06 2006 +0000
+
+    r8592: Add support for dat_evd_set_unwaitable on a DTO evd in openib_cma provider
+
+commit 25fb8c376547de895a170194c09b2d72dfea789d
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Mon Jul 17 22:59:17 2006 +0000
+
+    r8565: Added errno reporting (message and return codes) during open to help diagnose create thread issues.
+
+commit f3a1ed6232ccdee7d193e8e3b9b0013b2bd222af
+Author: Anton Blanchard <anton at samba.org>
+Date:   Mon Jul 17 21:26:03 2006 +0000
+
+    r8562: Fix some suspicious inline assembly:
+    - EIEIO_ON_SMP and ISYNC_ON_SMP are in kernel UP build optimisations, we
+      shouldnt export them to userspace. Replace it with lwsync and isync.
+    - The comment says its implemenenting cmpxchg64 but in fact its
+      implementing cmpxchg32. Fix the comment.
+    
+    Signed-off-by: Anton Blanchard <anton at samba.org>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 63759108a1376b6e45a4491551f71d8cafdcddc1
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Jul 12 14:56:26 2006 +0000
+
+    r8503: Fix IA64 build problems reported by John Partridge <johnip at sgi.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 51362c9781cb65fd8f9a3cb5b7c12c88e4c8527a
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Thu Jun 22 22:02:56 2006 +0000
+
+    r8182: Lower the reject debug message level so we don't see warnings
+    when consumers reject.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit f14889bb0cd22e897148ea2f6931a6b4f23143b0
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Thu Jun 22 21:13:37 2006 +0000
+
+    r8181: Added support for active side TIMED_OUT event from a provider.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 14fc704ae20b6a3ad0d433d7de9c02ce99e095b3
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Thu Jun 22 20:58:06 2006 +0000
+
+    r8180: Fix bug in dapls_ib_get_dat_event() call after adding new unreachable event.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 893698c31a0d8e60227806d992485a44375840cb
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Jun 19 17:20:45 2006 +0000
+
+    r8112: Update for new rdma_create_id() function signature.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 53483d84b0d02c432d9435d2f8e840cab3ded320
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Wed Jun 14 16:17:39 2006 +0000
+
+    r8008: Set max rdma read per EP attributes
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 6cb854cd72d9492ddc1c5da01dbfb24b3f30af83
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Mon Jun 12 15:42:50 2006 +0000
+
+    r7931: Report the proper error and timeout events.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 44a97ff1f599f4bf882a801ead7aa495ea9ba936
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Mon Jun 12 14:51:14 2006 +0000
+
+    r7928: Socket CM fix to guard against using a loopback address
+    as the local device address.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 152219cf83c61e459fdf3de03d4e83ddba045230
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Tue Jun 6 21:46:44 2006 +0000
+
+    r7755: Use the uCM set_option feature to adjust connect request timeout
+    and retry values. Also, a fix to disallow any event after a disconnect
+    event.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 3a0686a2624ed28c7ea37b650415801f1cedbd10
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed May 31 19:55:57 2006 +0000
+
+    r7608: Correct comment.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit eb760157c90f59183b424ac8e71474fe0b46094c
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu May 18 21:54:12 2006 +0000
+
+    r7347: Undo inadvertent change.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 27256222b42fecfac8a44b3f82fe2524ecc72de2
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu May 18 21:50:27 2006 +0000
+
+    r7346: Fix for uCMA provider to return the correct event as a result of
+    rejects. Also, ran into a segv bug with dapl_ep_create when
+    creating without a conn_evd.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit b1b6e16f3e41e123cd347bc78b01e3272076362b
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Fri May 12 19:50:19 2006 +0000
+
+    r7141: Update the uDAPL openib_cma provider to work with the new
+    uCMA event channel interface.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 27f9f0c106662cc7b41bcb747495860a1b6c7133
+Author: Steve Wise <swise at opengridcomputing.com>
+Date:   Tue May 2 21:33:35 2006 +0000
+
+    r6873: Transaction test change to comply with the iWARP MPA protocol's
+    "Connection Startup Rules".
+    Signed-off-by: Steve Wise <swise at opengridcomputing.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 060d09f974ffbe73672e17641b2f18d3821d31a7
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Fri Apr 28 13:44:17 2006 +0000
+
+    r6736: getaddrinfo() fix for debug builds and some additional debug messages for
+    connect errors and rejects.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 4e8b95bbeaf6e5c27de59ef347ec2ef0aa2e5e6b
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Apr 19 16:49:34 2006 +0000
+
+    r6520: Fix compilation warning.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 115fcc396164066326f9447d71af798a381d063f
+Author: Steve Wise <swise at opengridcomputing.com>
+Date:   Wed Apr 19 16:32:01 2006 +0000
+
+    r6518: Do not always generate an event for an abrupt disconnect.
+    Signed-off-by: Steve Wise <swise at opengridcomputing.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit f959bb786cd884bf4d2a5da4d299da6297d65293
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Apr 19 16:30:37 2006 +0000
+
+    r6517: Generate a disconnect event for providers that do not generate
+    one automatically.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit bb467511cf6e217147817ba12bbe800aae97cab5
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Apr 19 16:25:33 2006 +0000
+
+    r6516: Fix compilation error.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 117a9856c269bf08b738a1923c92f5a1949f6cc1
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Apr 10 20:16:44 2006 +0000
+
+    r6392: Fix for RDMA cm id destruction and debug builds.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 5f56b2b7339c17276188464dfff12b1be9e1dbb7
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Apr 6 15:32:47 2006 +0000
+
+    r6289: Set max_iov_segments_per_rdma_read and max_rdma_read_iov using the correct
+    attribute.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 304f48370adcaa12463c1a7d99e513164b83810c
+Author: Steve Wise <swise at opengridcomputing.com>
+Date:   Thu Apr 6 15:16:10 2006 +0000
+
+    r6286: Set the IA attribute max_iov_segments_per_rdma_read and the EP attribute
+    max_rdma_read_iov based on the openib max_sge_rd device attribute.
+    Signed-off-by: Steve Wise <swise at opengridcomputing.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit fe27222d2a00d7c5c4d98f39d2926fe14c7f32bc
+Author: James Lentini <jlentini at netapp.com>
+Date:   Tue Apr 4 18:29:00 2006 +0000
+
+    r6221: Change the mechanism by which library init and fini functions are specified
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 5a0598b90ab021cb2115e3791cb38dcfc0347948
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Apr 3 17:29:55 2006 +0000
+
+    r6182: Remove unused variables.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit b8084c4edc21b5ac2191ec654a882b65bad0c77d
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Apr 3 15:29:30 2006 +0000
+
+    r6179: Fix dapltest compiler warnings.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit abdbec194670d72012d481b98b2e6f728e9c5b48
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Apr 3 14:08:48 2006 +0000
+
+    r6168: Fixed debug prints of 64-bit values and removed compile warnings.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 52de2a35e02ddeb15887d0d690b52a4e02812e57
+Author: James Lentini <jlentini at netapp.com>
+Date:   Tue Mar 21 22:28:10 2006 +0000
+
+    r5939: Move libdat.spec to libdat.spec.in
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 6b1a6356a1757ae9b9d1557bd2ae67e0913d04c2
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Fri Mar 17 22:02:18 2006 +0000
+
+    r5879: Add GNU Autotools support and an RPM spec file
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 9d00582b8be33add8d3e4173e8311b1a222b0b34
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Thu Mar 16 22:40:18 2006 +0000
+
+    r5871: Fixes a corner case where a CMA event was not acknowledged during
+    disconnect processing.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit ede1d714a8e7ae99246eb382c1c1165f238cf7c3
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Mar 13 18:15:49 2006 +0000
+
+    r5789: Reduces some debug output in the async thread and fixes listen
+    processing of EBUSY.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit afd558cbdada66e01aa553364b9a126da00dbe65
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Wed Mar 8 14:24:26 2006 +0000
+
+    r5684: Remove unused NO_EP_STATE.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 4c36aca16b9b492a91c0b05002af5fc954f3b44e
+Author: James Lentini <jlentini at netapp.com>
+Date:   Tue Feb 28 15:41:03 2006 +0000
+
+    r5529: Fix to destroy QPs in all cases and close the HCA.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit 5874fdb26436c58365a7096b9b68c8e45a51d7a3
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Jan 9 20:17:33 2006 +0000
+
+    r4855: Make use of dat_evd_wait the default.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 254bd0e349bafbd970d6475efcafd7e52f05415e
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Mon Jan 9 16:59:38 2006 +0000
+
+    r4852: Fix disconnect event processing and update dtest to validate.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit f69d737ee51f6b00a1e6cf8531695a61a322651b
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Fri Dec 16 02:03:05 2005 +0000
+
+    r4502: Query for rd_atomic values.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 86566b556920a51f1e538d245674058682012668
+Author: James Lentini <jlentini at netapp.com>
+Date:   Fri Dec 16 01:57:30 2005 +0000
+
+    r4501: Allow a network name, network address, or device name in the dat.conf file.
+    Singed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 9e0ca3d4ccb92b9c0337efbadce405076a365f0f
+Author: Roland Dreier <rolandd at cisco.com>
+Date:   Wed Dec 14 20:44:36 2005 +0000
+
+    r4466: Change libibverbs API for listing all known devices from
+    ibv_get_devices() to ibv_get_device_list(), and update all
+    in-tree uses of this API.
+    
+    Signed-off-by: Roland Dreier <rolandd at cisco.com>
+
+commit 73a80143ab7b3f9aad19f84f904f99b489dca6cf
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Dec 5 16:37:46 2005 +0000
+
+    r4308: Fix a gcc 4.0 warning
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit aa8b16b7e83f321eaaa18b38e6c165c2f120bcec
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Thu Dec 1 15:03:10 2005 +0000
+
+    r4279: Added CMA API support.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 74d3c32e42ab54f3d6f2eec3d0a66d08f800e075
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Nov 10 21:39:34 2005 +0000
+
+    r4018: Fixed some problems with the free build openib_scm version and turned
+    down some debugging and added some debug prints for uAT path records.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit 70a2f23c5604e55f8f76672f78b4bf92f6a79b98
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Oct 31 18:27:13 2005 +0000
+
+    r3917: Fix printing of debug statements.
+    Signed off by: Aniruddha Bohra <bohra at cs.rutgers.edu>
+    Signed off by: James Lentini <jlentini at netapp.com
+
+commit 4306debe3118948fca72a68ec20ef0d73b399fd1
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Oct 26 21:10:26 2005 +0000
+
+    r3882: uDAPL provider for OpenIB socket CM.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit 42a64ec2ec1d8ec71492bfebba077b006684ce97
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Oct 13 20:45:22 2005 +0000
+
+    r3774: Fix the async error handling and callback mappings.
+    Updated TODO list.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit fea8ed1188fbeef8291cfd7e681cd48c06ff5bde
+Author: Robert Walsh <rjwalsh at pathscale.com>
+Date:   Fri Oct 7 21:15:00 2005 +0000
+
+    r3693: Update some more ignores.
+
+commit 303147143afa9aa72906246a9f1973e4172f75b8
+Author: Todd Bowman <twbowman at gmail.com>
+Date:   Thu Oct 6 21:13:32 2005 +0000
+
+    r3687: Add PPC64 support for udapl
+    Signed-off-by: Todd Bowman <twbowman at gmail.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 103c7db321e24a7b5b06c7c26b0e0a65d1dd11ce
+Author: Todd Bowman <twbowman at gmail.com>
+Date:   Thu Oct 6 15:22:08 2005 +0000
+
+    r3683: Remove the dtest qualifier from the sdp range.
+    Signed-off-by: Todd Bowman <twbowman at gmail.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 33fbf9c81ac29492394e419588d856533e7fffb8
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Oct 3 14:59:22 2005 +0000
+
+    r3637: Support CQ_WAIT_OBJECT with channels and sync with latest verbs.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit f01dac62b08d8f4fd417c336be48fb3bc8cd15c5
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Sep 29 18:13:25 2005 +0000
+
+    r3619: Makefile fix.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 634b199218b775a8ed071c1faea519c4cc4ee4e3
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Sep 28 21:50:13 2005 +0000
+
+    r3606: Fixes IA64 build problems (atomics) with the latest Redhat EL4.0 update and
+    adds support for SuSe.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit 3a23c7135905666ff969b86dab3e90f90ac73008
+Author: Robert Walsh <rjwalsh at pathscale.com>
+Date:   Tue Sep 27 16:59:14 2005 +0000
+
+    r3567: Setup svn:ignore on a bunch of directories.
+
+commit d41ea62125636a58e8748871e372810c09865b0a
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Sep 22 21:24:38 2005 +0000
+
+    r3525: Improve dtest and measure RDMA reads
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 32258d13af6aaf76078ec6ba187d8129a0f70397
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Sep 21 19:54:07 2005 +0000
+
+    r3513: Temporary workaround for the RDMA read performance anomaly
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit 990bdc4320809e0b989c90c24bef361c1bc91c7f
+Author: James Lentini <jlentini at netapp.com>
+Date:   Tue Sep 20 17:00:37 2005 +0000
+
+    r3494: Moved dapl_evd_modify_cno.c to match SourceForge
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 4509fb64fdbf99db7bdcaad4d8e3884718184d86
+Author: James Lentini <jlentini at netapp.com>
+Date:   Tue Sep 20 16:17:59 2005 +0000
+
+    r3493: Support ib_cm_init_qp_attr(), add cm event processing on a per
+    device basis, and add copyrights for kDAPL cm work that was
+    used in uDAPL.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit c1d45137c2e26024142f24207344e3e48a577b83
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Thu Sep 15 21:43:21 2005 +0000
+
+    r3453: Bind communication identifiers to a device to support device removal.
+    Export per HCA CM devices to userspace.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit 5146689f1dbbce01cc46e23d749c28828e7e3ca8
+Author: James Lentini <jlentini at netapp.com>
+Date:   Wed Sep 14 17:44:44 2005 +0000
+
+    r3432: Request address resolution using ATS.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 780b8237f2bf6884cf1abcc11190f97ed5c0a343
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Sep 12 19:14:43 2005 +0000
+
+    r3378: Added DAPL documentation.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 8911b60eb16770d28907c14e45556444317dd276
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Sep 12 19:10:13 2005 +0000
+
+    r3377: Removed executable premission.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit dec4d2eafebdfe7e6b495a36dd16bd5a98417e04
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Fri Sep 9 21:51:58 2005 +0000
+
+    r3349: Update DAPL to match the verbs and CM event processing APIs.
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit d06dcfd25e5d37310d089bcb7f3d3d75fcece75a
+Author: Arlin Davis <ardavis at ichips.intel.com>
+Date:   Tue Sep 6 19:34:46 2005 +0000
+
+    r3326: Changes to support async events. Also consolidated the uAT,uCM,uCQ threads into one processing thread.
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 1dd8c28ce515675ee8df37cc1596bca17587eaf6
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Aug 29 15:07:44 2005 +0000
+
+    r3232: validate default settings so they don't exceed device maximums
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit ac5308b4aac7de79a356439dfec2312faf7705ae
+Author: James Lentini <jlentini at netapp.com>
+Date:   Mon Aug 29 14:15:23 2005 +0000
+
+    r3227: Support for ibv_query_port, device, and gid.
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit ef8c7a3a4896487ff0d37a7d7234746c15fe5cf7
+Author: Sean Hefty <sean.hefty at intel.com>
+Date:   Sun Aug 21 22:30:08 2005 +0000
+
+    r3143: - Add user specified context to all uCM events.  Users will not retrieve
+      any events associated with the context after destroying the corresponding
+      cm_id.
+    - Provide the ib_cm_init_qp_attr() call to userspace clients of the CM.
+      This call may be used to set QP attributes properly before modifying the QP.
+    - Fixes some error handling syncrhonization and cleanup issues.
+    - Performs some minor code cleanup.
+    - Replaces the ucm_simple test program with a userspace version of cmpost.
+    - Updates DAPL to the new API.
+    
+    Signed-off-by: Sean Hefty <sean.hefty at intel.com>
+
+commit ec0f86d7c55830c6dffded585c04754cc6ac2a83
+Author: James Lentini <jlentini at netapp.com>
+Date:   Tue Aug 16 14:10:13 2005 +0000
+
+    r3107: Removed unused debug counter macros
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 49087ba27bd93769bb64d7ac5c454de1b94005bc
+Author: James Lentini <jlentini at netapp.com>
+Date:   Tue Aug 16 14:07:42 2005 +0000
+
+    r3106: Implemented debug counters
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+    Signed-off by: James Lentini <jlentini at netapp.com>
+
+commit f98e3af7dfc56b288cc77a9103b90f8d6a927fc5
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 20:23:56 2005 +0000
+
+    r3072: Update from SourceForge DAPL: use the LMR context in calls to
+    dapls_hash_remove()
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 878e524c5cc63a62802d28fdc215a2b69ceb1141
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 20:07:06 2005 +0000
+
+    r3071: Updates from SourceForge DAPL: EVD updates
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 8dc70f7d972615f40e624d8f1272e5e7c16ba34f
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 19:57:40 2005 +0000
+
+    r3070: Update from SourceForge DAPL: set async evd to null in dapli_ia_release_hca
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit f2801ae6caf010d660fe302970dabddc8948e1bf
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 19:46:39 2005 +0000
+
+    r3069: Updates from SourceForge DAPL: size EP IOV correctly
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit c87fd235eaf0b3a30e005422f7d347c406c14f2c
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 19:35:05 2005 +0000
+
+    r3068: Update from SourceForge DAPL: removed duplicate ia pointer in SP structure and
+    fixed the spelling of ib_hca_transport_t.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit a88bebc09a9655e462b3d32dfddec823024eab59
+Author: James Lentin <jlentini at netapp.com>
+Date:   Thu Aug 11 19:24:56 2005 +0000
+
+    r3067: Update from SourceForge DAPL: use include guard
+    Signed-off-by: James Lentin <jlentini at netapp.com>
+
+commit d2da08920de882a9a266f0606b81150c625fa003
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 19:21:56 2005 +0000
+
+    r3066: Update from SourceForge DAPL: optimization to dapl_ep_query
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 4ca3b0cbc59227a90b5450eea1ffeeb91826dd6d
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 18:39:34 2005 +0000
+
+    r3065: Update from DAPL SourceForge: indicate which handle is invalid
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 6d8f34137776c32149251bdec493c017b399cd10
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 18:35:58 2005 +0000
+
+    r3064: Update from DAPL SourceForge: set ep param values.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 0f35002a1942303ff46cb9a2b70056f9a38aebdb
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 18:33:47 2005 +0000
+
+    r3063: Updates from DAPL SourceForge: QP state and connection event fix.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 3fc876339693c6f0eed5e57780e5342f301bd95c
+Author: James Lentini <jlentini at netapp.com>
+Date:   Thu Aug 11 18:23:33 2005 +0000
+
+    r3062: Update from DAPL SourceForge: remove unused DAPL_CNO_PROXY_CALL
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 70f8e7a2e6bde4e757ddc8c7f59d3a5c6a13adf9
+Author: Hal Rosenstock <halr at voltaire.com>
+Date:   Fri Aug 5 17:59:38 2005 +0000
+
+    r2989: Fix dtest makefile
+    Signed-off-by: Hal Rosenstock <halr at voltaire.com>
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 864695cfef37d84359ada8838ab4cd4f4dafc6bb
+Author: James Lentini <jlentini at netapp.com>
+Date:   Fri Aug 5 17:57:31 2005 +0000
+
+    r2988: Remove kernel directory.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 9c4e246a5baf43cadc6380e91fd5a6e319777278
+Author: James Lentini <jlentini at netapp.com>
+Date:   Fri Aug 5 17:56:56 2005 +0000
+
+    r2987: Remove kernel code directory.
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 26706cb0de471ba47279de0cb949ba5a41de82cc
+Author: James Lentini <jlentini at netapp.com>
+Date:   Fri Aug 5 16:41:12 2005 +0000
+
+    r2986: Add uDAPL to the trunk
+    Signed-off-by: James Lentini <jlentini at netapp.com>
+
+commit 76aa2de7fe38a8595d88669842450084cfa88316
+Author: Roland Dreier <roland at topspin.com>
+Date:   Thu Nov 4 17:54:50 2004 +0000
+
+    r1139: Copy roland-merge branch to trunk
+
+commit 3bd72a559dfe22685aae33599c99d021d2ae4aca
+Author: Roland Dreier <roland at topspin.com>
+Date:   Tue Jul 20 21:34:32 2004 +0000
+
+    r502: Move 2.6-only source away from trunk
+
+commit 4f05b6ed3fd1d14161664c677264846eeb51dba5
+Author: Roland Dreier <roland at topspin.com>
+Date:   Tue Jul 20 21:34:32 2004 +0000
+
+    r502: Move 2.6-only source away from trunk
+
+commit 6da8b951c069072a2afc6aba03a3dca2c44db022
+Author: Roland Dreier <roland at topspin.com>
+Date:   Tue Jul 20 01:41:16 2004 +0000
+
+    r497: Move 2.6-only tree to gen2
diff --git a/Makefile.am b/Makefile.am
new file mode 100755
index 0000000..fa47165
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,435 @@
+# $Id: $
+
+OSFLAGS = -DOS_RELEASE=$(shell expr `uname -r | cut -f1 -d.` \* 65536 + `uname -r | cut -f2 -d.`)
+# Check for RedHat, needed for ia64 udapl atomic operations (IA64_FETCHADD syntax)
+# and built-in atomics for RedHat EL5
+if OS_RHEL4
+OSFLAGS += -DREDHAT_EL4
+endif
+
+if OS_RHEL5
+OSFLAGS += -DREDHAT_EL5
+endif
+
+if OS_SUSE11
+OSFLAGS += -DSUSE_11
+endif
+
+if EXT_TYPE_IB
+XFLAGS = -DDAT_EXTENSIONS
+XPROGRAMS_CMA = dapl/openib_cma/dapl_ib_extensions.c
+XPROGRAMS_SCM = dapl/openib_scm/dapl_ib_extensions.c
+else
+XFLAGS =
+XPROGRAMS_CMA =
+XPROGRAMS_SCM =
+endif
+
+if DEBUG
+AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAPL_DBG -DDAT_CONF="\"$(sysconfdir)/dat.conf\""
+else
+AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAT_CONF="\"$(sysconfdir)/dat.conf\""
+endif
+
+datlibdir = $(libdir)
+dapllibofadir = $(libdir)
+daplliboscmdir = $(libdir)
+
+datlib_LTLIBRARIES = dat/udat/libdat2.la
+dapllibofa_LTLIBRARIES = dapl/udapl/libdaplofa.la
+daplliboscm_LTLIBRARIES = dapl/udapl/libdaploscm.la
+
+dat_udat_libdat2_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \
+				-I$(srcdir)/dat/include/ -I$(srcdir)/dat/udat/ \
+				-I$(srcdir)/dat/udat/linux -I$(srcdir)/dat/common/ 
+
+dapl_udapl_libdaplofa_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \
+				-DOPENIB -DCQ_WAIT_OBJECT \
+				-I$(srcdir)/dat/include/ -I$(srcdir)/dapl/include/ \
+				-I$(srcdir)/dapl/common -I$(srcdir)/dapl/udapl/linux \
+				-I$(srcdir)/dapl/openib_cma \
+				-I$(srcdir)/dapl/openib_cma/linux
+		
+dapl_udapl_libdaploscm_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \
+                                -DOPENIB -DCQ_WAIT_OBJECT \
+                                -I$(srcdir)/dat/include/ -I$(srcdir)/dapl/include/ \
+                                -I$(srcdir)/dapl/common -I$(srcdir)/dapl/udapl/linux \
+                                -I$(srcdir)/dapl/openib_scm \
+				-I$(srcdir)/dapl/openib_scm/linux
+
+if HAVE_LD_VERSION_SCRIPT
+    dat_version_script = -Wl,--version-script=$(srcdir)/dat/udat/libdat2.map
+    daplofa_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaplofa.map
+    daploscm_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaploscm.map
+else
+    dat_version_script = 
+    daplofa_version_script = 
+    daploscm_version_script =
+endif
+
+#
+# uDAT: libdat2.so
+#
+dat_udat_libdat2_la_SOURCES = dat/udat/udat.c \
+			dat/udat/udat_api.c \
+			dat/udat/udat_sr_parser.c \
+			dat/udat/linux/dat_osd.c \
+			dat/common/dat_api.c \
+			dat/common/dat_dictionary.c \
+			dat/common/dat_strerror.c \
+			dat/common/dat_init.c \
+			dat/common/dat_dr.c \
+			dat/common/dat_sr.c
+dat_udat_libdat2_la_LDFLAGS = -version-info 2:0:0 $(dat_version_script) -ldl 
+
+#
+# uDAPL OpenFabrics rdma_cm version: libdaplofa.so
+#
+dapl_udapl_libdaplofa_la_SOURCES = dapl/udapl/dapl_init.c \
+        dapl/udapl/dapl_evd_create.c               \
+        dapl/udapl/dapl_evd_query.c                \
+        dapl/udapl/dapl_cno_create.c               \
+        dapl/udapl/dapl_cno_modify_agent.c         \
+        dapl/udapl/dapl_cno_free.c                 \
+        dapl/udapl/dapl_cno_wait.c                 \
+        dapl/udapl/dapl_cno_query.c                \
+        dapl/udapl/dapl_lmr_create.c               \
+        dapl/udapl/dapl_evd_wait.c                 \
+        dapl/udapl/dapl_evd_disable.c              \
+        dapl/udapl/dapl_evd_enable.c               \
+        dapl/udapl/dapl_evd_modify_cno.c           \
+        dapl/udapl/dapl_evd_set_unwaitable.c       \
+        dapl/udapl/dapl_evd_clear_unwaitable.c     \
+        dapl/udapl/linux/dapl_osd.c                \
+        dapl/common/dapl_cookie.c                   \
+        dapl/common/dapl_cr_accept.c                \
+        dapl/common/dapl_cr_query.c                 \
+        dapl/common/dapl_cr_reject.c                \
+        dapl/common/dapl_cr_util.c                  \
+        dapl/common/dapl_cr_callback.c              \
+        dapl/common/dapl_cr_handoff.c               \
+        dapl/common/dapl_ep_connect.c               \
+        dapl/common/dapl_ep_create.c                \
+        dapl/common/dapl_ep_disconnect.c            \
+        dapl/common/dapl_ep_dup_connect.c           \
+        dapl/common/dapl_ep_free.c                  \
+        dapl/common/dapl_ep_reset.c                 \
+        dapl/common/dapl_ep_get_status.c            \
+        dapl/common/dapl_ep_modify.c                \
+        dapl/common/dapl_ep_post_rdma_read.c        \
+        dapl/common/dapl_ep_post_rdma_write.c       \
+        dapl/common/dapl_ep_post_recv.c             \
+        dapl/common/dapl_ep_post_send.c             \
+        dapl/common/dapl_ep_query.c                 \
+        dapl/common/dapl_ep_util.c                  \
+        dapl/common/dapl_evd_dequeue.c              \
+        dapl/common/dapl_evd_free.c                 \
+        dapl/common/dapl_evd_post_se.c              \
+        dapl/common/dapl_evd_resize.c               \
+        dapl/common/dapl_evd_util.c                 \
+        dapl/common/dapl_evd_cq_async_error_callb.c \
+        dapl/common/dapl_evd_qp_async_error_callb.c \
+        dapl/common/dapl_evd_un_async_error_callb.c \
+        dapl/common/dapl_evd_connection_callb.c     \
+        dapl/common/dapl_evd_dto_callb.c            \
+        dapl/common/dapl_get_consumer_context.c     \
+        dapl/common/dapl_get_handle_type.c          \
+        dapl/common/dapl_hash.c                     \
+        dapl/common/dapl_hca_util.c                 \
+        dapl/common/dapl_ia_close.c                 \
+        dapl/common/dapl_ia_open.c                  \
+        dapl/common/dapl_ia_query.c                 \
+        dapl/common/dapl_ia_util.c                  \
+        dapl/common/dapl_llist.c                    \
+        dapl/common/dapl_lmr_free.c                 \
+        dapl/common/dapl_lmr_query.c                \
+        dapl/common/dapl_lmr_util.c                 \
+        dapl/common/dapl_lmr_sync_rdma_read.c       \
+        dapl/common/dapl_lmr_sync_rdma_write.c      \
+        dapl/common/dapl_mr_util.c                  \
+        dapl/common/dapl_provider.c                 \
+        dapl/common/dapl_sp_util.c                  \
+        dapl/common/dapl_psp_create.c               \
+        dapl/common/dapl_psp_create_any.c           \
+        dapl/common/dapl_psp_free.c                 \
+        dapl/common/dapl_psp_query.c                \
+        dapl/common/dapl_pz_create.c                \
+        dapl/common/dapl_pz_free.c                  \
+        dapl/common/dapl_pz_query.c                 \
+        dapl/common/dapl_pz_util.c                  \
+        dapl/common/dapl_rmr_create.c               \
+        dapl/common/dapl_rmr_free.c                 \
+        dapl/common/dapl_rmr_bind.c                 \
+        dapl/common/dapl_rmr_query.c                \
+        dapl/common/dapl_rmr_util.c                 \
+        dapl/common/dapl_rsp_create.c               \
+        dapl/common/dapl_rsp_free.c                 \
+        dapl/common/dapl_rsp_query.c                \
+        dapl/common/dapl_cno_util.c                 \
+        dapl/common/dapl_set_consumer_context.c     \
+        dapl/common/dapl_ring_buffer_util.c         \
+        dapl/common/dapl_name_service.c             \
+        dapl/common/dapl_timer_util.c               \
+        dapl/common/dapl_ep_create_with_srq.c       \
+        dapl/common/dapl_ep_recv_query.c            \
+        dapl/common/dapl_ep_set_watermark.c         \
+        dapl/common/dapl_srq_create.c               \
+        dapl/common/dapl_srq_free.c                 \
+        dapl/common/dapl_srq_query.c                \
+        dapl/common/dapl_srq_resize.c               \
+        dapl/common/dapl_srq_post_recv.c            \
+        dapl/common/dapl_srq_set_lw.c               \
+        dapl/common/dapl_srq_util.c                 \
+        dapl/common/dapl_debug.c                    \
+        dapl/common/dapl_ia_ha.c                    \
+        dapl/common/dapl_csp.c                      \
+        dapl/common/dapl_ep_post_send_invalidate.c  \
+        dapl/common/dapl_ep_post_rdma_read_to_rmr.c \
+        dapl/openib_cma/dapl_ib_util.c              \
+        dapl/openib_cma/dapl_ib_cq.c                \
+        dapl/openib_cma/dapl_ib_qp.c                \
+        dapl/openib_cma/dapl_ib_cm.c                \
+        dapl/openib_cma/dapl_ib_mem.c $(XPROGRAMS_CMA)
+
+dapl_udapl_libdaplofa_la_LDFLAGS = -version-info 2:0:0 $(daplofa_version_script) \
+				   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+				   -lpthread -libverbs -lrdmacm 
+				
+#
+# uDAPL OpenFabrics Socket CM version: libdaplscm.so
+#
+dapl_udapl_libdaploscm_la_SOURCES = dapl/udapl/dapl_init.c \
+        dapl/udapl/dapl_evd_create.c               \
+        dapl/udapl/dapl_evd_query.c                \
+        dapl/udapl/dapl_cno_create.c               \
+        dapl/udapl/dapl_cno_modify_agent.c         \
+        dapl/udapl/dapl_cno_free.c                 \
+        dapl/udapl/dapl_cno_wait.c                 \
+        dapl/udapl/dapl_cno_query.c                \
+        dapl/udapl/dapl_lmr_create.c               \
+        dapl/udapl/dapl_evd_wait.c                 \
+        dapl/udapl/dapl_evd_disable.c              \
+        dapl/udapl/dapl_evd_enable.c               \
+        dapl/udapl/dapl_evd_modify_cno.c           \
+        dapl/udapl/dapl_evd_set_unwaitable.c       \
+        dapl/udapl/dapl_evd_clear_unwaitable.c     \
+        dapl/udapl/linux/dapl_osd.c                \
+        dapl/common/dapl_cookie.c                   \
+        dapl/common/dapl_cr_accept.c                \
+        dapl/common/dapl_cr_query.c                 \
+        dapl/common/dapl_cr_reject.c                \
+        dapl/common/dapl_cr_util.c                  \
+        dapl/common/dapl_cr_callback.c              \
+        dapl/common/dapl_cr_handoff.c               \
+        dapl/common/dapl_ep_connect.c               \
+        dapl/common/dapl_ep_create.c                \
+        dapl/common/dapl_ep_disconnect.c            \
+        dapl/common/dapl_ep_dup_connect.c           \
+        dapl/common/dapl_ep_free.c                  \
+        dapl/common/dapl_ep_reset.c                 \
+        dapl/common/dapl_ep_get_status.c            \
+        dapl/common/dapl_ep_modify.c                \
+        dapl/common/dapl_ep_post_rdma_read.c        \
+        dapl/common/dapl_ep_post_rdma_write.c       \
+        dapl/common/dapl_ep_post_recv.c             \
+        dapl/common/dapl_ep_post_send.c             \
+        dapl/common/dapl_ep_query.c                 \
+        dapl/common/dapl_ep_util.c                  \
+        dapl/common/dapl_evd_dequeue.c              \
+        dapl/common/dapl_evd_free.c                 \
+        dapl/common/dapl_evd_post_se.c              \
+        dapl/common/dapl_evd_resize.c               \
+        dapl/common/dapl_evd_util.c                 \
+        dapl/common/dapl_evd_cq_async_error_callb.c \
+        dapl/common/dapl_evd_qp_async_error_callb.c \
+        dapl/common/dapl_evd_un_async_error_callb.c \
+        dapl/common/dapl_evd_connection_callb.c     \
+        dapl/common/dapl_evd_dto_callb.c            \
+        dapl/common/dapl_get_consumer_context.c     \
+        dapl/common/dapl_get_handle_type.c          \
+        dapl/common/dapl_hash.c                     \
+        dapl/common/dapl_hca_util.c                 \
+        dapl/common/dapl_ia_close.c                 \
+        dapl/common/dapl_ia_open.c                  \
+        dapl/common/dapl_ia_query.c                 \
+        dapl/common/dapl_ia_util.c                  \
+        dapl/common/dapl_llist.c                    \
+        dapl/common/dapl_lmr_free.c                 \
+        dapl/common/dapl_lmr_query.c                \
+        dapl/common/dapl_lmr_util.c                 \
+        dapl/common/dapl_lmr_sync_rdma_read.c       \
+        dapl/common/dapl_lmr_sync_rdma_write.c      \
+        dapl/common/dapl_mr_util.c                  \
+        dapl/common/dapl_provider.c                 \
+        dapl/common/dapl_sp_util.c                  \
+        dapl/common/dapl_psp_create.c               \
+        dapl/common/dapl_psp_create_any.c           \
+        dapl/common/dapl_psp_free.c                 \
+        dapl/common/dapl_psp_query.c                \
+        dapl/common/dapl_pz_create.c                \
+        dapl/common/dapl_pz_free.c                  \
+        dapl/common/dapl_pz_query.c                 \
+        dapl/common/dapl_pz_util.c                  \
+        dapl/common/dapl_rmr_create.c               \
+        dapl/common/dapl_rmr_free.c                 \
+        dapl/common/dapl_rmr_bind.c                 \
+        dapl/common/dapl_rmr_query.c                \
+        dapl/common/dapl_rmr_util.c                 \
+        dapl/common/dapl_rsp_create.c               \
+        dapl/common/dapl_rsp_free.c                 \
+        dapl/common/dapl_rsp_query.c                \
+        dapl/common/dapl_cno_util.c                 \
+        dapl/common/dapl_set_consumer_context.c     \
+        dapl/common/dapl_ring_buffer_util.c         \
+        dapl/common/dapl_name_service.c             \
+        dapl/common/dapl_timer_util.c               \
+        dapl/common/dapl_ep_create_with_srq.c       \
+        dapl/common/dapl_ep_recv_query.c            \
+        dapl/common/dapl_ep_set_watermark.c         \
+        dapl/common/dapl_srq_create.c               \
+        dapl/common/dapl_srq_free.c                 \
+        dapl/common/dapl_srq_query.c                \
+        dapl/common/dapl_srq_resize.c               \
+        dapl/common/dapl_srq_post_recv.c            \
+        dapl/common/dapl_srq_set_lw.c               \
+        dapl/common/dapl_srq_util.c                 \
+        dapl/common/dapl_debug.c                    \
+        dapl/common/dapl_ia_ha.c                    \
+        dapl/common/dapl_csp.c                      \
+        dapl/common/dapl_ep_post_send_invalidate.c  \
+        dapl/common/dapl_ep_post_rdma_read_to_rmr.c \
+        dapl/openib_scm/dapl_ib_util.c              \
+        dapl/openib_scm/dapl_ib_cq.c                \
+        dapl/openib_scm/dapl_ib_qp.c                \
+        dapl/openib_scm/dapl_ib_cm.c                \
+        dapl/openib_scm/dapl_ib_mem.c $(XPROGRAMS_SCM)
+
+dapl_udapl_libdaploscm_la_LDFLAGS = -version-info 2:0:0 $(daploscm_version_script) \
+                                   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+                                   -lpthread -libverbs
+
+libdatincludedir = $(includedir)/dat2
+
+libdatinclude_HEADERS = dat/include/dat2/dat.h \
+			dat/include/dat2/dat_error.h \
+			dat/include/dat2/dat_platform_specific.h \
+			dat/include/dat2/dat_redirection.h \
+			dat/include/dat2/dat_registry.h \
+			dat/include/dat2/dat_vendor_specific.h \
+			dat/include/dat2/udat_config.h \
+			dat/include/dat2/udat.h \
+			dat/include/dat2/udat_redirection.h \
+			dat/include/dat2/udat_vendor_specific.h \
+			dat/include/dat2/dat_ib_extensions.h 
+		
+man_MANS = man/dtest.1 man/dapltest.1 man/dat.conf.5 
+    	
+EXTRA_DIST = dat/common/dat_dictionary.h \
+	     dat/common/dat_dr.h \
+	     dat/common/dat_init.h \
+	     dat/common/dat_sr.h \
+	     dat/udat/udat_sr_parser.h \
+	     dat/udat/linux/dat_osd.h \
+	     dat/include/dat2/dat.h \
+	     dat/include/dat2/dat_error.h \
+	     dat/include/dat2/dat_platform_specific.h \
+	     dat/include/dat2/dat_redirection.h \
+	     dat/include/dat2/dat_registry.h \
+	     dat/include/dat2/dat_vendor_specific.h \
+	     dat/include/dat2/udat_config.h \
+	     dat/include/dat2/udat.h \
+	     dat/include/dat2/udat_redirection.h \
+	     dat/include/dat2/udat_vendor_specific.h \
+	     dapl/common/dapl_adapter_util.h \
+	     dapl/common/dapl_cno_util.h \
+	     dapl/common/dapl_cookie.h \
+	     dapl/common/dapl_cr_util.h \
+	     dapl/common/dapl_ep_util.h \
+	     dapl/common/dapl_evd_util.h \
+	     dapl/common/dapl_hash.h \
+	     dapl/common/dapl_hca_util.h \
+	     dapl/common/dapl_ia_util.h \
+	     dapl/common/dapl_init.h \
+	     dapl/common/dapl_lmr_util.h \
+	     dapl/common/dapl_mr_util.h \
+	     dapl/common/dapl_name_service.h \
+	     dapl/common/dapl_provider.h \
+	     dapl/common/dapl_pz_util.h \
+	     dapl/common/dapl_ring_buffer_util.h \
+	     dapl/common/dapl_rmr_util.h \
+	     dapl/common/dapl_sp_util.h \
+	     dapl/common/dapl_srq_util.h \
+	     dapl/common/dapl_timer_util.h \
+	     dapl/udapl/linux/dapl_osd.h \
+	     dapl/include/dapl.h \
+	     dapl/include/dapl_debug.h \
+	     dapl/include/dapl_ipoib_names.h \
+	     dapl/include/dapl_vendor.h \
+	     dapl/openib_cma/dapl_ib_dto.h \
+	     dapl/openib_cma/dapl_ib_util.h \
+	     dapl/openib_cma/linux/openib_osd.h \
+	     dapl/openib_scm/dapl_ib_dto.h \
+	     dapl/openib_scm/dapl_ib_util.h \
+	     dapl/openib_scm/linux/openib_osd.h \
+	     dat/udat/libdat2.map \
+	     dapl/udapl/libdaplofa.map \
+	     dapl/udapl/libdaploscm.map \
+	     dapl.spec.in \
+	     $(man_MANS) \
+	     test/dapltest/include/dapl_bpool.h \
+	     test/dapltest/include/dapl_client_info.h \
+	     test/dapltest/include/dapl_common.h \
+	     test/dapltest/include/dapl_execute.h \
+	     test/dapltest/include/dapl_fft_cmd.h \
+	     test/dapltest/include/dapl_fft_util.h \
+	     test/dapltest/include/dapl_getopt.h \
+	     test/dapltest/include/dapl_global.h \
+	     test/dapltest/include/dapl_limit_cmd.h \
+	     test/dapltest/include/dapl_mdep.h \
+	     test/dapltest/include/dapl_memlist.h \
+	     test/dapltest/include/dapl_params.h \
+	     test/dapltest/include/dapl_performance_cmd.h \
+	     test/dapltest/include/dapl_performance_stats.h \
+	     test/dapltest/include/dapl_performance_test.h \
+	     test/dapltest/include/dapl_proto.h \
+	     test/dapltest/include/dapl_quit_cmd.h \
+	     test/dapltest/include/dapl_server_cmd.h \
+	     test/dapltest/include/dapl_server_info.h \
+	     test/dapltest/include/dapl_tdep.h \
+	     test/dapltest/include/dapl_tdep_print.h \
+	     test/dapltest/include/dapl_test_data.h \
+	     test/dapltest/include/dapl_transaction_cmd.h \
+	     test/dapltest/include/dapl_transaction_stats.h \
+	     test/dapltest/include/dapl_transaction_test.h \
+	     test/dapltest/include/dapl_version.h \
+	     test/dapltest/mdep/linux/dapl_mdep_user.h
+	 
+dist-hook: dapl.spec 
+	cp dapl.spec $(distdir)
+	
+install-exec-hook:
+	if ! test -d $(DESTDIR)$(sysconfdir); then \
+		mkdir -p $(DESTDIR)$(sysconfdir); \
+	fi; \
+	if test -e $(DESTDIR)$(sysconfdir)/dat.conf; then \
+		sed -e '/ofa-v2-.* u2/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$ofadapl; \
+		cp /tmp/$$$$ofadapl $(DESTDIR)$(sysconfdir)/dat.conf; \
+	fi; \
+	echo ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib0 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ib1 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib1 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mthca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mthca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mlx4_0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mlx4_0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ipath0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ipath0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ehca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ehca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-iwarp u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"eth2 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf;
+
+uninstall-hook:
+	if test -e $(DESTDIR)$(sysconfdir)/dat.conf; then \
+		sed -e '/ofa-v2-.* u2/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$ofadapl; \
+		cp /tmp/$$$$ofadapl $(DESTDIR)$(sysconfdir)/dat.conf; \
+	fi;
+
+SUBDIRS = . test/dtest test/dapltest
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..3f5fe28
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,3509 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# $Id: $
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+# Check for RedHat, needed for ia64 udapl atomic operations (IA64_FETCHADD syntax)
+# and built-in atomics for RedHat EL5
+ at OS_RHEL4_TRUE@am__append_1 = -DREDHAT_EL4
+ at OS_RHEL5_TRUE@am__append_2 = -DREDHAT_EL5
+ at OS_SUSE11_TRUE@am__append_3 = -DSUSE_11
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(libdatinclude_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/config.h.in $(srcdir)/dapl.spec.in \
+	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+	config/compile config/config.guess 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)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = dapl.spec
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(dapllibofadir)" \
+	"$(DESTDIR)$(daplliboscmdir)" "$(DESTDIR)$(datlibdir)" \
+	"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \
+	"$(DESTDIR)$(libdatincludedir)"
+dapllibofaLTLIBRARIES_INSTALL = $(INSTALL)
+daplliboscmLTLIBRARIES_INSTALL = $(INSTALL)
+datlibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(dapllibofa_LTLIBRARIES) $(daplliboscm_LTLIBRARIES) \
+	$(datlib_LTLIBRARIES)
+dapl_udapl_libdaplofa_la_LIBADD =
+am__dapl_udapl_libdaplofa_la_SOURCES_DIST = dapl/udapl/dapl_init.c \
+	dapl/udapl/dapl_evd_create.c dapl/udapl/dapl_evd_query.c \
+	dapl/udapl/dapl_cno_create.c \
+	dapl/udapl/dapl_cno_modify_agent.c dapl/udapl/dapl_cno_free.c \
+	dapl/udapl/dapl_cno_wait.c dapl/udapl/dapl_cno_query.c \
+	dapl/udapl/dapl_lmr_create.c dapl/udapl/dapl_evd_wait.c \
+	dapl/udapl/dapl_evd_disable.c dapl/udapl/dapl_evd_enable.c \
+	dapl/udapl/dapl_evd_modify_cno.c \
+	dapl/udapl/dapl_evd_set_unwaitable.c \
+	dapl/udapl/dapl_evd_clear_unwaitable.c \
+	dapl/udapl/linux/dapl_osd.c dapl/common/dapl_cookie.c \
+	dapl/common/dapl_cr_accept.c dapl/common/dapl_cr_query.c \
+	dapl/common/dapl_cr_reject.c dapl/common/dapl_cr_util.c \
+	dapl/common/dapl_cr_callback.c dapl/common/dapl_cr_handoff.c \
+	dapl/common/dapl_ep_connect.c dapl/common/dapl_ep_create.c \
+	dapl/common/dapl_ep_disconnect.c \
+	dapl/common/dapl_ep_dup_connect.c dapl/common/dapl_ep_free.c \
+	dapl/common/dapl_ep_reset.c dapl/common/dapl_ep_get_status.c \
+	dapl/common/dapl_ep_modify.c \
+	dapl/common/dapl_ep_post_rdma_read.c \
+	dapl/common/dapl_ep_post_rdma_write.c \
+	dapl/common/dapl_ep_post_recv.c \
+	dapl/common/dapl_ep_post_send.c dapl/common/dapl_ep_query.c \
+	dapl/common/dapl_ep_util.c dapl/common/dapl_evd_dequeue.c \
+	dapl/common/dapl_evd_free.c dapl/common/dapl_evd_post_se.c \
+	dapl/common/dapl_evd_resize.c dapl/common/dapl_evd_util.c \
+	dapl/common/dapl_evd_cq_async_error_callb.c \
+	dapl/common/dapl_evd_qp_async_error_callb.c \
+	dapl/common/dapl_evd_un_async_error_callb.c \
+	dapl/common/dapl_evd_connection_callb.c \
+	dapl/common/dapl_evd_dto_callb.c \
+	dapl/common/dapl_get_consumer_context.c \
+	dapl/common/dapl_get_handle_type.c dapl/common/dapl_hash.c \
+	dapl/common/dapl_hca_util.c dapl/common/dapl_ia_close.c \
+	dapl/common/dapl_ia_open.c dapl/common/dapl_ia_query.c \
+	dapl/common/dapl_ia_util.c dapl/common/dapl_llist.c \
+	dapl/common/dapl_lmr_free.c dapl/common/dapl_lmr_query.c \
+	dapl/common/dapl_lmr_util.c \
+	dapl/common/dapl_lmr_sync_rdma_read.c \
+	dapl/common/dapl_lmr_sync_rdma_write.c \
+	dapl/common/dapl_mr_util.c dapl/common/dapl_provider.c \
+	dapl/common/dapl_sp_util.c dapl/common/dapl_psp_create.c \
+	dapl/common/dapl_psp_create_any.c dapl/common/dapl_psp_free.c \
+	dapl/common/dapl_psp_query.c dapl/common/dapl_pz_create.c \
+	dapl/common/dapl_pz_free.c dapl/common/dapl_pz_query.c \
+	dapl/common/dapl_pz_util.c dapl/common/dapl_rmr_create.c \
+	dapl/common/dapl_rmr_free.c dapl/common/dapl_rmr_bind.c \
+	dapl/common/dapl_rmr_query.c dapl/common/dapl_rmr_util.c \
+	dapl/common/dapl_rsp_create.c dapl/common/dapl_rsp_free.c \
+	dapl/common/dapl_rsp_query.c dapl/common/dapl_cno_util.c \
+	dapl/common/dapl_set_consumer_context.c \
+	dapl/common/dapl_ring_buffer_util.c \
+	dapl/common/dapl_name_service.c dapl/common/dapl_timer_util.c \
+	dapl/common/dapl_ep_create_with_srq.c \
+	dapl/common/dapl_ep_recv_query.c \
+	dapl/common/dapl_ep_set_watermark.c \
+	dapl/common/dapl_srq_create.c dapl/common/dapl_srq_free.c \
+	dapl/common/dapl_srq_query.c dapl/common/dapl_srq_resize.c \
+	dapl/common/dapl_srq_post_recv.c dapl/common/dapl_srq_set_lw.c \
+	dapl/common/dapl_srq_util.c dapl/common/dapl_debug.c \
+	dapl/common/dapl_ia_ha.c dapl/common/dapl_csp.c \
+	dapl/common/dapl_ep_post_send_invalidate.c \
+	dapl/common/dapl_ep_post_rdma_read_to_rmr.c \
+	dapl/openib_cma/dapl_ib_util.c dapl/openib_cma/dapl_ib_cq.c \
+	dapl/openib_cma/dapl_ib_qp.c dapl/openib_cma/dapl_ib_cm.c \
+	dapl/openib_cma/dapl_ib_mem.c \
+	dapl/openib_cma/dapl_ib_extensions.c
+ at EXT_TYPE_IB_TRUE@am__objects_1 = dapl_udapl_libdaplofa_la-dapl_ib_extensions.lo
+am_dapl_udapl_libdaplofa_la_OBJECTS =  \
+	dapl_udapl_libdaplofa_la-dapl_init.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_cno_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.lo \
+	dapl_udapl_libdaplofa_la-dapl_cno_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_cno_wait.lo \
+	dapl_udapl_libdaplofa_la-dapl_cno_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_lmr_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_wait.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_disable.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_enable.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.lo \
+	dapl_udapl_libdaplofa_la-dapl_osd.lo \
+	dapl_udapl_libdaplofa_la-dapl_cookie.lo \
+	dapl_udapl_libdaplofa_la-dapl_cr_accept.lo \
+	dapl_udapl_libdaplofa_la-dapl_cr_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_cr_reject.lo \
+	dapl_udapl_libdaplofa_la-dapl_cr_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_cr_callback.lo \
+	dapl_udapl_libdaplofa_la-dapl_cr_handoff.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_connect.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_disconnect.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_reset.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_get_status.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_modify.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_post_recv.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_post_send.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_dequeue.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_post_se.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_resize.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.lo \
+	dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.lo \
+	dapl_udapl_libdaplofa_la-dapl_get_consumer_context.lo \
+	dapl_udapl_libdaplofa_la-dapl_get_handle_type.lo \
+	dapl_udapl_libdaplofa_la-dapl_hash.lo \
+	dapl_udapl_libdaplofa_la-dapl_hca_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_ia_close.lo \
+	dapl_udapl_libdaplofa_la-dapl_ia_open.lo \
+	dapl_udapl_libdaplofa_la-dapl_ia_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_ia_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_llist.lo \
+	dapl_udapl_libdaplofa_la-dapl_lmr_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_lmr_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_lmr_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.lo \
+	dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.lo \
+	dapl_udapl_libdaplofa_la-dapl_mr_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_provider.lo \
+	dapl_udapl_libdaplofa_la-dapl_sp_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_psp_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_psp_create_any.lo \
+	dapl_udapl_libdaplofa_la-dapl_psp_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_psp_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_pz_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_pz_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_pz_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_pz_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_rmr_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_rmr_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_rmr_bind.lo \
+	dapl_udapl_libdaplofa_la-dapl_rmr_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_rmr_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_rsp_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_rsp_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_rsp_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_cno_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_set_consumer_context.lo \
+	dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_name_service.lo \
+	dapl_udapl_libdaplofa_la-dapl_timer_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_recv_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.lo \
+	dapl_udapl_libdaplofa_la-dapl_srq_create.lo \
+	dapl_udapl_libdaplofa_la-dapl_srq_free.lo \
+	dapl_udapl_libdaplofa_la-dapl_srq_query.lo \
+	dapl_udapl_libdaplofa_la-dapl_srq_resize.lo \
+	dapl_udapl_libdaplofa_la-dapl_srq_post_recv.lo \
+	dapl_udapl_libdaplofa_la-dapl_srq_set_lw.lo \
+	dapl_udapl_libdaplofa_la-dapl_srq_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_debug.lo \
+	dapl_udapl_libdaplofa_la-dapl_ia_ha.lo \
+	dapl_udapl_libdaplofa_la-dapl_csp.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.lo \
+	dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.lo \
+	dapl_udapl_libdaplofa_la-dapl_ib_util.lo \
+	dapl_udapl_libdaplofa_la-dapl_ib_cq.lo \
+	dapl_udapl_libdaplofa_la-dapl_ib_qp.lo \
+	dapl_udapl_libdaplofa_la-dapl_ib_cm.lo \
+	dapl_udapl_libdaplofa_la-dapl_ib_mem.lo $(am__objects_1)
+dapl_udapl_libdaplofa_la_OBJECTS =  \
+	$(am_dapl_udapl_libdaplofa_la_OBJECTS)
+dapl_udapl_libdaplofa_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) \
+	$(dapl_udapl_libdaplofa_la_LDFLAGS) $(LDFLAGS) -o $@
+am__dirstamp = $(am__leading_dot)dirstamp
+dapl_udapl_libdaploscm_la_LIBADD =
+am__dapl_udapl_libdaploscm_la_SOURCES_DIST = dapl/udapl/dapl_init.c \
+	dapl/udapl/dapl_evd_create.c dapl/udapl/dapl_evd_query.c \
+	dapl/udapl/dapl_cno_create.c \
+	dapl/udapl/dapl_cno_modify_agent.c dapl/udapl/dapl_cno_free.c \
+	dapl/udapl/dapl_cno_wait.c dapl/udapl/dapl_cno_query.c \
+	dapl/udapl/dapl_lmr_create.c dapl/udapl/dapl_evd_wait.c \
+	dapl/udapl/dapl_evd_disable.c dapl/udapl/dapl_evd_enable.c \
+	dapl/udapl/dapl_evd_modify_cno.c \
+	dapl/udapl/dapl_evd_set_unwaitable.c \
+	dapl/udapl/dapl_evd_clear_unwaitable.c \
+	dapl/udapl/linux/dapl_osd.c dapl/common/dapl_cookie.c \
+	dapl/common/dapl_cr_accept.c dapl/common/dapl_cr_query.c \
+	dapl/common/dapl_cr_reject.c dapl/common/dapl_cr_util.c \
+	dapl/common/dapl_cr_callback.c dapl/common/dapl_cr_handoff.c \
+	dapl/common/dapl_ep_connect.c dapl/common/dapl_ep_create.c \
+	dapl/common/dapl_ep_disconnect.c \
+	dapl/common/dapl_ep_dup_connect.c dapl/common/dapl_ep_free.c \
+	dapl/common/dapl_ep_reset.c dapl/common/dapl_ep_get_status.c \
+	dapl/common/dapl_ep_modify.c \
+	dapl/common/dapl_ep_post_rdma_read.c \
+	dapl/common/dapl_ep_post_rdma_write.c \
+	dapl/common/dapl_ep_post_recv.c \
+	dapl/common/dapl_ep_post_send.c dapl/common/dapl_ep_query.c \
+	dapl/common/dapl_ep_util.c dapl/common/dapl_evd_dequeue.c \
+	dapl/common/dapl_evd_free.c dapl/common/dapl_evd_post_se.c \
+	dapl/common/dapl_evd_resize.c dapl/common/dapl_evd_util.c \
+	dapl/common/dapl_evd_cq_async_error_callb.c \
+	dapl/common/dapl_evd_qp_async_error_callb.c \
+	dapl/common/dapl_evd_un_async_error_callb.c \
+	dapl/common/dapl_evd_connection_callb.c \
+	dapl/common/dapl_evd_dto_callb.c \
+	dapl/common/dapl_get_consumer_context.c \
+	dapl/common/dapl_get_handle_type.c dapl/common/dapl_hash.c \
+	dapl/common/dapl_hca_util.c dapl/common/dapl_ia_close.c \
+	dapl/common/dapl_ia_open.c dapl/common/dapl_ia_query.c \
+	dapl/common/dapl_ia_util.c dapl/common/dapl_llist.c \
+	dapl/common/dapl_lmr_free.c dapl/common/dapl_lmr_query.c \
+	dapl/common/dapl_lmr_util.c \
+	dapl/common/dapl_lmr_sync_rdma_read.c \
+	dapl/common/dapl_lmr_sync_rdma_write.c \
+	dapl/common/dapl_mr_util.c dapl/common/dapl_provider.c \
+	dapl/common/dapl_sp_util.c dapl/common/dapl_psp_create.c \
+	dapl/common/dapl_psp_create_any.c dapl/common/dapl_psp_free.c \
+	dapl/common/dapl_psp_query.c dapl/common/dapl_pz_create.c \
+	dapl/common/dapl_pz_free.c dapl/common/dapl_pz_query.c \
+	dapl/common/dapl_pz_util.c dapl/common/dapl_rmr_create.c \
+	dapl/common/dapl_rmr_free.c dapl/common/dapl_rmr_bind.c \
+	dapl/common/dapl_rmr_query.c dapl/common/dapl_rmr_util.c \
+	dapl/common/dapl_rsp_create.c dapl/common/dapl_rsp_free.c \
+	dapl/common/dapl_rsp_query.c dapl/common/dapl_cno_util.c \
+	dapl/common/dapl_set_consumer_context.c \
+	dapl/common/dapl_ring_buffer_util.c \
+	dapl/common/dapl_name_service.c dapl/common/dapl_timer_util.c \
+	dapl/common/dapl_ep_create_with_srq.c \
+	dapl/common/dapl_ep_recv_query.c \
+	dapl/common/dapl_ep_set_watermark.c \
+	dapl/common/dapl_srq_create.c dapl/common/dapl_srq_free.c \
+	dapl/common/dapl_srq_query.c dapl/common/dapl_srq_resize.c \
+	dapl/common/dapl_srq_post_recv.c dapl/common/dapl_srq_set_lw.c \
+	dapl/common/dapl_srq_util.c dapl/common/dapl_debug.c \
+	dapl/common/dapl_ia_ha.c dapl/common/dapl_csp.c \
+	dapl/common/dapl_ep_post_send_invalidate.c \
+	dapl/common/dapl_ep_post_rdma_read_to_rmr.c \
+	dapl/openib_scm/dapl_ib_util.c dapl/openib_scm/dapl_ib_cq.c \
+	dapl/openib_scm/dapl_ib_qp.c dapl/openib_scm/dapl_ib_cm.c \
+	dapl/openib_scm/dapl_ib_mem.c \
+	dapl/openib_scm/dapl_ib_extensions.c
+ at EXT_TYPE_IB_TRUE@am__objects_2 = dapl_udapl_libdaploscm_la-dapl_ib_extensions.lo
+am_dapl_udapl_libdaploscm_la_OBJECTS =  \
+	dapl_udapl_libdaploscm_la-dapl_init.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_cno_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.lo \
+	dapl_udapl_libdaploscm_la-dapl_cno_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_cno_wait.lo \
+	dapl_udapl_libdaploscm_la-dapl_cno_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_lmr_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_wait.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_disable.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_enable.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.lo \
+	dapl_udapl_libdaploscm_la-dapl_osd.lo \
+	dapl_udapl_libdaploscm_la-dapl_cookie.lo \
+	dapl_udapl_libdaploscm_la-dapl_cr_accept.lo \
+	dapl_udapl_libdaploscm_la-dapl_cr_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_cr_reject.lo \
+	dapl_udapl_libdaploscm_la-dapl_cr_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_cr_callback.lo \
+	dapl_udapl_libdaploscm_la-dapl_cr_handoff.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_connect.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_disconnect.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_reset.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_get_status.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_modify.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_post_recv.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_post_send.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_dequeue.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_post_se.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_resize.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.lo \
+	dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.lo \
+	dapl_udapl_libdaploscm_la-dapl_get_consumer_context.lo \
+	dapl_udapl_libdaploscm_la-dapl_get_handle_type.lo \
+	dapl_udapl_libdaploscm_la-dapl_hash.lo \
+	dapl_udapl_libdaploscm_la-dapl_hca_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_ia_close.lo \
+	dapl_udapl_libdaploscm_la-dapl_ia_open.lo \
+	dapl_udapl_libdaploscm_la-dapl_ia_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_ia_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_llist.lo \
+	dapl_udapl_libdaploscm_la-dapl_lmr_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_lmr_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_lmr_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.lo \
+	dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.lo \
+	dapl_udapl_libdaploscm_la-dapl_mr_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_provider.lo \
+	dapl_udapl_libdaploscm_la-dapl_sp_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_psp_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_psp_create_any.lo \
+	dapl_udapl_libdaploscm_la-dapl_psp_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_psp_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_pz_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_pz_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_pz_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_pz_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_rmr_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_rmr_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_rmr_bind.lo \
+	dapl_udapl_libdaploscm_la-dapl_rmr_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_rmr_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_rsp_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_rsp_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_rsp_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_cno_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_set_consumer_context.lo \
+	dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_name_service.lo \
+	dapl_udapl_libdaploscm_la-dapl_timer_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_recv_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.lo \
+	dapl_udapl_libdaploscm_la-dapl_srq_create.lo \
+	dapl_udapl_libdaploscm_la-dapl_srq_free.lo \
+	dapl_udapl_libdaploscm_la-dapl_srq_query.lo \
+	dapl_udapl_libdaploscm_la-dapl_srq_resize.lo \
+	dapl_udapl_libdaploscm_la-dapl_srq_post_recv.lo \
+	dapl_udapl_libdaploscm_la-dapl_srq_set_lw.lo \
+	dapl_udapl_libdaploscm_la-dapl_srq_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_debug.lo \
+	dapl_udapl_libdaploscm_la-dapl_ia_ha.lo \
+	dapl_udapl_libdaploscm_la-dapl_csp.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.lo \
+	dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.lo \
+	dapl_udapl_libdaploscm_la-dapl_ib_util.lo \
+	dapl_udapl_libdaploscm_la-dapl_ib_cq.lo \
+	dapl_udapl_libdaploscm_la-dapl_ib_qp.lo \
+	dapl_udapl_libdaploscm_la-dapl_ib_cm.lo \
+	dapl_udapl_libdaploscm_la-dapl_ib_mem.lo $(am__objects_2)
+dapl_udapl_libdaploscm_la_OBJECTS =  \
+	$(am_dapl_udapl_libdaploscm_la_OBJECTS)
+dapl_udapl_libdaploscm_la_LINK = $(LIBTOOL) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) \
+	$(dapl_udapl_libdaploscm_la_LDFLAGS) $(LDFLAGS) -o $@
+dat_udat_libdat2_la_LIBADD =
+am_dat_udat_libdat2_la_OBJECTS = dat_udat_libdat2_la-udat.lo \
+	dat_udat_libdat2_la-udat_api.lo \
+	dat_udat_libdat2_la-udat_sr_parser.lo \
+	dat_udat_libdat2_la-dat_osd.lo dat_udat_libdat2_la-dat_api.lo \
+	dat_udat_libdat2_la-dat_dictionary.lo \
+	dat_udat_libdat2_la-dat_strerror.lo \
+	dat_udat_libdat2_la-dat_init.lo dat_udat_libdat2_la-dat_dr.lo \
+	dat_udat_libdat2_la-dat_sr.lo
+dat_udat_libdat2_la_OBJECTS = $(am_dat_udat_libdat2_la_OBJECTS)
+dat_udat_libdat2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) \
+	$(dat_udat_libdat2_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+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 = $(dapl_udapl_libdaplofa_la_SOURCES) \
+	$(dapl_udapl_libdaploscm_la_SOURCES) \
+	$(dat_udat_libdat2_la_SOURCES)
+DIST_SOURCES = $(am__dapl_udapl_libdaplofa_la_SOURCES_DIST) \
+	$(am__dapl_udapl_libdaploscm_la_SOURCES_DIST) \
+	$(dat_udat_libdat2_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-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
+man1dir = $(mandir)/man1
+man5dir = $(mandir)/man5
+NROFF = nroff
+MANS = $(man_MANS)
+libdatincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(libdatinclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+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@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+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_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+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@
+OSFLAGS = -DOS_RELEASE=$(shell expr `uname -r | cut -f1 -d.` \* 65536 \
+	+ `uname -r | cut -f2 -d.`) $(am__append_1) $(am__append_2) \
+	$(am__append_3)
+ at EXT_TYPE_IB_FALSE@XFLAGS = 
+ at EXT_TYPE_IB_TRUE@XFLAGS = -DDAT_EXTENSIONS
+ at EXT_TYPE_IB_FALSE@XPROGRAMS_CMA = 
+ at EXT_TYPE_IB_TRUE@XPROGRAMS_CMA = dapl/openib_cma/dapl_ib_extensions.c
+ at EXT_TYPE_IB_FALSE@XPROGRAMS_SCM = 
+ at EXT_TYPE_IB_TRUE@XPROGRAMS_SCM = dapl/openib_scm/dapl_ib_extensions.c
+ at DEBUG_FALSE@AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAT_CONF="\"$(sysconfdir)/dat.conf\""
+ at DEBUG_TRUE@AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAPL_DBG -DDAT_CONF="\"$(sysconfdir)/dat.conf\""
+datlibdir = $(libdir)
+dapllibofadir = $(libdir)
+daplliboscmdir = $(libdir)
+datlib_LTLIBRARIES = dat/udat/libdat2.la
+dapllibofa_LTLIBRARIES = dapl/udapl/libdaplofa.la
+daplliboscm_LTLIBRARIES = dapl/udapl/libdaploscm.la
+dat_udat_libdat2_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \
+				-I$(srcdir)/dat/include/ -I$(srcdir)/dat/udat/ \
+				-I$(srcdir)/dat/udat/linux -I$(srcdir)/dat/common/ 
+
+dapl_udapl_libdaplofa_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \
+				-DOPENIB -DCQ_WAIT_OBJECT \
+				-I$(srcdir)/dat/include/ -I$(srcdir)/dapl/include/ \
+				-I$(srcdir)/dapl/common -I$(srcdir)/dapl/udapl/linux \
+				-I$(srcdir)/dapl/openib_cma \
+				-I$(srcdir)/dapl/openib_cma/linux
+
+dapl_udapl_libdaploscm_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \
+                                -DOPENIB -DCQ_WAIT_OBJECT \
+                                -I$(srcdir)/dat/include/ -I$(srcdir)/dapl/include/ \
+                                -I$(srcdir)/dapl/common -I$(srcdir)/dapl/udapl/linux \
+                                -I$(srcdir)/dapl/openib_scm \
+				-I$(srcdir)/dapl/openib_scm/linux
+
+ at HAVE_LD_VERSION_SCRIPT_FALSE@dat_version_script = 
+ at HAVE_LD_VERSION_SCRIPT_TRUE@dat_version_script = -Wl,--version-script=$(srcdir)/dat/udat/libdat2.map
+ at HAVE_LD_VERSION_SCRIPT_FALSE@daplofa_version_script = 
+ at HAVE_LD_VERSION_SCRIPT_TRUE@daplofa_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaplofa.map
+ at HAVE_LD_VERSION_SCRIPT_FALSE@daploscm_version_script = 
+ at HAVE_LD_VERSION_SCRIPT_TRUE@daploscm_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaploscm.map
+
+#
+# uDAT: libdat2.so
+#
+dat_udat_libdat2_la_SOURCES = dat/udat/udat.c \
+			dat/udat/udat_api.c \
+			dat/udat/udat_sr_parser.c \
+			dat/udat/linux/dat_osd.c \
+			dat/common/dat_api.c \
+			dat/common/dat_dictionary.c \
+			dat/common/dat_strerror.c \
+			dat/common/dat_init.c \
+			dat/common/dat_dr.c \
+			dat/common/dat_sr.c
+
+dat_udat_libdat2_la_LDFLAGS = -version-info 2:0:0 $(dat_version_script) -ldl 
+
+#
+# uDAPL OpenFabrics rdma_cm version: libdaplofa.so
+#
+dapl_udapl_libdaplofa_la_SOURCES = dapl/udapl/dapl_init.c \
+        dapl/udapl/dapl_evd_create.c               \
+        dapl/udapl/dapl_evd_query.c                \
+        dapl/udapl/dapl_cno_create.c               \
+        dapl/udapl/dapl_cno_modify_agent.c         \
+        dapl/udapl/dapl_cno_free.c                 \
+        dapl/udapl/dapl_cno_wait.c                 \
+        dapl/udapl/dapl_cno_query.c                \
+        dapl/udapl/dapl_lmr_create.c               \
+        dapl/udapl/dapl_evd_wait.c                 \
+        dapl/udapl/dapl_evd_disable.c              \
+        dapl/udapl/dapl_evd_enable.c               \
+        dapl/udapl/dapl_evd_modify_cno.c           \
+        dapl/udapl/dapl_evd_set_unwaitable.c       \
+        dapl/udapl/dapl_evd_clear_unwaitable.c     \
+        dapl/udapl/linux/dapl_osd.c                \
+        dapl/common/dapl_cookie.c                   \
+        dapl/common/dapl_cr_accept.c                \
+        dapl/common/dapl_cr_query.c                 \
+        dapl/common/dapl_cr_reject.c                \
+        dapl/common/dapl_cr_util.c                  \
+        dapl/common/dapl_cr_callback.c              \
+        dapl/common/dapl_cr_handoff.c               \
+        dapl/common/dapl_ep_connect.c               \
+        dapl/common/dapl_ep_create.c                \
+        dapl/common/dapl_ep_disconnect.c            \
+        dapl/common/dapl_ep_dup_connect.c           \
+        dapl/common/dapl_ep_free.c                  \
+        dapl/common/dapl_ep_reset.c                 \
+        dapl/common/dapl_ep_get_status.c            \
+        dapl/common/dapl_ep_modify.c                \
+        dapl/common/dapl_ep_post_rdma_read.c        \
+        dapl/common/dapl_ep_post_rdma_write.c       \
+        dapl/common/dapl_ep_post_recv.c             \
+        dapl/common/dapl_ep_post_send.c             \
+        dapl/common/dapl_ep_query.c                 \
+        dapl/common/dapl_ep_util.c                  \
+        dapl/common/dapl_evd_dequeue.c              \
+        dapl/common/dapl_evd_free.c                 \
+        dapl/common/dapl_evd_post_se.c              \
+        dapl/common/dapl_evd_resize.c               \
+        dapl/common/dapl_evd_util.c                 \
+        dapl/common/dapl_evd_cq_async_error_callb.c \
+        dapl/common/dapl_evd_qp_async_error_callb.c \
+        dapl/common/dapl_evd_un_async_error_callb.c \
+        dapl/common/dapl_evd_connection_callb.c     \
+        dapl/common/dapl_evd_dto_callb.c            \
+        dapl/common/dapl_get_consumer_context.c     \
+        dapl/common/dapl_get_handle_type.c          \
+        dapl/common/dapl_hash.c                     \
+        dapl/common/dapl_hca_util.c                 \
+        dapl/common/dapl_ia_close.c                 \
+        dapl/common/dapl_ia_open.c                  \
+        dapl/common/dapl_ia_query.c                 \
+        dapl/common/dapl_ia_util.c                  \
+        dapl/common/dapl_llist.c                    \
+        dapl/common/dapl_lmr_free.c                 \
+        dapl/common/dapl_lmr_query.c                \
+        dapl/common/dapl_lmr_util.c                 \
+        dapl/common/dapl_lmr_sync_rdma_read.c       \
+        dapl/common/dapl_lmr_sync_rdma_write.c      \
+        dapl/common/dapl_mr_util.c                  \
+        dapl/common/dapl_provider.c                 \
+        dapl/common/dapl_sp_util.c                  \
+        dapl/common/dapl_psp_create.c               \
+        dapl/common/dapl_psp_create_any.c           \
+        dapl/common/dapl_psp_free.c                 \
+        dapl/common/dapl_psp_query.c                \
+        dapl/common/dapl_pz_create.c                \
+        dapl/common/dapl_pz_free.c                  \
+        dapl/common/dapl_pz_query.c                 \
+        dapl/common/dapl_pz_util.c                  \
+        dapl/common/dapl_rmr_create.c               \
+        dapl/common/dapl_rmr_free.c                 \
+        dapl/common/dapl_rmr_bind.c                 \
+        dapl/common/dapl_rmr_query.c                \
+        dapl/common/dapl_rmr_util.c                 \
+        dapl/common/dapl_rsp_create.c               \
+        dapl/common/dapl_rsp_free.c                 \
+        dapl/common/dapl_rsp_query.c                \
+        dapl/common/dapl_cno_util.c                 \
+        dapl/common/dapl_set_consumer_context.c     \
+        dapl/common/dapl_ring_buffer_util.c         \
+        dapl/common/dapl_name_service.c             \
+        dapl/common/dapl_timer_util.c               \
+        dapl/common/dapl_ep_create_with_srq.c       \
+        dapl/common/dapl_ep_recv_query.c            \
+        dapl/common/dapl_ep_set_watermark.c         \
+        dapl/common/dapl_srq_create.c               \
+        dapl/common/dapl_srq_free.c                 \
+        dapl/common/dapl_srq_query.c                \
+        dapl/common/dapl_srq_resize.c               \
+        dapl/common/dapl_srq_post_recv.c            \
+        dapl/common/dapl_srq_set_lw.c               \
+        dapl/common/dapl_srq_util.c                 \
+        dapl/common/dapl_debug.c                    \
+        dapl/common/dapl_ia_ha.c                    \
+        dapl/common/dapl_csp.c                      \
+        dapl/common/dapl_ep_post_send_invalidate.c  \
+        dapl/common/dapl_ep_post_rdma_read_to_rmr.c \
+        dapl/openib_cma/dapl_ib_util.c              \
+        dapl/openib_cma/dapl_ib_cq.c                \
+        dapl/openib_cma/dapl_ib_qp.c                \
+        dapl/openib_cma/dapl_ib_cm.c                \
+        dapl/openib_cma/dapl_ib_mem.c $(XPROGRAMS_CMA)
+
+dapl_udapl_libdaplofa_la_LDFLAGS = -version-info 2:0:0 $(daplofa_version_script) \
+				   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+				   -lpthread -libverbs -lrdmacm 
+
+
+#
+# uDAPL OpenFabrics Socket CM version: libdaplscm.so
+#
+dapl_udapl_libdaploscm_la_SOURCES = dapl/udapl/dapl_init.c \
+        dapl/udapl/dapl_evd_create.c               \
+        dapl/udapl/dapl_evd_query.c                \
+        dapl/udapl/dapl_cno_create.c               \
+        dapl/udapl/dapl_cno_modify_agent.c         \
+        dapl/udapl/dapl_cno_free.c                 \
+        dapl/udapl/dapl_cno_wait.c                 \
+        dapl/udapl/dapl_cno_query.c                \
+        dapl/udapl/dapl_lmr_create.c               \
+        dapl/udapl/dapl_evd_wait.c                 \
+        dapl/udapl/dapl_evd_disable.c              \
+        dapl/udapl/dapl_evd_enable.c               \
+        dapl/udapl/dapl_evd_modify_cno.c           \
+        dapl/udapl/dapl_evd_set_unwaitable.c       \
+        dapl/udapl/dapl_evd_clear_unwaitable.c     \
+        dapl/udapl/linux/dapl_osd.c                \
+        dapl/common/dapl_cookie.c                   \
+        dapl/common/dapl_cr_accept.c                \
+        dapl/common/dapl_cr_query.c                 \
+        dapl/common/dapl_cr_reject.c                \
+        dapl/common/dapl_cr_util.c                  \
+        dapl/common/dapl_cr_callback.c              \
+        dapl/common/dapl_cr_handoff.c               \
+        dapl/common/dapl_ep_connect.c               \
+        dapl/common/dapl_ep_create.c                \
+        dapl/common/dapl_ep_disconnect.c            \
+        dapl/common/dapl_ep_dup_connect.c           \
+        dapl/common/dapl_ep_free.c                  \
+        dapl/common/dapl_ep_reset.c                 \
+        dapl/common/dapl_ep_get_status.c            \
+        dapl/common/dapl_ep_modify.c                \
+        dapl/common/dapl_ep_post_rdma_read.c        \
+        dapl/common/dapl_ep_post_rdma_write.c       \
+        dapl/common/dapl_ep_post_recv.c             \
+        dapl/common/dapl_ep_post_send.c             \
+        dapl/common/dapl_ep_query.c                 \
+        dapl/common/dapl_ep_util.c                  \
+        dapl/common/dapl_evd_dequeue.c              \
+        dapl/common/dapl_evd_free.c                 \
+        dapl/common/dapl_evd_post_se.c              \
+        dapl/common/dapl_evd_resize.c               \
+        dapl/common/dapl_evd_util.c                 \
+        dapl/common/dapl_evd_cq_async_error_callb.c \
+        dapl/common/dapl_evd_qp_async_error_callb.c \
+        dapl/common/dapl_evd_un_async_error_callb.c \
+        dapl/common/dapl_evd_connection_callb.c     \
+        dapl/common/dapl_evd_dto_callb.c            \
+        dapl/common/dapl_get_consumer_context.c     \
+        dapl/common/dapl_get_handle_type.c          \
+        dapl/common/dapl_hash.c                     \
+        dapl/common/dapl_hca_util.c                 \
+        dapl/common/dapl_ia_close.c                 \
+        dapl/common/dapl_ia_open.c                  \
+        dapl/common/dapl_ia_query.c                 \
+        dapl/common/dapl_ia_util.c                  \
+        dapl/common/dapl_llist.c                    \
+        dapl/common/dapl_lmr_free.c                 \
+        dapl/common/dapl_lmr_query.c                \
+        dapl/common/dapl_lmr_util.c                 \
+        dapl/common/dapl_lmr_sync_rdma_read.c       \
+        dapl/common/dapl_lmr_sync_rdma_write.c      \
+        dapl/common/dapl_mr_util.c                  \
+        dapl/common/dapl_provider.c                 \
+        dapl/common/dapl_sp_util.c                  \
+        dapl/common/dapl_psp_create.c               \
+        dapl/common/dapl_psp_create_any.c           \
+        dapl/common/dapl_psp_free.c                 \
+        dapl/common/dapl_psp_query.c                \
+        dapl/common/dapl_pz_create.c                \
+        dapl/common/dapl_pz_free.c                  \
+        dapl/common/dapl_pz_query.c                 \
+        dapl/common/dapl_pz_util.c                  \
+        dapl/common/dapl_rmr_create.c               \
+        dapl/common/dapl_rmr_free.c                 \
+        dapl/common/dapl_rmr_bind.c                 \
+        dapl/common/dapl_rmr_query.c                \
+        dapl/common/dapl_rmr_util.c                 \
+        dapl/common/dapl_rsp_create.c               \
+        dapl/common/dapl_rsp_free.c                 \
+        dapl/common/dapl_rsp_query.c                \
+        dapl/common/dapl_cno_util.c                 \
+        dapl/common/dapl_set_consumer_context.c     \
+        dapl/common/dapl_ring_buffer_util.c         \
+        dapl/common/dapl_name_service.c             \
+        dapl/common/dapl_timer_util.c               \
+        dapl/common/dapl_ep_create_with_srq.c       \
+        dapl/common/dapl_ep_recv_query.c            \
+        dapl/common/dapl_ep_set_watermark.c         \
+        dapl/common/dapl_srq_create.c               \
+        dapl/common/dapl_srq_free.c                 \
+        dapl/common/dapl_srq_query.c                \
+        dapl/common/dapl_srq_resize.c               \
+        dapl/common/dapl_srq_post_recv.c            \
+        dapl/common/dapl_srq_set_lw.c               \
+        dapl/common/dapl_srq_util.c                 \
+        dapl/common/dapl_debug.c                    \
+        dapl/common/dapl_ia_ha.c                    \
+        dapl/common/dapl_csp.c                      \
+        dapl/common/dapl_ep_post_send_invalidate.c  \
+        dapl/common/dapl_ep_post_rdma_read_to_rmr.c \
+        dapl/openib_scm/dapl_ib_util.c              \
+        dapl/openib_scm/dapl_ib_cq.c                \
+        dapl/openib_scm/dapl_ib_qp.c                \
+        dapl/openib_scm/dapl_ib_cm.c                \
+        dapl/openib_scm/dapl_ib_mem.c $(XPROGRAMS_SCM)
+
+dapl_udapl_libdaploscm_la_LDFLAGS = -version-info 2:0:0 $(daploscm_version_script) \
+                                   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+                                   -lpthread -libverbs
+
+libdatincludedir = $(includedir)/dat2
+libdatinclude_HEADERS = dat/include/dat2/dat.h \
+			dat/include/dat2/dat_error.h \
+			dat/include/dat2/dat_platform_specific.h \
+			dat/include/dat2/dat_redirection.h \
+			dat/include/dat2/dat_registry.h \
+			dat/include/dat2/dat_vendor_specific.h \
+			dat/include/dat2/udat_config.h \
+			dat/include/dat2/udat.h \
+			dat/include/dat2/udat_redirection.h \
+			dat/include/dat2/udat_vendor_specific.h \
+			dat/include/dat2/dat_ib_extensions.h 
+
+man_MANS = man/dtest.1 man/dapltest.1 man/dat.conf.5 
+EXTRA_DIST = dat/common/dat_dictionary.h \
+	     dat/common/dat_dr.h \
+	     dat/common/dat_init.h \
+	     dat/common/dat_sr.h \
+	     dat/udat/udat_sr_parser.h \
+	     dat/udat/linux/dat_osd.h \
+	     dat/include/dat2/dat.h \
+	     dat/include/dat2/dat_error.h \
+	     dat/include/dat2/dat_platform_specific.h \
+	     dat/include/dat2/dat_redirection.h \
+	     dat/include/dat2/dat_registry.h \
+	     dat/include/dat2/dat_vendor_specific.h \
+	     dat/include/dat2/udat_config.h \
+	     dat/include/dat2/udat.h \
+	     dat/include/dat2/udat_redirection.h \
+	     dat/include/dat2/udat_vendor_specific.h \
+	     dapl/common/dapl_adapter_util.h \
+	     dapl/common/dapl_cno_util.h \
+	     dapl/common/dapl_cookie.h \
+	     dapl/common/dapl_cr_util.h \
+	     dapl/common/dapl_ep_util.h \
+	     dapl/common/dapl_evd_util.h \
+	     dapl/common/dapl_hash.h \
+	     dapl/common/dapl_hca_util.h \
+	     dapl/common/dapl_ia_util.h \
+	     dapl/common/dapl_init.h \
+	     dapl/common/dapl_lmr_util.h \
+	     dapl/common/dapl_mr_util.h \
+	     dapl/common/dapl_name_service.h \
+	     dapl/common/dapl_provider.h \
+	     dapl/common/dapl_pz_util.h \
+	     dapl/common/dapl_ring_buffer_util.h \
+	     dapl/common/dapl_rmr_util.h \
+	     dapl/common/dapl_sp_util.h \
+	     dapl/common/dapl_srq_util.h \
+	     dapl/common/dapl_timer_util.h \
+	     dapl/udapl/linux/dapl_osd.h \
+	     dapl/include/dapl.h \
+	     dapl/include/dapl_debug.h \
+	     dapl/include/dapl_ipoib_names.h \
+	     dapl/include/dapl_vendor.h \
+	     dapl/openib_cma/dapl_ib_dto.h \
+	     dapl/openib_cma/dapl_ib_util.h \
+	     dapl/openib_cma/linux/openib_osd.h \
+	     dapl/openib_scm/dapl_ib_dto.h \
+	     dapl/openib_scm/dapl_ib_util.h \
+	     dapl/openib_scm/linux/openib_osd.h \
+	     dat/udat/libdat2.map \
+	     dapl/udapl/libdaplofa.map \
+	     dapl/udapl/libdaploscm.map \
+	     dapl.spec.in \
+	     $(man_MANS) \
+	     test/dapltest/include/dapl_bpool.h \
+	     test/dapltest/include/dapl_client_info.h \
+	     test/dapltest/include/dapl_common.h \
+	     test/dapltest/include/dapl_execute.h \
+	     test/dapltest/include/dapl_fft_cmd.h \
+	     test/dapltest/include/dapl_fft_util.h \
+	     test/dapltest/include/dapl_getopt.h \
+	     test/dapltest/include/dapl_global.h \
+	     test/dapltest/include/dapl_limit_cmd.h \
+	     test/dapltest/include/dapl_mdep.h \
+	     test/dapltest/include/dapl_memlist.h \
+	     test/dapltest/include/dapl_params.h \
+	     test/dapltest/include/dapl_performance_cmd.h \
+	     test/dapltest/include/dapl_performance_stats.h \
+	     test/dapltest/include/dapl_performance_test.h \
+	     test/dapltest/include/dapl_proto.h \
+	     test/dapltest/include/dapl_quit_cmd.h \
+	     test/dapltest/include/dapl_server_cmd.h \
+	     test/dapltest/include/dapl_server_info.h \
+	     test/dapltest/include/dapl_tdep.h \
+	     test/dapltest/include/dapl_tdep_print.h \
+	     test/dapltest/include/dapl_test_data.h \
+	     test/dapltest/include/dapl_transaction_cmd.h \
+	     test/dapltest/include/dapl_transaction_stats.h \
+	     test/dapltest/include/dapl_transaction_test.h \
+	     test/dapltest/include/dapl_version.h \
+	     test/dapltest/mdep/linux/dapl_mdep_user.h
+
+SUBDIRS = . test/dtest test/dapltest
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh:
+	@:
+$(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  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f 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)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+dapl.spec: $(top_builddir)/config.status $(srcdir)/dapl.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-dapllibofaLTLIBRARIES: $(dapllibofa_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(dapllibofadir)" || $(MKDIR_P) "$(DESTDIR)$(dapllibofadir)"
+	@list='$(dapllibofa_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(dapllibofaLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(dapllibofadir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(dapllibofaLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(dapllibofadir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-dapllibofaLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dapllibofa_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dapllibofadir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dapllibofadir)/$$p"; \
+	done
+
+clean-dapllibofaLTLIBRARIES:
+	-test -z "$(dapllibofa_LTLIBRARIES)" || rm -f $(dapllibofa_LTLIBRARIES)
+	@list='$(dapllibofa_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+install-daplliboscmLTLIBRARIES: $(daplliboscm_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(daplliboscmdir)" || $(MKDIR_P) "$(DESTDIR)$(daplliboscmdir)"
+	@list='$(daplliboscm_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(daplliboscmLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(daplliboscmdir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(daplliboscmLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(daplliboscmdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-daplliboscmLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(daplliboscm_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(daplliboscmdir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(daplliboscmdir)/$$p"; \
+	done
+
+clean-daplliboscmLTLIBRARIES:
+	-test -z "$(daplliboscm_LTLIBRARIES)" || rm -f $(daplliboscm_LTLIBRARIES)
+	@list='$(daplliboscm_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+install-datlibLTLIBRARIES: $(datlib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(datlibdir)" || $(MKDIR_P) "$(DESTDIR)$(datlibdir)"
+	@list='$(datlib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(datlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(datlibdir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(datlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(datlibdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-datlibLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(datlib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(datlibdir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(datlibdir)/$$p"; \
+	done
+
+clean-datlibLTLIBRARIES:
+	-test -z "$(datlib_LTLIBRARIES)" || rm -f $(datlib_LTLIBRARIES)
+	@list='$(datlib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+dapl/udapl/$(am__dirstamp):
+	@$(MKDIR_P) dapl/udapl
+	@: > dapl/udapl/$(am__dirstamp)
+dapl/udapl/libdaplofa.la: $(dapl_udapl_libdaplofa_la_OBJECTS) $(dapl_udapl_libdaplofa_la_DEPENDENCIES) dapl/udapl/$(am__dirstamp)
+	$(dapl_udapl_libdaplofa_la_LINK) -rpath $(dapllibofadir) $(dapl_udapl_libdaplofa_la_OBJECTS) $(dapl_udapl_libdaplofa_la_LIBADD) $(LIBS)
+dapl/udapl/libdaploscm.la: $(dapl_udapl_libdaploscm_la_OBJECTS) $(dapl_udapl_libdaploscm_la_DEPENDENCIES) dapl/udapl/$(am__dirstamp)
+	$(dapl_udapl_libdaploscm_la_LINK) -rpath $(daplliboscmdir) $(dapl_udapl_libdaploscm_la_OBJECTS) $(dapl_udapl_libdaploscm_la_LIBADD) $(LIBS)
+dat/udat/$(am__dirstamp):
+	@$(MKDIR_P) dat/udat
+	@: > dat/udat/$(am__dirstamp)
+dat/udat/libdat2.la: $(dat_udat_libdat2_la_OBJECTS) $(dat_udat_libdat2_la_DEPENDENCIES) dat/udat/$(am__dirstamp)
+	$(dat_udat_libdat2_la_LINK) -rpath $(datlibdir) $(dat_udat_libdat2_la_OBJECTS) $(dat_udat_libdat2_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cookie.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_accept.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_callback.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_handoff.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_reject.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_csp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_debug.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_disconnect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_get_status.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_modify.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_recv_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_reset.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dequeue.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_disable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_enable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_post_se.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_handle_type.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hash.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hca_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_close.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_ha.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_open.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_extensions.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_mem.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_qp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_init.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_llist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_mr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_name_service.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_osd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_provider.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create_any.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_bind.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_set_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_sp_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_set_lw.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_timer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cookie.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_accept.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_callback.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_handoff.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_reject.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_csp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_debug.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_disconnect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_get_status.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_modify.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_recv_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_reset.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dequeue.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_disable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_enable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_post_se.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_handle_type.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hash.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hca_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_close.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_ha.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_open.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_extensions.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_mem.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_qp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_init.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_llist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_mr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_name_service.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_osd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_provider.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create_any.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_bind.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_set_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_sp_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_set_lw.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_timer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-dat_api.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-dat_dictionary.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-dat_dr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-dat_init.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-dat_osd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-dat_sr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-dat_strerror.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-udat.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-udat_api.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat2_la-udat_sr_parser.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(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@	mv -f $(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@	mv -f $(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 $@ $<
+
+dapl_udapl_libdaplofa_la-dapl_init.lo: dapl/udapl/dapl_init.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_init.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_init.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_init.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_init.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_init.c' object='dapl_udapl_libdaplofa_la-dapl_init.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_create.lo: dapl/udapl/dapl_evd_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_create.lo `test -f 'dapl/udapl/dapl_evd_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_create.c' object='dapl_udapl_libdaplofa_la-dapl_evd_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_create.lo `test -f 'dapl/udapl/dapl_evd_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_create.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_query.lo: dapl/udapl/dapl_evd_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_query.lo `test -f 'dapl/udapl/dapl_evd_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_query.c' object='dapl_udapl_libdaplofa_la-dapl_evd_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_query.lo `test -f 'dapl/udapl/dapl_evd_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_query.c
+
+dapl_udapl_libdaplofa_la-dapl_cno_create.lo: dapl/udapl/dapl_cno_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cno_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cno_create.lo `test -f 'dapl/udapl/dapl_cno_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_create.c' object='dapl_udapl_libdaplofa_la-dapl_cno_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cno_create.lo `test -f 'dapl/udapl/dapl_cno_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_create.c
+
+dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.lo: dapl/udapl/dapl_cno_modify_agent.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.lo `test -f 'dapl/udapl/dapl_cno_modify_agent.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_modify_agent.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_modify_agent.c' object='dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cno_modify_agent.lo `test -f 'dapl/udapl/dapl_cno_modify_agent.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_modify_agent.c
+
+dapl_udapl_libdaplofa_la-dapl_cno_free.lo: dapl/udapl/dapl_cno_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cno_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cno_free.lo `test -f 'dapl/udapl/dapl_cno_free.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_free.c' object='dapl_udapl_libdaplofa_la-dapl_cno_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cno_free.lo `test -f 'dapl/udapl/dapl_cno_free.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_free.c
+
+dapl_udapl_libdaplofa_la-dapl_cno_wait.lo: dapl/udapl/dapl_cno_wait.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cno_wait.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_wait.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cno_wait.lo `test -f 'dapl/udapl/dapl_cno_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_wait.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_wait.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_wait.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_wait.c' object='dapl_udapl_libdaplofa_la-dapl_cno_wait.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cno_wait.lo `test -f 'dapl/udapl/dapl_cno_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_wait.c
+
+dapl_udapl_libdaplofa_la-dapl_cno_query.lo: dapl/udapl/dapl_cno_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cno_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cno_query.lo `test -f 'dapl/udapl/dapl_cno_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_query.c' object='dapl_udapl_libdaplofa_la-dapl_cno_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cno_query.lo `test -f 'dapl/udapl/dapl_cno_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_query.c
+
+dapl_udapl_libdaplofa_la-dapl_lmr_create.lo: dapl/udapl/dapl_lmr_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_lmr_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_lmr_create.lo `test -f 'dapl/udapl/dapl_lmr_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_lmr_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_lmr_create.c' object='dapl_udapl_libdaplofa_la-dapl_lmr_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_lmr_create.lo `test -f 'dapl/udapl/dapl_lmr_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_lmr_create.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_wait.lo: dapl/udapl/dapl_evd_wait.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_wait.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_wait.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_wait.lo `test -f 'dapl/udapl/dapl_evd_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_wait.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_wait.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_wait.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_wait.c' object='dapl_udapl_libdaplofa_la-dapl_evd_wait.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_wait.lo `test -f 'dapl/udapl/dapl_evd_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_wait.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_disable.lo: dapl/udapl/dapl_evd_disable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_disable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_disable.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_disable.lo `test -f 'dapl/udapl/dapl_evd_disable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_disable.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_disable.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_disable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_disable.c' object='dapl_udapl_libdaplofa_la-dapl_evd_disable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_disable.lo `test -f 'dapl/udapl/dapl_evd_disable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_disable.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_enable.lo: dapl/udapl/dapl_evd_enable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_enable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_enable.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_enable.lo `test -f 'dapl/udapl/dapl_evd_enable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_enable.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_enable.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_enable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_enable.c' object='dapl_udapl_libdaplofa_la-dapl_evd_enable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_enable.lo `test -f 'dapl/udapl/dapl_evd_enable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_enable.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.lo: dapl/udapl/dapl_evd_modify_cno.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.lo `test -f 'dapl/udapl/dapl_evd_modify_cno.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_modify_cno.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_modify_cno.c' object='dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_modify_cno.lo `test -f 'dapl/udapl/dapl_evd_modify_cno.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_modify_cno.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.lo: dapl/udapl/dapl_evd_set_unwaitable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_set_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_set_u [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_set_unwaitable.c' object='dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_set_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_set_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_set_unwaitable.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.lo: dapl/udapl/dapl_evd_clear_unwaitable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_clear_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_e [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_clear_unwaitable.c' object='dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_clear_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_clear_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_clear_unwaitable.c
+
+dapl_udapl_libdaplofa_la-dapl_osd.lo: dapl/udapl/linux/dapl_osd.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_osd.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_osd.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_osd.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_osd.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/linux/dapl_osd.c' object='dapl_udapl_libdaplofa_la-dapl_osd.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c
+
+dapl_udapl_libdaplofa_la-dapl_cookie.lo: dapl/common/dapl_cookie.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cookie.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cookie.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cookie.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cookie.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cookie.c' object='dapl_udapl_libdaplofa_la-dapl_cookie.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c
+
+dapl_udapl_libdaplofa_la-dapl_cr_accept.lo: dapl/common/dapl_cr_accept.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cr_accept.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_accept.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cr_accept.lo `test -f 'dapl/common/dapl_cr_accept.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_accept.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_accept.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_accept.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_accept.c' object='dapl_udapl_libdaplofa_la-dapl_cr_accept.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cr_accept.lo `test -f 'dapl/common/dapl_cr_accept.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_accept.c
+
+dapl_udapl_libdaplofa_la-dapl_cr_query.lo: dapl/common/dapl_cr_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cr_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cr_query.lo `test -f 'dapl/common/dapl_cr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_query.c' object='dapl_udapl_libdaplofa_la-dapl_cr_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cr_query.lo `test -f 'dapl/common/dapl_cr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_query.c
+
+dapl_udapl_libdaplofa_la-dapl_cr_reject.lo: dapl/common/dapl_cr_reject.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cr_reject.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_reject.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cr_reject.lo `test -f 'dapl/common/dapl_cr_reject.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_reject.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_reject.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_reject.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_reject.c' object='dapl_udapl_libdaplofa_la-dapl_cr_reject.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cr_reject.lo `test -f 'dapl/common/dapl_cr_reject.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_reject.c
+
+dapl_udapl_libdaplofa_la-dapl_cr_util.lo: dapl/common/dapl_cr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cr_util.lo `test -f 'dapl/common/dapl_cr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_util.c' object='dapl_udapl_libdaplofa_la-dapl_cr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cr_util.lo `test -f 'dapl/common/dapl_cr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_util.c
+
+dapl_udapl_libdaplofa_la-dapl_cr_callback.lo: dapl/common/dapl_cr_callback.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cr_callback.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_callback.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cr_callback.lo `test -f 'dapl/common/dapl_cr_callback.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_callback.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_callback.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_callback.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_callback.c' object='dapl_udapl_libdaplofa_la-dapl_cr_callback.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cr_callback.lo `test -f 'dapl/common/dapl_cr_callback.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_callback.c
+
+dapl_udapl_libdaplofa_la-dapl_cr_handoff.lo: dapl/common/dapl_cr_handoff.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cr_handoff.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_handoff.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cr_handoff.lo `test -f 'dapl/common/dapl_cr_handoff.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_handoff.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_handoff.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cr_handoff.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_handoff.c' object='dapl_udapl_libdaplofa_la-dapl_cr_handoff.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cr_handoff.lo `test -f 'dapl/common/dapl_cr_handoff.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_handoff.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_connect.lo: dapl/common/dapl_ep_connect.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_connect.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_connect.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_connect.lo `test -f 'dapl/common/dapl_ep_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_connect.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_connect.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_connect.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_connect.c' object='dapl_udapl_libdaplofa_la-dapl_ep_connect.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_connect.lo `test -f 'dapl/common/dapl_ep_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_connect.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_create.lo: dapl/common/dapl_ep_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_create.lo `test -f 'dapl/common/dapl_ep_create.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create.c' object='dapl_udapl_libdaplofa_la-dapl_ep_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_create.lo `test -f 'dapl/common/dapl_ep_create.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_disconnect.lo: dapl/common/dapl_ep_disconnect.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_disconnect.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_disconnect.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_disconnect.lo `test -f 'dapl/common/dapl_ep_disconnect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_disconnect.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_disconnect.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_disconnect.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_disconnect.c' object='dapl_udapl_libdaplofa_la-dapl_ep_disconnect.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_disconnect.lo `test -f 'dapl/common/dapl_ep_disconnect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_disconnect.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.lo: dapl/common/dapl_ep_dup_connect.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.lo `test -f 'dapl/common/dapl_ep_dup_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_dup_connect.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_dup_connect.c' object='dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_dup_connect.lo `test -f 'dapl/common/dapl_ep_dup_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_dup_connect.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_free.lo: dapl/common/dapl_ep_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_free.lo `test -f 'dapl/common/dapl_ep_free.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_free.c' object='dapl_udapl_libdaplofa_la-dapl_ep_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_free.lo `test -f 'dapl/common/dapl_ep_free.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_free.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_reset.lo: dapl/common/dapl_ep_reset.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_reset.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_reset.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_reset.lo `test -f 'dapl/common/dapl_ep_reset.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_reset.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_reset.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_reset.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_reset.c' object='dapl_udapl_libdaplofa_la-dapl_ep_reset.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_reset.lo `test -f 'dapl/common/dapl_ep_reset.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_reset.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_get_status.lo: dapl/common/dapl_ep_get_status.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_get_status.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_get_status.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_get_status.lo `test -f 'dapl/common/dapl_ep_get_status.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_get_status.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_get_status.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_get_status.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_get_status.c' object='dapl_udapl_libdaplofa_la-dapl_ep_get_status.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_get_status.lo `test -f 'dapl/common/dapl_ep_get_status.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_get_status.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_modify.lo: dapl/common/dapl_ep_modify.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_modify.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_modify.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_modify.lo `test -f 'dapl/common/dapl_ep_modify.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_modify.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_modify.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_modify.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_modify.c' object='dapl_udapl_libdaplofa_la-dapl_ep_modify.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_modify.lo `test -f 'dapl/common/dapl_ep_modify.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_modify.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.lo: dapl/common/dapl_ep_post_rdma_read.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.lo `test -f 'dapl/common/dapl_ep_post_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_rdm [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_read.c' object='dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read.lo `test -f 'dapl/common/dapl_ep_post_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_rdma_read.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.lo: dapl/common/dapl_ep_post_rdma_write.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.lo `test -f 'dapl/common/dapl_ep_post_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_write.c' object='dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_write.lo `test -f 'dapl/common/dapl_ep_post_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_rdma_write.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_post_recv.lo: dapl/common/dapl_ep_post_recv.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_post_recv.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_recv.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_recv.lo `test -f 'dapl/common/dapl_ep_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_recv.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_recv.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_recv.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_recv.c' object='dapl_udapl_libdaplofa_la-dapl_ep_post_recv.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_recv.lo `test -f 'dapl/common/dapl_ep_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_recv.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_post_send.lo: dapl/common/dapl_ep_post_send.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_post_send.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_send.lo `test -f 'dapl/common/dapl_ep_post_send.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_send.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_send.c' object='dapl_udapl_libdaplofa_la-dapl_ep_post_send.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_send.lo `test -f 'dapl/common/dapl_ep_post_send.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_send.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_query.lo: dapl/common/dapl_ep_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_query.lo `test -f 'dapl/common/dapl_ep_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_query.c' object='dapl_udapl_libdaplofa_la-dapl_ep_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_query.lo `test -f 'dapl/common/dapl_ep_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_query.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_util.lo: dapl/common/dapl_ep_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_util.lo `test -f 'dapl/common/dapl_ep_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_util.c' object='dapl_udapl_libdaplofa_la-dapl_ep_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_util.lo `test -f 'dapl/common/dapl_ep_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_util.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_dequeue.lo: dapl/common/dapl_evd_dequeue.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_dequeue.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dequeue.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_dequeue.lo `test -f 'dapl/common/dapl_evd_dequeue.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dequeue.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dequeue.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dequeue.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dequeue.c' object='dapl_udapl_libdaplofa_la-dapl_evd_dequeue.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_dequeue.lo `test -f 'dapl/common/dapl_evd_dequeue.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dequeue.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_free.lo: dapl/common/dapl_evd_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_free.lo `test -f 'dapl/common/dapl_evd_free.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_free.c' object='dapl_udapl_libdaplofa_la-dapl_evd_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_free.lo `test -f 'dapl/common/dapl_evd_free.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_free.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_post_se.lo: dapl/common/dapl_evd_post_se.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_post_se.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_post_se.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_post_se.lo `test -f 'dapl/common/dapl_evd_post_se.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_post_se.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_post_se.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_post_se.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_post_se.c' object='dapl_udapl_libdaplofa_la-dapl_evd_post_se.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_post_se.lo `test -f 'dapl/common/dapl_evd_post_se.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_post_se.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_resize.lo: dapl/common/dapl_evd_resize.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_resize.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_resize.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_resize.lo `test -f 'dapl/common/dapl_evd_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_resize.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_resize.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_resize.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_resize.c' object='dapl_udapl_libdaplofa_la-dapl_evd_resize.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_resize.lo `test -f 'dapl/common/dapl_evd_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_resize.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_util.lo: dapl/common/dapl_evd_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_util.lo `test -f 'dapl/common/dapl_evd_util.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_util.c' object='dapl_udapl_libdaplofa_la-dapl_evd_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_util.lo `test -f 'dapl/common/dapl_evd_util.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_util.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.lo: dapl/common/dapl_evd_cq_async_error_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.lo `test -f 'dapl/common/dapl_evd_cq_async_error_callb.c' || echo '$(srcdir)/'` [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_cq_async_error_callb.c' object='dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_cq_async_error_callb.lo `test -f 'dapl/common/dapl_evd_cq_async_error_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_cq_async_error_callb.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.lo: dapl/common/dapl_evd_qp_async_error_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.lo `test -f 'dapl/common/dapl_evd_qp_async_error_callb.c' || echo '$(srcdir)/'` [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_qp_async_error_callb.c' object='dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_qp_async_error_callb.lo `test -f 'dapl/common/dapl_evd_qp_async_error_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_qp_async_error_callb.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.lo: dapl/common/dapl_evd_un_async_error_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.lo `test -f 'dapl/common/dapl_evd_un_async_error_callb.c' || echo '$(srcdir)/'` [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_un_async_error_callb.c' object='dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_un_async_error_callb.lo `test -f 'dapl/common/dapl_evd_un_async_error_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_un_async_error_callb.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.lo: dapl/common/dapl_evd_connection_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.lo `test -f 'dapl/common/dapl_evd_connection_callb.c' || echo '$(srcdir)/'`dapl/common/dapl [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_connection_callb.c' object='dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_connection_callb.lo `test -f 'dapl/common/dapl_evd_connection_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_connection_callb.c
+
+dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.lo: dapl/common/dapl_evd_dto_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.lo `test -f 'dapl/common/dapl_evd_dto_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dto_callb.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dto_callb.c' object='dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_evd_dto_callb.lo `test -f 'dapl/common/dapl_evd_dto_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dto_callb.c
+
+dapl_udapl_libdaplofa_la-dapl_get_consumer_context.lo: dapl/common/dapl_get_consumer_context.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_get_consumer_context.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_consumer_context.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_get_consumer_context.lo `test -f 'dapl/common/dapl_get_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_consumer_context.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_consumer_context.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_consumer_context.c' object='dapl_udapl_libdaplofa_la-dapl_get_consumer_context.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_get_consumer_context.lo `test -f 'dapl/common/dapl_get_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_get_consumer_context.c
+
+dapl_udapl_libdaplofa_la-dapl_get_handle_type.lo: dapl/common/dapl_get_handle_type.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_get_handle_type.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_handle_type.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_get_handle_type.lo `test -f 'dapl/common/dapl_get_handle_type.c' || echo '$(srcdir)/'`dapl/common/dapl_get_handle_type.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_handle_type.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_get_handle_type.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_handle_type.c' object='dapl_udapl_libdaplofa_la-dapl_get_handle_type.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_get_handle_type.lo `test -f 'dapl/common/dapl_get_handle_type.c' || echo '$(srcdir)/'`dapl/common/dapl_get_handle_type.c
+
+dapl_udapl_libdaplofa_la-dapl_hash.lo: dapl/common/dapl_hash.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_hash.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hash.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hash.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hash.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hash.c' object='dapl_udapl_libdaplofa_la-dapl_hash.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c
+
+dapl_udapl_libdaplofa_la-dapl_hca_util.lo: dapl/common/dapl_hca_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_hca_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hca_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_hca_util.lo `test -f 'dapl/common/dapl_hca_util.c' || echo '$(srcdir)/'`dapl/common/dapl_hca_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hca_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_hca_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hca_util.c' object='dapl_udapl_libdaplofa_la-dapl_hca_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_hca_util.lo `test -f 'dapl/common/dapl_hca_util.c' || echo '$(srcdir)/'`dapl/common/dapl_hca_util.c
+
+dapl_udapl_libdaplofa_la-dapl_ia_close.lo: dapl/common/dapl_ia_close.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ia_close.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_close.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ia_close.lo `test -f 'dapl/common/dapl_ia_close.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_close.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_close.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_close.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_close.c' object='dapl_udapl_libdaplofa_la-dapl_ia_close.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ia_close.lo `test -f 'dapl/common/dapl_ia_close.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_close.c
+
+dapl_udapl_libdaplofa_la-dapl_ia_open.lo: dapl/common/dapl_ia_open.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ia_open.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_open.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ia_open.lo `test -f 'dapl/common/dapl_ia_open.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_open.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_open.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_open.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_open.c' object='dapl_udapl_libdaplofa_la-dapl_ia_open.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ia_open.lo `test -f 'dapl/common/dapl_ia_open.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_open.c
+
+dapl_udapl_libdaplofa_la-dapl_ia_query.lo: dapl/common/dapl_ia_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ia_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ia_query.lo `test -f 'dapl/common/dapl_ia_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_query.c' object='dapl_udapl_libdaplofa_la-dapl_ia_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ia_query.lo `test -f 'dapl/common/dapl_ia_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_query.c
+
+dapl_udapl_libdaplofa_la-dapl_ia_util.lo: dapl/common/dapl_ia_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ia_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ia_util.lo `test -f 'dapl/common/dapl_ia_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_util.c' object='dapl_udapl_libdaplofa_la-dapl_ia_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ia_util.lo `test -f 'dapl/common/dapl_ia_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_util.c
+
+dapl_udapl_libdaplofa_la-dapl_llist.lo: dapl/common/dapl_llist.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_llist.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_llist.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_llist.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_llist.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_llist.c' object='dapl_udapl_libdaplofa_la-dapl_llist.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c
+
+dapl_udapl_libdaplofa_la-dapl_lmr_free.lo: dapl/common/dapl_lmr_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_lmr_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_lmr_free.lo `test -f 'dapl/common/dapl_lmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_free.c' object='dapl_udapl_libdaplofa_la-dapl_lmr_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_lmr_free.lo `test -f 'dapl/common/dapl_lmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_free.c
+
+dapl_udapl_libdaplofa_la-dapl_lmr_query.lo: dapl/common/dapl_lmr_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_lmr_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_lmr_query.lo `test -f 'dapl/common/dapl_lmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_query.c' object='dapl_udapl_libdaplofa_la-dapl_lmr_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_lmr_query.lo `test -f 'dapl/common/dapl_lmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_query.c
+
+dapl_udapl_libdaplofa_la-dapl_lmr_util.lo: dapl/common/dapl_lmr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_lmr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_lmr_util.lo `test -f 'dapl/common/dapl_lmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_util.c' object='dapl_udapl_libdaplofa_la-dapl_lmr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_lmr_util.lo `test -f 'dapl/common/dapl_lmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_util.c
+
+dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.lo: dapl/common/dapl_lmr_sync_rdma_read.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_syn [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_read.c' object='dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_read.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_sync_rdma_read.c
+
+dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.lo: dapl/common/dapl_lmr_sync_rdma_write.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_write.c' object='dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_lmr_sync_rdma_write.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_sync_rdma_write.c
+
+dapl_udapl_libdaplofa_la-dapl_mr_util.lo: dapl/common/dapl_mr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_mr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_mr_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_mr_util.lo `test -f 'dapl/common/dapl_mr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_mr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_mr_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_mr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_mr_util.c' object='dapl_udapl_libdaplofa_la-dapl_mr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_mr_util.lo `test -f 'dapl/common/dapl_mr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_mr_util.c
+
+dapl_udapl_libdaplofa_la-dapl_provider.lo: dapl/common/dapl_provider.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_provider.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_provider.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_provider.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_provider.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_provider.c' object='dapl_udapl_libdaplofa_la-dapl_provider.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c
+
+dapl_udapl_libdaplofa_la-dapl_sp_util.lo: dapl/common/dapl_sp_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_sp_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_sp_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_sp_util.lo `test -f 'dapl/common/dapl_sp_util.c' || echo '$(srcdir)/'`dapl/common/dapl_sp_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_sp_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_sp_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_sp_util.c' object='dapl_udapl_libdaplofa_la-dapl_sp_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_sp_util.lo `test -f 'dapl/common/dapl_sp_util.c' || echo '$(srcdir)/'`dapl/common/dapl_sp_util.c
+
+dapl_udapl_libdaplofa_la-dapl_psp_create.lo: dapl/common/dapl_psp_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_psp_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_psp_create.lo `test -f 'dapl/common/dapl_psp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create.c' object='dapl_udapl_libdaplofa_la-dapl_psp_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_psp_create.lo `test -f 'dapl/common/dapl_psp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create.c
+
+dapl_udapl_libdaplofa_la-dapl_psp_create_any.lo: dapl/common/dapl_psp_create_any.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_psp_create_any.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create_any.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_psp_create_any.lo `test -f 'dapl/common/dapl_psp_create_any.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create_any.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create_any.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_create_any.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create_any.c' object='dapl_udapl_libdaplofa_la-dapl_psp_create_any.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_psp_create_any.lo `test -f 'dapl/common/dapl_psp_create_any.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create_any.c
+
+dapl_udapl_libdaplofa_la-dapl_psp_free.lo: dapl/common/dapl_psp_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_psp_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_psp_free.lo `test -f 'dapl/common/dapl_psp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_free.c' object='dapl_udapl_libdaplofa_la-dapl_psp_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_psp_free.lo `test -f 'dapl/common/dapl_psp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_free.c
+
+dapl_udapl_libdaplofa_la-dapl_psp_query.lo: dapl/common/dapl_psp_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_psp_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_psp_query.lo `test -f 'dapl/common/dapl_psp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_psp_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_query.c' object='dapl_udapl_libdaplofa_la-dapl_psp_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_psp_query.lo `test -f 'dapl/common/dapl_psp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_query.c
+
+dapl_udapl_libdaplofa_la-dapl_pz_create.lo: dapl/common/dapl_pz_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_pz_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_pz_create.lo `test -f 'dapl/common/dapl_pz_create.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_create.c' object='dapl_udapl_libdaplofa_la-dapl_pz_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_pz_create.lo `test -f 'dapl/common/dapl_pz_create.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_create.c
+
+dapl_udapl_libdaplofa_la-dapl_pz_free.lo: dapl/common/dapl_pz_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_pz_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_pz_free.lo `test -f 'dapl/common/dapl_pz_free.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_free.c' object='dapl_udapl_libdaplofa_la-dapl_pz_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_pz_free.lo `test -f 'dapl/common/dapl_pz_free.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_free.c
+
+dapl_udapl_libdaplofa_la-dapl_pz_query.lo: dapl/common/dapl_pz_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_pz_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_pz_query.lo `test -f 'dapl/common/dapl_pz_query.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_query.c' object='dapl_udapl_libdaplofa_la-dapl_pz_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_pz_query.lo `test -f 'dapl/common/dapl_pz_query.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_query.c
+
+dapl_udapl_libdaplofa_la-dapl_pz_util.lo: dapl/common/dapl_pz_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_pz_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_pz_util.lo `test -f 'dapl/common/dapl_pz_util.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_pz_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_util.c' object='dapl_udapl_libdaplofa_la-dapl_pz_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_pz_util.lo `test -f 'dapl/common/dapl_pz_util.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_util.c
+
+dapl_udapl_libdaplofa_la-dapl_rmr_create.lo: dapl/common/dapl_rmr_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rmr_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rmr_create.lo `test -f 'dapl/common/dapl_rmr_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_create.c' object='dapl_udapl_libdaplofa_la-dapl_rmr_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rmr_create.lo `test -f 'dapl/common/dapl_rmr_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_create.c
+
+dapl_udapl_libdaplofa_la-dapl_rmr_free.lo: dapl/common/dapl_rmr_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rmr_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rmr_free.lo `test -f 'dapl/common/dapl_rmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_free.c' object='dapl_udapl_libdaplofa_la-dapl_rmr_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rmr_free.lo `test -f 'dapl/common/dapl_rmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_free.c
+
+dapl_udapl_libdaplofa_la-dapl_rmr_bind.lo: dapl/common/dapl_rmr_bind.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rmr_bind.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_bind.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rmr_bind.lo `test -f 'dapl/common/dapl_rmr_bind.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_bind.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_bind.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_bind.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_bind.c' object='dapl_udapl_libdaplofa_la-dapl_rmr_bind.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rmr_bind.lo `test -f 'dapl/common/dapl_rmr_bind.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_bind.c
+
+dapl_udapl_libdaplofa_la-dapl_rmr_query.lo: dapl/common/dapl_rmr_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rmr_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rmr_query.lo `test -f 'dapl/common/dapl_rmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_query.c' object='dapl_udapl_libdaplofa_la-dapl_rmr_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rmr_query.lo `test -f 'dapl/common/dapl_rmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_query.c
+
+dapl_udapl_libdaplofa_la-dapl_rmr_util.lo: dapl/common/dapl_rmr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rmr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rmr_util.lo `test -f 'dapl/common/dapl_rmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rmr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_util.c' object='dapl_udapl_libdaplofa_la-dapl_rmr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rmr_util.lo `test -f 'dapl/common/dapl_rmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_util.c
+
+dapl_udapl_libdaplofa_la-dapl_rsp_create.lo: dapl/common/dapl_rsp_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rsp_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rsp_create.lo `test -f 'dapl/common/dapl_rsp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_create.c' object='dapl_udapl_libdaplofa_la-dapl_rsp_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rsp_create.lo `test -f 'dapl/common/dapl_rsp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_create.c
+
+dapl_udapl_libdaplofa_la-dapl_rsp_free.lo: dapl/common/dapl_rsp_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rsp_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rsp_free.lo `test -f 'dapl/common/dapl_rsp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_free.c' object='dapl_udapl_libdaplofa_la-dapl_rsp_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rsp_free.lo `test -f 'dapl/common/dapl_rsp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_free.c
+
+dapl_udapl_libdaplofa_la-dapl_rsp_query.lo: dapl/common/dapl_rsp_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_rsp_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_rsp_query.lo `test -f 'dapl/common/dapl_rsp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_rsp_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_query.c' object='dapl_udapl_libdaplofa_la-dapl_rsp_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_rsp_query.lo `test -f 'dapl/common/dapl_rsp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_query.c
+
+dapl_udapl_libdaplofa_la-dapl_cno_util.lo: dapl/common/dapl_cno_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_cno_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_cno_util.lo `test -f 'dapl/common/dapl_cno_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cno_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_cno_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cno_util.c' object='dapl_udapl_libdaplofa_la-dapl_cno_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_cno_util.lo `test -f 'dapl/common/dapl_cno_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cno_util.c
+
+dapl_udapl_libdaplofa_la-dapl_set_consumer_context.lo: dapl/common/dapl_set_consumer_context.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_set_consumer_context.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_set_consumer_context.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_set_consumer_context.lo `test -f 'dapl/common/dapl_set_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_set_consumer_context.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_set_consumer_context.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_set_consumer_context.c' object='dapl_udapl_libdaplofa_la-dapl_set_consumer_context.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_set_consumer_context.lo `test -f 'dapl/common/dapl_set_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_set_consumer_context.c
+
+dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.lo: dapl/common/dapl_ring_buffer_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.lo `test -f 'dapl/common/dapl_ring_buffer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ring_buffer_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ring_buffer_util.c' object='dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ring_buffer_util.lo `test -f 'dapl/common/dapl_ring_buffer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ring_buffer_util.c
+
+dapl_udapl_libdaplofa_la-dapl_name_service.lo: dapl/common/dapl_name_service.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_name_service.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_name_service.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_name_service.lo `test -f 'dapl/common/dapl_name_service.c' || echo '$(srcdir)/'`dapl/common/dapl_name_service.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_name_service.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_name_service.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_name_service.c' object='dapl_udapl_libdaplofa_la-dapl_name_service.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_name_service.lo `test -f 'dapl/common/dapl_name_service.c' || echo '$(srcdir)/'`dapl/common/dapl_name_service.c
+
+dapl_udapl_libdaplofa_la-dapl_timer_util.lo: dapl/common/dapl_timer_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_timer_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_timer_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_timer_util.lo `test -f 'dapl/common/dapl_timer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_timer_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_timer_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_timer_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_timer_util.c' object='dapl_udapl_libdaplofa_la-dapl_timer_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_timer_util.lo `test -f 'dapl/common/dapl_timer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_timer_util.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.lo: dapl/common/dapl_ep_create_with_srq.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.lo `test -f 'dapl/common/dapl_ep_create_with_srq.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_crea [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create_with_srq.c' object='dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_create_with_srq.lo `test -f 'dapl/common/dapl_ep_create_with_srq.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create_with_srq.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_recv_query.lo: dapl/common/dapl_ep_recv_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_recv_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_recv_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_recv_query.lo `test -f 'dapl/common/dapl_ep_recv_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_recv_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_recv_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_recv_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_recv_query.c' object='dapl_udapl_libdaplofa_la-dapl_ep_recv_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_recv_query.lo `test -f 'dapl/common/dapl_ep_recv_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_recv_query.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.lo: dapl/common/dapl_ep_set_watermark.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.lo `test -f 'dapl/common/dapl_ep_set_watermark.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_set_watermark.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_set_watermark.c' object='dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_set_watermark.lo `test -f 'dapl/common/dapl_ep_set_watermark.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_set_watermark.c
+
+dapl_udapl_libdaplofa_la-dapl_srq_create.lo: dapl/common/dapl_srq_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_srq_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_create.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_srq_create.lo `test -f 'dapl/common/dapl_srq_create.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_create.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_create.c' object='dapl_udapl_libdaplofa_la-dapl_srq_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_srq_create.lo `test -f 'dapl/common/dapl_srq_create.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_create.c
+
+dapl_udapl_libdaplofa_la-dapl_srq_free.lo: dapl/common/dapl_srq_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_srq_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_free.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_srq_free.lo `test -f 'dapl/common/dapl_srq_free.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_free.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_free.c' object='dapl_udapl_libdaplofa_la-dapl_srq_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_srq_free.lo `test -f 'dapl/common/dapl_srq_free.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_free.c
+
+dapl_udapl_libdaplofa_la-dapl_srq_query.lo: dapl/common/dapl_srq_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_srq_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_query.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_srq_query.lo `test -f 'dapl/common/dapl_srq_query.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_query.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_query.c' object='dapl_udapl_libdaplofa_la-dapl_srq_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_srq_query.lo `test -f 'dapl/common/dapl_srq_query.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_query.c
+
+dapl_udapl_libdaplofa_la-dapl_srq_resize.lo: dapl/common/dapl_srq_resize.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_srq_resize.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_resize.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_srq_resize.lo `test -f 'dapl/common/dapl_srq_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_resize.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_resize.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_resize.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_resize.c' object='dapl_udapl_libdaplofa_la-dapl_srq_resize.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_srq_resize.lo `test -f 'dapl/common/dapl_srq_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_resize.c
+
+dapl_udapl_libdaplofa_la-dapl_srq_post_recv.lo: dapl/common/dapl_srq_post_recv.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_srq_post_recv.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_post_recv.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_srq_post_recv.lo `test -f 'dapl/common/dapl_srq_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_post_recv.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_post_recv.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_post_recv.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_post_recv.c' object='dapl_udapl_libdaplofa_la-dapl_srq_post_recv.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_srq_post_recv.lo `test -f 'dapl/common/dapl_srq_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_post_recv.c
+
+dapl_udapl_libdaplofa_la-dapl_srq_set_lw.lo: dapl/common/dapl_srq_set_lw.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_srq_set_lw.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_set_lw.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_srq_set_lw.lo `test -f 'dapl/common/dapl_srq_set_lw.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_set_lw.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_set_lw.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_set_lw.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_set_lw.c' object='dapl_udapl_libdaplofa_la-dapl_srq_set_lw.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_srq_set_lw.lo `test -f 'dapl/common/dapl_srq_set_lw.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_set_lw.c
+
+dapl_udapl_libdaplofa_la-dapl_srq_util.lo: dapl/common/dapl_srq_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_srq_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_srq_util.lo `test -f 'dapl/common/dapl_srq_util.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_srq_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_util.c' object='dapl_udapl_libdaplofa_la-dapl_srq_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_srq_util.lo `test -f 'dapl/common/dapl_srq_util.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_util.c
+
+dapl_udapl_libdaplofa_la-dapl_debug.lo: dapl/common/dapl_debug.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_debug.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_debug.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_debug.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_debug.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_debug.c' object='dapl_udapl_libdaplofa_la-dapl_debug.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c
+
+dapl_udapl_libdaplofa_la-dapl_ia_ha.lo: dapl/common/dapl_ia_ha.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ia_ha.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_ha.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ia_ha.lo `test -f 'dapl/common/dapl_ia_ha.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_ha.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_ha.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ia_ha.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_ha.c' object='dapl_udapl_libdaplofa_la-dapl_ia_ha.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ia_ha.lo `test -f 'dapl/common/dapl_ia_ha.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_ha.c
+
+dapl_udapl_libdaplofa_la-dapl_csp.lo: dapl/common/dapl_csp.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_csp.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_csp.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_csp.lo `test -f 'dapl/common/dapl_csp.c' || echo '$(srcdir)/'`dapl/common/dapl_csp.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_csp.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_csp.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_csp.c' object='dapl_udapl_libdaplofa_la-dapl_csp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_csp.lo `test -f 'dapl/common/dapl_csp.c' || echo '$(srcdir)/'`dapl/common/dapl_csp.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.lo: dapl/common/dapl_ep_post_send_invalidate.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.lo `test -f 'dapl/common/dapl_ep_post_send_invalidate.c' || echo '$(srcdir)/'`dapl [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_send_invalidate.c' object='dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_send_invalidate.lo `test -f 'dapl/common/dapl_ep_post_send_invalidate.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_send_invalidate.c
+
+dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.lo: dapl/common/dapl_ep_post_rdma_read_to_rmr.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.lo `test -f 'dapl/common/dapl_ep_post_rdma_read_to_rmr.c' || echo '$(srcdir)/'` [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_read_to_rmr.c' object='dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ep_post_rdma_read_to_rmr.lo `test -f 'dapl/common/dapl_ep_post_rdma_read_to_rmr.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_rdma_read_to_rmr.c
+
+dapl_udapl_libdaplofa_la-dapl_ib_util.lo: dapl/openib_cma/dapl_ib_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ib_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_util.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ib_util.lo `test -f 'dapl/openib_cma/dapl_ib_util.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_util.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_util.c' object='dapl_udapl_libdaplofa_la-dapl_ib_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ib_util.lo `test -f 'dapl/openib_cma/dapl_ib_util.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_util.c
+
+dapl_udapl_libdaplofa_la-dapl_ib_cq.lo: dapl/openib_cma/dapl_ib_cq.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ib_cq.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cq.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ib_cq.lo `test -f 'dapl/openib_cma/dapl_ib_cq.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_cq.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cq.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cq.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_cq.c' object='dapl_udapl_libdaplofa_la-dapl_ib_cq.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ib_cq.lo `test -f 'dapl/openib_cma/dapl_ib_cq.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_cq.c
+
+dapl_udapl_libdaplofa_la-dapl_ib_qp.lo: dapl/openib_cma/dapl_ib_qp.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ib_qp.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_qp.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ib_qp.lo `test -f 'dapl/openib_cma/dapl_ib_qp.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_qp.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_qp.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_qp.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_qp.c' object='dapl_udapl_libdaplofa_la-dapl_ib_qp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ib_qp.lo `test -f 'dapl/openib_cma/dapl_ib_qp.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_qp.c
+
+dapl_udapl_libdaplofa_la-dapl_ib_cm.lo: dapl/openib_cma/dapl_ib_cm.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ib_cm.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cm.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ib_cm.lo `test -f 'dapl/openib_cma/dapl_ib_cm.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_cm.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cm.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_cm.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_cm.c' object='dapl_udapl_libdaplofa_la-dapl_ib_cm.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ib_cm.lo `test -f 'dapl/openib_cma/dapl_ib_cm.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_cm.c
+
+dapl_udapl_libdaplofa_la-dapl_ib_mem.lo: dapl/openib_cma/dapl_ib_mem.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ib_mem.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_mem.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ib_mem.lo `test -f 'dapl/openib_cma/dapl_ib_mem.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_mem.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_mem.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_mem.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_mem.c' object='dapl_udapl_libdaplofa_la-dapl_ib_mem.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ib_mem.lo `test -f 'dapl/openib_cma/dapl_ib_mem.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_mem.c
+
+dapl_udapl_libdaplofa_la-dapl_ib_extensions.lo: dapl/openib_cma/dapl_ib_extensions.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplofa_la-dapl_ib_extensions.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_extensions.Tpo -c -o dapl_udapl_libdaplofa_la-dapl_ib_extensions.lo `test -f 'dapl/openib_cma/dapl_ib_extensions.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_extensions.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_extensions.Tpo $(DEPDIR)/dapl_udapl_libdaplofa_la-dapl_ib_extensions.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_extensions.c' object='dapl_udapl_libdaplofa_la-dapl_ib_extensions.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplofa_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplofa_la-dapl_ib_extensions.lo `test -f 'dapl/openib_cma/dapl_ib_extensions.c' || echo '$(srcdir)/'`dapl/openib_cma/dapl_ib_extensions.c
+
+dapl_udapl_libdaploscm_la-dapl_init.lo: dapl/udapl/dapl_init.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_init.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_init.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_init.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_init.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_init.c' object='dapl_udapl_libdaploscm_la-dapl_init.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_create.lo: dapl/udapl/dapl_evd_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_create.lo `test -f 'dapl/udapl/dapl_evd_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_create.c' object='dapl_udapl_libdaploscm_la-dapl_evd_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_create.lo `test -f 'dapl/udapl/dapl_evd_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_create.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_query.lo: dapl/udapl/dapl_evd_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_query.lo `test -f 'dapl/udapl/dapl_evd_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_query.c' object='dapl_udapl_libdaploscm_la-dapl_evd_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_query.lo `test -f 'dapl/udapl/dapl_evd_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_query.c
+
+dapl_udapl_libdaploscm_la-dapl_cno_create.lo: dapl/udapl/dapl_cno_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cno_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cno_create.lo `test -f 'dapl/udapl/dapl_cno_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_create.c' object='dapl_udapl_libdaploscm_la-dapl_cno_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cno_create.lo `test -f 'dapl/udapl/dapl_cno_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_create.c
+
+dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.lo: dapl/udapl/dapl_cno_modify_agent.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.lo `test -f 'dapl/udapl/dapl_cno_modify_agent.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_modify_agent.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_modify_agent.c' object='dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cno_modify_agent.lo `test -f 'dapl/udapl/dapl_cno_modify_agent.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_modify_agent.c
+
+dapl_udapl_libdaploscm_la-dapl_cno_free.lo: dapl/udapl/dapl_cno_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cno_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cno_free.lo `test -f 'dapl/udapl/dapl_cno_free.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_free.c' object='dapl_udapl_libdaploscm_la-dapl_cno_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cno_free.lo `test -f 'dapl/udapl/dapl_cno_free.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_free.c
+
+dapl_udapl_libdaploscm_la-dapl_cno_wait.lo: dapl/udapl/dapl_cno_wait.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cno_wait.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_wait.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cno_wait.lo `test -f 'dapl/udapl/dapl_cno_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_wait.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_wait.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_wait.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_wait.c' object='dapl_udapl_libdaploscm_la-dapl_cno_wait.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cno_wait.lo `test -f 'dapl/udapl/dapl_cno_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_wait.c
+
+dapl_udapl_libdaploscm_la-dapl_cno_query.lo: dapl/udapl/dapl_cno_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cno_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cno_query.lo `test -f 'dapl/udapl/dapl_cno_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_query.c' object='dapl_udapl_libdaploscm_la-dapl_cno_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cno_query.lo `test -f 'dapl/udapl/dapl_cno_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_query.c
+
+dapl_udapl_libdaploscm_la-dapl_lmr_create.lo: dapl/udapl/dapl_lmr_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_lmr_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_lmr_create.lo `test -f 'dapl/udapl/dapl_lmr_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_lmr_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_lmr_create.c' object='dapl_udapl_libdaploscm_la-dapl_lmr_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_lmr_create.lo `test -f 'dapl/udapl/dapl_lmr_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_lmr_create.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_wait.lo: dapl/udapl/dapl_evd_wait.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_wait.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_wait.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_wait.lo `test -f 'dapl/udapl/dapl_evd_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_wait.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_wait.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_wait.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_wait.c' object='dapl_udapl_libdaploscm_la-dapl_evd_wait.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_wait.lo `test -f 'dapl/udapl/dapl_evd_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_wait.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_disable.lo: dapl/udapl/dapl_evd_disable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_disable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_disable.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_disable.lo `test -f 'dapl/udapl/dapl_evd_disable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_disable.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_disable.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_disable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_disable.c' object='dapl_udapl_libdaploscm_la-dapl_evd_disable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_disable.lo `test -f 'dapl/udapl/dapl_evd_disable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_disable.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_enable.lo: dapl/udapl/dapl_evd_enable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_enable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_enable.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_enable.lo `test -f 'dapl/udapl/dapl_evd_enable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_enable.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_enable.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_enable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_enable.c' object='dapl_udapl_libdaploscm_la-dapl_evd_enable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_enable.lo `test -f 'dapl/udapl/dapl_evd_enable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_enable.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.lo: dapl/udapl/dapl_evd_modify_cno.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.lo `test -f 'dapl/udapl/dapl_evd_modify_cno.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_modify_cno.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_modify_cno.c' object='dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_modify_cno.lo `test -f 'dapl/udapl/dapl_evd_modify_cno.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_modify_cno.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.lo: dapl/udapl/dapl_evd_set_unwaitable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_set_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_s [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_set_unwaitable.c' object='dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_set_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_set_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_set_unwaitable.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.lo: dapl/udapl/dapl_evd_clear_unwaitable.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_clear_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/da [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_clear_unwaitable.c' object='dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_clear_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_clear_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_clear_unwaitable.c
+
+dapl_udapl_libdaploscm_la-dapl_osd.lo: dapl/udapl/linux/dapl_osd.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_osd.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_osd.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_osd.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_osd.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/linux/dapl_osd.c' object='dapl_udapl_libdaploscm_la-dapl_osd.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c
+
+dapl_udapl_libdaploscm_la-dapl_cookie.lo: dapl/common/dapl_cookie.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cookie.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cookie.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cookie.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cookie.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cookie.c' object='dapl_udapl_libdaploscm_la-dapl_cookie.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c
+
+dapl_udapl_libdaploscm_la-dapl_cr_accept.lo: dapl/common/dapl_cr_accept.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cr_accept.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_accept.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cr_accept.lo `test -f 'dapl/common/dapl_cr_accept.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_accept.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_accept.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_accept.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_accept.c' object='dapl_udapl_libdaploscm_la-dapl_cr_accept.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cr_accept.lo `test -f 'dapl/common/dapl_cr_accept.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_accept.c
+
+dapl_udapl_libdaploscm_la-dapl_cr_query.lo: dapl/common/dapl_cr_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cr_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cr_query.lo `test -f 'dapl/common/dapl_cr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_query.c' object='dapl_udapl_libdaploscm_la-dapl_cr_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cr_query.lo `test -f 'dapl/common/dapl_cr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_query.c
+
+dapl_udapl_libdaploscm_la-dapl_cr_reject.lo: dapl/common/dapl_cr_reject.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cr_reject.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_reject.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cr_reject.lo `test -f 'dapl/common/dapl_cr_reject.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_reject.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_reject.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_reject.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_reject.c' object='dapl_udapl_libdaploscm_la-dapl_cr_reject.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cr_reject.lo `test -f 'dapl/common/dapl_cr_reject.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_reject.c
+
+dapl_udapl_libdaploscm_la-dapl_cr_util.lo: dapl/common/dapl_cr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cr_util.lo `test -f 'dapl/common/dapl_cr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_util.c' object='dapl_udapl_libdaploscm_la-dapl_cr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cr_util.lo `test -f 'dapl/common/dapl_cr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_util.c
+
+dapl_udapl_libdaploscm_la-dapl_cr_callback.lo: dapl/common/dapl_cr_callback.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cr_callback.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_callback.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cr_callback.lo `test -f 'dapl/common/dapl_cr_callback.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_callback.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_callback.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_callback.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_callback.c' object='dapl_udapl_libdaploscm_la-dapl_cr_callback.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cr_callback.lo `test -f 'dapl/common/dapl_cr_callback.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_callback.c
+
+dapl_udapl_libdaploscm_la-dapl_cr_handoff.lo: dapl/common/dapl_cr_handoff.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cr_handoff.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_handoff.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cr_handoff.lo `test -f 'dapl/common/dapl_cr_handoff.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_handoff.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_handoff.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cr_handoff.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_handoff.c' object='dapl_udapl_libdaploscm_la-dapl_cr_handoff.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cr_handoff.lo `test -f 'dapl/common/dapl_cr_handoff.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_handoff.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_connect.lo: dapl/common/dapl_ep_connect.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_connect.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_connect.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_connect.lo `test -f 'dapl/common/dapl_ep_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_connect.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_connect.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_connect.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_connect.c' object='dapl_udapl_libdaploscm_la-dapl_ep_connect.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_connect.lo `test -f 'dapl/common/dapl_ep_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_connect.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_create.lo: dapl/common/dapl_ep_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_create.lo `test -f 'dapl/common/dapl_ep_create.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create.c' object='dapl_udapl_libdaploscm_la-dapl_ep_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_create.lo `test -f 'dapl/common/dapl_ep_create.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_disconnect.lo: dapl/common/dapl_ep_disconnect.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_disconnect.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_disconnect.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_disconnect.lo `test -f 'dapl/common/dapl_ep_disconnect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_disconnect.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_disconnect.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_disconnect.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_disconnect.c' object='dapl_udapl_libdaploscm_la-dapl_ep_disconnect.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_disconnect.lo `test -f 'dapl/common/dapl_ep_disconnect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_disconnect.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.lo: dapl/common/dapl_ep_dup_connect.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.lo `test -f 'dapl/common/dapl_ep_dup_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_dup_connect.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_dup_connect.c' object='dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_dup_connect.lo `test -f 'dapl/common/dapl_ep_dup_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_dup_connect.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_free.lo: dapl/common/dapl_ep_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_free.lo `test -f 'dapl/common/dapl_ep_free.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_free.c' object='dapl_udapl_libdaploscm_la-dapl_ep_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_free.lo `test -f 'dapl/common/dapl_ep_free.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_free.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_reset.lo: dapl/common/dapl_ep_reset.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_reset.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_reset.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_reset.lo `test -f 'dapl/common/dapl_ep_reset.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_reset.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_reset.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_reset.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_reset.c' object='dapl_udapl_libdaploscm_la-dapl_ep_reset.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_reset.lo `test -f 'dapl/common/dapl_ep_reset.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_reset.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_get_status.lo: dapl/common/dapl_ep_get_status.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_get_status.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_get_status.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_get_status.lo `test -f 'dapl/common/dapl_ep_get_status.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_get_status.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_get_status.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_get_status.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_get_status.c' object='dapl_udapl_libdaploscm_la-dapl_ep_get_status.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_get_status.lo `test -f 'dapl/common/dapl_ep_get_status.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_get_status.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_modify.lo: dapl/common/dapl_ep_modify.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_modify.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_modify.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_modify.lo `test -f 'dapl/common/dapl_ep_modify.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_modify.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_modify.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_modify.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_modify.c' object='dapl_udapl_libdaploscm_la-dapl_ep_modify.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_modify.lo `test -f 'dapl/common/dapl_ep_modify.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_modify.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.lo: dapl/common/dapl_ep_post_rdma_read.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.lo `test -f 'dapl/common/dapl_ep_post_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_read.c' object='dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read.lo `test -f 'dapl/common/dapl_ep_post_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_rdma_read.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.lo: dapl/common/dapl_ep_post_rdma_write.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.lo `test -f 'dapl/common/dapl_ep_post_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_ [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_write.c' object='dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_write.lo `test -f 'dapl/common/dapl_ep_post_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_rdma_write.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_post_recv.lo: dapl/common/dapl_ep_post_recv.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_post_recv.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_recv.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_recv.lo `test -f 'dapl/common/dapl_ep_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_recv.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_recv.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_recv.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_recv.c' object='dapl_udapl_libdaploscm_la-dapl_ep_post_recv.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_recv.lo `test -f 'dapl/common/dapl_ep_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_recv.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_post_send.lo: dapl/common/dapl_ep_post_send.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_post_send.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_send.lo `test -f 'dapl/common/dapl_ep_post_send.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_send.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_send.c' object='dapl_udapl_libdaploscm_la-dapl_ep_post_send.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_send.lo `test -f 'dapl/common/dapl_ep_post_send.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_send.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_query.lo: dapl/common/dapl_ep_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_query.lo `test -f 'dapl/common/dapl_ep_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_query.c' object='dapl_udapl_libdaploscm_la-dapl_ep_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_query.lo `test -f 'dapl/common/dapl_ep_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_query.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_util.lo: dapl/common/dapl_ep_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_util.lo `test -f 'dapl/common/dapl_ep_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_util.c' object='dapl_udapl_libdaploscm_la-dapl_ep_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_util.lo `test -f 'dapl/common/dapl_ep_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_util.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_dequeue.lo: dapl/common/dapl_evd_dequeue.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_dequeue.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dequeue.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_dequeue.lo `test -f 'dapl/common/dapl_evd_dequeue.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dequeue.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dequeue.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dequeue.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dequeue.c' object='dapl_udapl_libdaploscm_la-dapl_evd_dequeue.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_dequeue.lo `test -f 'dapl/common/dapl_evd_dequeue.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dequeue.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_free.lo: dapl/common/dapl_evd_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_free.lo `test -f 'dapl/common/dapl_evd_free.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_free.c' object='dapl_udapl_libdaploscm_la-dapl_evd_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_free.lo `test -f 'dapl/common/dapl_evd_free.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_free.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_post_se.lo: dapl/common/dapl_evd_post_se.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_post_se.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_post_se.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_post_se.lo `test -f 'dapl/common/dapl_evd_post_se.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_post_se.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_post_se.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_post_se.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_post_se.c' object='dapl_udapl_libdaploscm_la-dapl_evd_post_se.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_post_se.lo `test -f 'dapl/common/dapl_evd_post_se.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_post_se.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_resize.lo: dapl/common/dapl_evd_resize.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_resize.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_resize.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_resize.lo `test -f 'dapl/common/dapl_evd_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_resize.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_resize.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_resize.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_resize.c' object='dapl_udapl_libdaploscm_la-dapl_evd_resize.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_resize.lo `test -f 'dapl/common/dapl_evd_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_resize.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_util.lo: dapl/common/dapl_evd_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_util.lo `test -f 'dapl/common/dapl_evd_util.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_util.c' object='dapl_udapl_libdaploscm_la-dapl_evd_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_util.lo `test -f 'dapl/common/dapl_evd_util.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_util.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.lo: dapl/common/dapl_evd_cq_async_error_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.lo `test -f 'dapl/common/dapl_evd_cq_async_error_callb.c' || echo '$(srcdir [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_cq_async_error_callb.c' object='dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_cq_async_error_callb.lo `test -f 'dapl/common/dapl_evd_cq_async_error_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_cq_async_error_callb.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.lo: dapl/common/dapl_evd_qp_async_error_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.lo `test -f 'dapl/common/dapl_evd_qp_async_error_callb.c' || echo '$(srcdir [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_qp_async_error_callb.c' object='dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_qp_async_error_callb.lo `test -f 'dapl/common/dapl_evd_qp_async_error_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_qp_async_error_callb.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.lo: dapl/common/dapl_evd_un_async_error_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.lo `test -f 'dapl/common/dapl_evd_un_async_error_callb.c' || echo '$(srcdir [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_un_async_error_callb.c' object='dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_un_async_error_callb.lo `test -f 'dapl/common/dapl_evd_un_async_error_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_un_async_error_callb.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.lo: dapl/common/dapl_evd_connection_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.lo `test -f 'dapl/common/dapl_evd_connection_callb.c' || echo '$(srcdir)/'`dapl/common/ [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_connection_callb.c' object='dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_connection_callb.lo `test -f 'dapl/common/dapl_evd_connection_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_connection_callb.c
+
+dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.lo: dapl/common/dapl_evd_dto_callb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.lo `test -f 'dapl/common/dapl_evd_dto_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dto_callb.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dto_callb.c' object='dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_evd_dto_callb.lo `test -f 'dapl/common/dapl_evd_dto_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dto_callb.c
+
+dapl_udapl_libdaploscm_la-dapl_get_consumer_context.lo: dapl/common/dapl_get_consumer_context.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_get_consumer_context.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_consumer_context.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_get_consumer_context.lo `test -f 'dapl/common/dapl_get_consumer_context.c' || echo '$(srcdir)/'`dapl/common/ [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_consumer_context.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_consumer_context.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_consumer_context.c' object='dapl_udapl_libdaploscm_la-dapl_get_consumer_context.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_get_consumer_context.lo `test -f 'dapl/common/dapl_get_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_get_consumer_context.c
+
+dapl_udapl_libdaploscm_la-dapl_get_handle_type.lo: dapl/common/dapl_get_handle_type.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_get_handle_type.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_handle_type.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_get_handle_type.lo `test -f 'dapl/common/dapl_get_handle_type.c' || echo '$(srcdir)/'`dapl/common/dapl_get_handle_type.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_handle_type.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_get_handle_type.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_handle_type.c' object='dapl_udapl_libdaploscm_la-dapl_get_handle_type.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_get_handle_type.lo `test -f 'dapl/common/dapl_get_handle_type.c' || echo '$(srcdir)/'`dapl/common/dapl_get_handle_type.c
+
+dapl_udapl_libdaploscm_la-dapl_hash.lo: dapl/common/dapl_hash.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_hash.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hash.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hash.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hash.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hash.c' object='dapl_udapl_libdaploscm_la-dapl_hash.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c
+
+dapl_udapl_libdaploscm_la-dapl_hca_util.lo: dapl/common/dapl_hca_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_hca_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hca_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_hca_util.lo `test -f 'dapl/common/dapl_hca_util.c' || echo '$(srcdir)/'`dapl/common/dapl_hca_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hca_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_hca_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hca_util.c' object='dapl_udapl_libdaploscm_la-dapl_hca_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_hca_util.lo `test -f 'dapl/common/dapl_hca_util.c' || echo '$(srcdir)/'`dapl/common/dapl_hca_util.c
+
+dapl_udapl_libdaploscm_la-dapl_ia_close.lo: dapl/common/dapl_ia_close.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ia_close.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_close.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ia_close.lo `test -f 'dapl/common/dapl_ia_close.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_close.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_close.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_close.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_close.c' object='dapl_udapl_libdaploscm_la-dapl_ia_close.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ia_close.lo `test -f 'dapl/common/dapl_ia_close.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_close.c
+
+dapl_udapl_libdaploscm_la-dapl_ia_open.lo: dapl/common/dapl_ia_open.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ia_open.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_open.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ia_open.lo `test -f 'dapl/common/dapl_ia_open.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_open.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_open.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_open.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_open.c' object='dapl_udapl_libdaploscm_la-dapl_ia_open.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ia_open.lo `test -f 'dapl/common/dapl_ia_open.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_open.c
+
+dapl_udapl_libdaploscm_la-dapl_ia_query.lo: dapl/common/dapl_ia_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ia_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ia_query.lo `test -f 'dapl/common/dapl_ia_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_query.c' object='dapl_udapl_libdaploscm_la-dapl_ia_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ia_query.lo `test -f 'dapl/common/dapl_ia_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_query.c
+
+dapl_udapl_libdaploscm_la-dapl_ia_util.lo: dapl/common/dapl_ia_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ia_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ia_util.lo `test -f 'dapl/common/dapl_ia_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_util.c' object='dapl_udapl_libdaploscm_la-dapl_ia_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ia_util.lo `test -f 'dapl/common/dapl_ia_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_util.c
+
+dapl_udapl_libdaploscm_la-dapl_llist.lo: dapl/common/dapl_llist.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_llist.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_llist.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_llist.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_llist.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_llist.c' object='dapl_udapl_libdaploscm_la-dapl_llist.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c
+
+dapl_udapl_libdaploscm_la-dapl_lmr_free.lo: dapl/common/dapl_lmr_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_lmr_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_lmr_free.lo `test -f 'dapl/common/dapl_lmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_free.c' object='dapl_udapl_libdaploscm_la-dapl_lmr_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_lmr_free.lo `test -f 'dapl/common/dapl_lmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_free.c
+
+dapl_udapl_libdaploscm_la-dapl_lmr_query.lo: dapl/common/dapl_lmr_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_lmr_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_lmr_query.lo `test -f 'dapl/common/dapl_lmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_query.c' object='dapl_udapl_libdaploscm_la-dapl_lmr_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_lmr_query.lo `test -f 'dapl/common/dapl_lmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_query.c
+
+dapl_udapl_libdaploscm_la-dapl_lmr_util.lo: dapl/common/dapl_lmr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_lmr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_lmr_util.lo `test -f 'dapl/common/dapl_lmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_util.c' object='dapl_udapl_libdaploscm_la-dapl_lmr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_lmr_util.lo `test -f 'dapl/common/dapl_lmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_util.c
+
+dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.lo: dapl/common/dapl_lmr_sync_rdma_read.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_read.c' object='dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_read.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_read.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_sync_rdma_read.c
+
+dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.lo: dapl/common/dapl_lmr_sync_rdma_write.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_write.c' object='dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_lmr_sync_rdma_write.lo `test -f 'dapl/common/dapl_lmr_sync_rdma_write.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_sync_rdma_write.c
+
+dapl_udapl_libdaploscm_la-dapl_mr_util.lo: dapl/common/dapl_mr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_mr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_mr_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_mr_util.lo `test -f 'dapl/common/dapl_mr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_mr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_mr_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_mr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_mr_util.c' object='dapl_udapl_libdaploscm_la-dapl_mr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_mr_util.lo `test -f 'dapl/common/dapl_mr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_mr_util.c
+
+dapl_udapl_libdaploscm_la-dapl_provider.lo: dapl/common/dapl_provider.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_provider.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_provider.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_provider.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_provider.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_provider.c' object='dapl_udapl_libdaploscm_la-dapl_provider.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c
+
+dapl_udapl_libdaploscm_la-dapl_sp_util.lo: dapl/common/dapl_sp_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_sp_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_sp_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_sp_util.lo `test -f 'dapl/common/dapl_sp_util.c' || echo '$(srcdir)/'`dapl/common/dapl_sp_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_sp_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_sp_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_sp_util.c' object='dapl_udapl_libdaploscm_la-dapl_sp_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_sp_util.lo `test -f 'dapl/common/dapl_sp_util.c' || echo '$(srcdir)/'`dapl/common/dapl_sp_util.c
+
+dapl_udapl_libdaploscm_la-dapl_psp_create.lo: dapl/common/dapl_psp_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_psp_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_psp_create.lo `test -f 'dapl/common/dapl_psp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create.c' object='dapl_udapl_libdaploscm_la-dapl_psp_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_psp_create.lo `test -f 'dapl/common/dapl_psp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create.c
+
+dapl_udapl_libdaploscm_la-dapl_psp_create_any.lo: dapl/common/dapl_psp_create_any.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_psp_create_any.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create_any.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_psp_create_any.lo `test -f 'dapl/common/dapl_psp_create_any.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create_any.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create_any.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_create_any.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create_any.c' object='dapl_udapl_libdaploscm_la-dapl_psp_create_any.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_psp_create_any.lo `test -f 'dapl/common/dapl_psp_create_any.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create_any.c
+
+dapl_udapl_libdaploscm_la-dapl_psp_free.lo: dapl/common/dapl_psp_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_psp_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_psp_free.lo `test -f 'dapl/common/dapl_psp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_free.c' object='dapl_udapl_libdaploscm_la-dapl_psp_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_psp_free.lo `test -f 'dapl/common/dapl_psp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_free.c
+
+dapl_udapl_libdaploscm_la-dapl_psp_query.lo: dapl/common/dapl_psp_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_psp_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_psp_query.lo `test -f 'dapl/common/dapl_psp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_psp_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_query.c' object='dapl_udapl_libdaploscm_la-dapl_psp_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_psp_query.lo `test -f 'dapl/common/dapl_psp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_query.c
+
+dapl_udapl_libdaploscm_la-dapl_pz_create.lo: dapl/common/dapl_pz_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_pz_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_pz_create.lo `test -f 'dapl/common/dapl_pz_create.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_create.c' object='dapl_udapl_libdaploscm_la-dapl_pz_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_pz_create.lo `test -f 'dapl/common/dapl_pz_create.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_create.c
+
+dapl_udapl_libdaploscm_la-dapl_pz_free.lo: dapl/common/dapl_pz_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_pz_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_pz_free.lo `test -f 'dapl/common/dapl_pz_free.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_free.c' object='dapl_udapl_libdaploscm_la-dapl_pz_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_pz_free.lo `test -f 'dapl/common/dapl_pz_free.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_free.c
+
+dapl_udapl_libdaploscm_la-dapl_pz_query.lo: dapl/common/dapl_pz_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_pz_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_pz_query.lo `test -f 'dapl/common/dapl_pz_query.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_query.c' object='dapl_udapl_libdaploscm_la-dapl_pz_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_pz_query.lo `test -f 'dapl/common/dapl_pz_query.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_query.c
+
+dapl_udapl_libdaploscm_la-dapl_pz_util.lo: dapl/common/dapl_pz_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_pz_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_pz_util.lo `test -f 'dapl/common/dapl_pz_util.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_pz_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_util.c' object='dapl_udapl_libdaploscm_la-dapl_pz_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_pz_util.lo `test -f 'dapl/common/dapl_pz_util.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_util.c
+
+dapl_udapl_libdaploscm_la-dapl_rmr_create.lo: dapl/common/dapl_rmr_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rmr_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rmr_create.lo `test -f 'dapl/common/dapl_rmr_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_create.c' object='dapl_udapl_libdaploscm_la-dapl_rmr_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rmr_create.lo `test -f 'dapl/common/dapl_rmr_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_create.c
+
+dapl_udapl_libdaploscm_la-dapl_rmr_free.lo: dapl/common/dapl_rmr_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rmr_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rmr_free.lo `test -f 'dapl/common/dapl_rmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_free.c' object='dapl_udapl_libdaploscm_la-dapl_rmr_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rmr_free.lo `test -f 'dapl/common/dapl_rmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_free.c
+
+dapl_udapl_libdaploscm_la-dapl_rmr_bind.lo: dapl/common/dapl_rmr_bind.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rmr_bind.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_bind.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rmr_bind.lo `test -f 'dapl/common/dapl_rmr_bind.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_bind.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_bind.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_bind.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_bind.c' object='dapl_udapl_libdaploscm_la-dapl_rmr_bind.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rmr_bind.lo `test -f 'dapl/common/dapl_rmr_bind.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_bind.c
+
+dapl_udapl_libdaploscm_la-dapl_rmr_query.lo: dapl/common/dapl_rmr_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rmr_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rmr_query.lo `test -f 'dapl/common/dapl_rmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_query.c' object='dapl_udapl_libdaploscm_la-dapl_rmr_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rmr_query.lo `test -f 'dapl/common/dapl_rmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_query.c
+
+dapl_udapl_libdaploscm_la-dapl_rmr_util.lo: dapl/common/dapl_rmr_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rmr_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rmr_util.lo `test -f 'dapl/common/dapl_rmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rmr_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_util.c' object='dapl_udapl_libdaploscm_la-dapl_rmr_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rmr_util.lo `test -f 'dapl/common/dapl_rmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_util.c
+
+dapl_udapl_libdaploscm_la-dapl_rsp_create.lo: dapl/common/dapl_rsp_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rsp_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rsp_create.lo `test -f 'dapl/common/dapl_rsp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_create.c' object='dapl_udapl_libdaploscm_la-dapl_rsp_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rsp_create.lo `test -f 'dapl/common/dapl_rsp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_create.c
+
+dapl_udapl_libdaploscm_la-dapl_rsp_free.lo: dapl/common/dapl_rsp_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rsp_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rsp_free.lo `test -f 'dapl/common/dapl_rsp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_free.c' object='dapl_udapl_libdaploscm_la-dapl_rsp_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rsp_free.lo `test -f 'dapl/common/dapl_rsp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_free.c
+
+dapl_udapl_libdaploscm_la-dapl_rsp_query.lo: dapl/common/dapl_rsp_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_rsp_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_rsp_query.lo `test -f 'dapl/common/dapl_rsp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_rsp_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_query.c' object='dapl_udapl_libdaploscm_la-dapl_rsp_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_rsp_query.lo `test -f 'dapl/common/dapl_rsp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_query.c
+
+dapl_udapl_libdaploscm_la-dapl_cno_util.lo: dapl/common/dapl_cno_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_cno_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_cno_util.lo `test -f 'dapl/common/dapl_cno_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cno_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_cno_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cno_util.c' object='dapl_udapl_libdaploscm_la-dapl_cno_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_cno_util.lo `test -f 'dapl/common/dapl_cno_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cno_util.c
+
+dapl_udapl_libdaploscm_la-dapl_set_consumer_context.lo: dapl/common/dapl_set_consumer_context.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_set_consumer_context.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_set_consumer_context.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_set_consumer_context.lo `test -f 'dapl/common/dapl_set_consumer_context.c' || echo '$(srcdir)/'`dapl/common/ [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_set_consumer_context.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_set_consumer_context.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_set_consumer_context.c' object='dapl_udapl_libdaploscm_la-dapl_set_consumer_context.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_set_consumer_context.lo `test -f 'dapl/common/dapl_set_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_set_consumer_context.c
+
+dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.lo: dapl/common/dapl_ring_buffer_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.lo `test -f 'dapl/common/dapl_ring_buffer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ring_buffer_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ring_buffer_util.c' object='dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ring_buffer_util.lo `test -f 'dapl/common/dapl_ring_buffer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ring_buffer_util.c
+
+dapl_udapl_libdaploscm_la-dapl_name_service.lo: dapl/common/dapl_name_service.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_name_service.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_name_service.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_name_service.lo `test -f 'dapl/common/dapl_name_service.c' || echo '$(srcdir)/'`dapl/common/dapl_name_service.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_name_service.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_name_service.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_name_service.c' object='dapl_udapl_libdaploscm_la-dapl_name_service.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_name_service.lo `test -f 'dapl/common/dapl_name_service.c' || echo '$(srcdir)/'`dapl/common/dapl_name_service.c
+
+dapl_udapl_libdaploscm_la-dapl_timer_util.lo: dapl/common/dapl_timer_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_timer_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_timer_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_timer_util.lo `test -f 'dapl/common/dapl_timer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_timer_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_timer_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_timer_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_timer_util.c' object='dapl_udapl_libdaploscm_la-dapl_timer_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_timer_util.lo `test -f 'dapl/common/dapl_timer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_timer_util.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.lo: dapl/common/dapl_ep_create_with_srq.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.lo `test -f 'dapl/common/dapl_ep_create_with_srq.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_ [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create_with_srq.c' object='dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_create_with_srq.lo `test -f 'dapl/common/dapl_ep_create_with_srq.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create_with_srq.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_recv_query.lo: dapl/common/dapl_ep_recv_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_recv_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_recv_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_recv_query.lo `test -f 'dapl/common/dapl_ep_recv_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_recv_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_recv_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_recv_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_recv_query.c' object='dapl_udapl_libdaploscm_la-dapl_ep_recv_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_recv_query.lo `test -f 'dapl/common/dapl_ep_recv_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_recv_query.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.lo: dapl/common/dapl_ep_set_watermark.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.lo `test -f 'dapl/common/dapl_ep_set_watermark.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_set_watermark.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_set_watermark.c' object='dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_set_watermark.lo `test -f 'dapl/common/dapl_ep_set_watermark.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_set_watermark.c
+
+dapl_udapl_libdaploscm_la-dapl_srq_create.lo: dapl/common/dapl_srq_create.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_srq_create.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_create.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_srq_create.lo `test -f 'dapl/common/dapl_srq_create.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_create.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_create.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_create.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_create.c' object='dapl_udapl_libdaploscm_la-dapl_srq_create.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_srq_create.lo `test -f 'dapl/common/dapl_srq_create.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_create.c
+
+dapl_udapl_libdaploscm_la-dapl_srq_free.lo: dapl/common/dapl_srq_free.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_srq_free.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_free.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_srq_free.lo `test -f 'dapl/common/dapl_srq_free.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_free.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_free.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_free.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_free.c' object='dapl_udapl_libdaploscm_la-dapl_srq_free.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_srq_free.lo `test -f 'dapl/common/dapl_srq_free.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_free.c
+
+dapl_udapl_libdaploscm_la-dapl_srq_query.lo: dapl/common/dapl_srq_query.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_srq_query.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_query.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_srq_query.lo `test -f 'dapl/common/dapl_srq_query.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_query.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_query.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_query.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_query.c' object='dapl_udapl_libdaploscm_la-dapl_srq_query.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_srq_query.lo `test -f 'dapl/common/dapl_srq_query.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_query.c
+
+dapl_udapl_libdaploscm_la-dapl_srq_resize.lo: dapl/common/dapl_srq_resize.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_srq_resize.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_resize.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_srq_resize.lo `test -f 'dapl/common/dapl_srq_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_resize.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_resize.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_resize.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_resize.c' object='dapl_udapl_libdaploscm_la-dapl_srq_resize.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_srq_resize.lo `test -f 'dapl/common/dapl_srq_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_resize.c
+
+dapl_udapl_libdaploscm_la-dapl_srq_post_recv.lo: dapl/common/dapl_srq_post_recv.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_srq_post_recv.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_post_recv.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_srq_post_recv.lo `test -f 'dapl/common/dapl_srq_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_post_recv.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_post_recv.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_post_recv.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_post_recv.c' object='dapl_udapl_libdaploscm_la-dapl_srq_post_recv.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_srq_post_recv.lo `test -f 'dapl/common/dapl_srq_post_recv.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_post_recv.c
+
+dapl_udapl_libdaploscm_la-dapl_srq_set_lw.lo: dapl/common/dapl_srq_set_lw.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_srq_set_lw.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_set_lw.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_srq_set_lw.lo `test -f 'dapl/common/dapl_srq_set_lw.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_set_lw.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_set_lw.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_set_lw.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_set_lw.c' object='dapl_udapl_libdaploscm_la-dapl_srq_set_lw.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_srq_set_lw.lo `test -f 'dapl/common/dapl_srq_set_lw.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_set_lw.c
+
+dapl_udapl_libdaploscm_la-dapl_srq_util.lo: dapl/common/dapl_srq_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_srq_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_srq_util.lo `test -f 'dapl/common/dapl_srq_util.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_srq_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_util.c' object='dapl_udapl_libdaploscm_la-dapl_srq_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_srq_util.lo `test -f 'dapl/common/dapl_srq_util.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_util.c
+
+dapl_udapl_libdaploscm_la-dapl_debug.lo: dapl/common/dapl_debug.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_debug.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_debug.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_debug.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_debug.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_debug.c' object='dapl_udapl_libdaploscm_la-dapl_debug.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c
+
+dapl_udapl_libdaploscm_la-dapl_ia_ha.lo: dapl/common/dapl_ia_ha.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ia_ha.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_ha.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ia_ha.lo `test -f 'dapl/common/dapl_ia_ha.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_ha.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_ha.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ia_ha.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_ha.c' object='dapl_udapl_libdaploscm_la-dapl_ia_ha.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ia_ha.lo `test -f 'dapl/common/dapl_ia_ha.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_ha.c
+
+dapl_udapl_libdaploscm_la-dapl_csp.lo: dapl/common/dapl_csp.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_csp.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_csp.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_csp.lo `test -f 'dapl/common/dapl_csp.c' || echo '$(srcdir)/'`dapl/common/dapl_csp.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_csp.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_csp.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_csp.c' object='dapl_udapl_libdaploscm_la-dapl_csp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_csp.lo `test -f 'dapl/common/dapl_csp.c' || echo '$(srcdir)/'`dapl/common/dapl_csp.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.lo: dapl/common/dapl_ep_post_send_invalidate.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.lo `test -f 'dapl/common/dapl_ep_post_send_invalidate.c' || echo '$(srcdir)/'` [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_send_invalidate.c' object='dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_send_invalidate.lo `test -f 'dapl/common/dapl_ep_post_send_invalidate.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_send_invalidate.c
+
+dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.lo: dapl/common/dapl_ep_post_rdma_read_to_rmr.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.lo `test -f 'dapl/common/dapl_ep_post_rdma_read_to_rmr.c' || echo '$(srcdir [...]
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_read_to_rmr.c' object='dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ep_post_rdma_read_to_rmr.lo `test -f 'dapl/common/dapl_ep_post_rdma_read_to_rmr.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_post_rdma_read_to_rmr.c
+
+dapl_udapl_libdaploscm_la-dapl_ib_util.lo: dapl/openib_scm/dapl_ib_util.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ib_util.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_util.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ib_util.lo `test -f 'dapl/openib_scm/dapl_ib_util.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_util.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_util.c' object='dapl_udapl_libdaploscm_la-dapl_ib_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ib_util.lo `test -f 'dapl/openib_scm/dapl_ib_util.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_util.c
+
+dapl_udapl_libdaploscm_la-dapl_ib_cq.lo: dapl/openib_scm/dapl_ib_cq.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ib_cq.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cq.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ib_cq.lo `test -f 'dapl/openib_scm/dapl_ib_cq.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_cq.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cq.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cq.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_cq.c' object='dapl_udapl_libdaploscm_la-dapl_ib_cq.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ib_cq.lo `test -f 'dapl/openib_scm/dapl_ib_cq.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_cq.c
+
+dapl_udapl_libdaploscm_la-dapl_ib_qp.lo: dapl/openib_scm/dapl_ib_qp.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ib_qp.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_qp.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ib_qp.lo `test -f 'dapl/openib_scm/dapl_ib_qp.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_qp.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_qp.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_qp.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_qp.c' object='dapl_udapl_libdaploscm_la-dapl_ib_qp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ib_qp.lo `test -f 'dapl/openib_scm/dapl_ib_qp.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_qp.c
+
+dapl_udapl_libdaploscm_la-dapl_ib_cm.lo: dapl/openib_scm/dapl_ib_cm.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ib_cm.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cm.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ib_cm.lo `test -f 'dapl/openib_scm/dapl_ib_cm.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_cm.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cm.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_cm.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_cm.c' object='dapl_udapl_libdaploscm_la-dapl_ib_cm.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ib_cm.lo `test -f 'dapl/openib_scm/dapl_ib_cm.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_cm.c
+
+dapl_udapl_libdaploscm_la-dapl_ib_mem.lo: dapl/openib_scm/dapl_ib_mem.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ib_mem.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_mem.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ib_mem.lo `test -f 'dapl/openib_scm/dapl_ib_mem.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_mem.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_mem.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_mem.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_mem.c' object='dapl_udapl_libdaploscm_la-dapl_ib_mem.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ib_mem.lo `test -f 'dapl/openib_scm/dapl_ib_mem.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_mem.c
+
+dapl_udapl_libdaploscm_la-dapl_ib_extensions.lo: dapl/openib_scm/dapl_ib_extensions.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaploscm_la-dapl_ib_extensions.lo -MD -MP -MF $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_extensions.Tpo -c -o dapl_udapl_libdaploscm_la-dapl_ib_extensions.lo `test -f 'dapl/openib_scm/dapl_ib_extensions.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_extensions.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_extensions.Tpo $(DEPDIR)/dapl_udapl_libdaploscm_la-dapl_ib_extensions.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_extensions.c' object='dapl_udapl_libdaploscm_la-dapl_ib_extensions.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaploscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaploscm_la-dapl_ib_extensions.lo `test -f 'dapl/openib_scm/dapl_ib_extensions.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_extensions.c
+
+dat_udat_libdat2_la-udat.lo: dat/udat/udat.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-udat.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-udat.Tpo -c -o dat_udat_libdat2_la-udat.lo `test -f 'dat/udat/udat.c' || echo '$(srcdir)/'`dat/udat/udat.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-udat.Tpo $(DEPDIR)/dat_udat_libdat2_la-udat.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/udat.c' object='dat_udat_libdat2_la-udat.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-udat.lo `test -f 'dat/udat/udat.c' || echo '$(srcdir)/'`dat/udat/udat.c
+
+dat_udat_libdat2_la-udat_api.lo: dat/udat/udat_api.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-udat_api.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-udat_api.Tpo -c -o dat_udat_libdat2_la-udat_api.lo `test -f 'dat/udat/udat_api.c' || echo '$(srcdir)/'`dat/udat/udat_api.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-udat_api.Tpo $(DEPDIR)/dat_udat_libdat2_la-udat_api.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/udat_api.c' object='dat_udat_libdat2_la-udat_api.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-udat_api.lo `test -f 'dat/udat/udat_api.c' || echo '$(srcdir)/'`dat/udat/udat_api.c
+
+dat_udat_libdat2_la-udat_sr_parser.lo: dat/udat/udat_sr_parser.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-udat_sr_parser.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-udat_sr_parser.Tpo -c -o dat_udat_libdat2_la-udat_sr_parser.lo `test -f 'dat/udat/udat_sr_parser.c' || echo '$(srcdir)/'`dat/udat/udat_sr_parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-udat_sr_parser.Tpo $(DEPDIR)/dat_udat_libdat2_la-udat_sr_parser.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/udat_sr_parser.c' object='dat_udat_libdat2_la-udat_sr_parser.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-udat_sr_parser.lo `test -f 'dat/udat/udat_sr_parser.c' || echo '$(srcdir)/'`dat/udat/udat_sr_parser.c
+
+dat_udat_libdat2_la-dat_osd.lo: dat/udat/linux/dat_osd.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-dat_osd.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-dat_osd.Tpo -c -o dat_udat_libdat2_la-dat_osd.lo `test -f 'dat/udat/linux/dat_osd.c' || echo '$(srcdir)/'`dat/udat/linux/dat_osd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-dat_osd.Tpo $(DEPDIR)/dat_udat_libdat2_la-dat_osd.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/linux/dat_osd.c' object='dat_udat_libdat2_la-dat_osd.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-dat_osd.lo `test -f 'dat/udat/linux/dat_osd.c' || echo '$(srcdir)/'`dat/udat/linux/dat_osd.c
+
+dat_udat_libdat2_la-dat_api.lo: dat/common/dat_api.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-dat_api.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-dat_api.Tpo -c -o dat_udat_libdat2_la-dat_api.lo `test -f 'dat/common/dat_api.c' || echo '$(srcdir)/'`dat/common/dat_api.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-dat_api.Tpo $(DEPDIR)/dat_udat_libdat2_la-dat_api.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_api.c' object='dat_udat_libdat2_la-dat_api.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-dat_api.lo `test -f 'dat/common/dat_api.c' || echo '$(srcdir)/'`dat/common/dat_api.c
+
+dat_udat_libdat2_la-dat_dictionary.lo: dat/common/dat_dictionary.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-dat_dictionary.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-dat_dictionary.Tpo -c -o dat_udat_libdat2_la-dat_dictionary.lo `test -f 'dat/common/dat_dictionary.c' || echo '$(srcdir)/'`dat/common/dat_dictionary.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-dat_dictionary.Tpo $(DEPDIR)/dat_udat_libdat2_la-dat_dictionary.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_dictionary.c' object='dat_udat_libdat2_la-dat_dictionary.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-dat_dictionary.lo `test -f 'dat/common/dat_dictionary.c' || echo '$(srcdir)/'`dat/common/dat_dictionary.c
+
+dat_udat_libdat2_la-dat_strerror.lo: dat/common/dat_strerror.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-dat_strerror.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-dat_strerror.Tpo -c -o dat_udat_libdat2_la-dat_strerror.lo `test -f 'dat/common/dat_strerror.c' || echo '$(srcdir)/'`dat/common/dat_strerror.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-dat_strerror.Tpo $(DEPDIR)/dat_udat_libdat2_la-dat_strerror.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_strerror.c' object='dat_udat_libdat2_la-dat_strerror.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-dat_strerror.lo `test -f 'dat/common/dat_strerror.c' || echo '$(srcdir)/'`dat/common/dat_strerror.c
+
+dat_udat_libdat2_la-dat_init.lo: dat/common/dat_init.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-dat_init.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-dat_init.Tpo -c -o dat_udat_libdat2_la-dat_init.lo `test -f 'dat/common/dat_init.c' || echo '$(srcdir)/'`dat/common/dat_init.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-dat_init.Tpo $(DEPDIR)/dat_udat_libdat2_la-dat_init.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_init.c' object='dat_udat_libdat2_la-dat_init.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-dat_init.lo `test -f 'dat/common/dat_init.c' || echo '$(srcdir)/'`dat/common/dat_init.c
+
+dat_udat_libdat2_la-dat_dr.lo: dat/common/dat_dr.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-dat_dr.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-dat_dr.Tpo -c -o dat_udat_libdat2_la-dat_dr.lo `test -f 'dat/common/dat_dr.c' || echo '$(srcdir)/'`dat/common/dat_dr.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-dat_dr.Tpo $(DEPDIR)/dat_udat_libdat2_la-dat_dr.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_dr.c' object='dat_udat_libdat2_la-dat_dr.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-dat_dr.lo `test -f 'dat/common/dat_dr.c' || echo '$(srcdir)/'`dat/common/dat_dr.c
+
+dat_udat_libdat2_la-dat_sr.lo: dat/common/dat_sr.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat2_la-dat_sr.lo -MD -MP -MF $(DEPDIR)/dat_udat_libdat2_la-dat_sr.Tpo -c -o dat_udat_libdat2_la-dat_sr.lo `test -f 'dat/common/dat_sr.c' || echo '$(srcdir)/'`dat/common/dat_sr.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dat_udat_libdat2_la-dat_sr.Tpo $(DEPDIR)/dat_udat_libdat2_la-dat_sr.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_sr.c' object='dat_udat_libdat2_la-dat_sr.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat2_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat2_la-dat_sr.lo `test -f 'dat/common/dat_sr.c' || echo '$(srcdir)/'`dat/common/dat_sr.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf dapl/udapl/.libs dapl/udapl/_libs
+	-rm -rf dat/udat/.libs dat/udat/_libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $$i; then file=$$i; \
+	  else file=$(srcdir)/$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+	  rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
+	done
+install-man5: $(man5_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
+	@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.5*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $$i; then file=$$i; \
+	  else file=$(srcdir)/$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    5*) ;; \
+	    *) ext='5' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
+	done
+uninstall-man5:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.5*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    5*) ;; \
+	    *) ext='5' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
+	  rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
+	done
+install-libdatincludeHEADERS: $(libdatinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdatincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libdatincludedir)"
+	@list='$(libdatinclude_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(libdatincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libdatincludedir)/$$f'"; \
+	  $(libdatincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libdatincludedir)/$$f"; \
+	done
+
+uninstall-libdatincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libdatinclude_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(libdatincludedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(libdatincludedir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; 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=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(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; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	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; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(MANS) $(HEADERS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(dapllibofadir)" "$(DESTDIR)$(daplliboscmdir)" "$(DESTDIR)$(datlibdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(libdatincludedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-rm -f dapl/udapl/$(am__dirstamp)
+	-rm -f dat/udat/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-dapllibofaLTLIBRARIES clean-daplliboscmLTLIBRARIES \
+	clean-datlibLTLIBRARIES clean-generic clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dapllibofaLTLIBRARIES \
+	install-daplliboscmLTLIBRARIES install-datlibLTLIBRARIES \
+	install-libdatincludeHEADERS install-man
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man: install-man1 install-man5
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-dapllibofaLTLIBRARIES \
+	uninstall-daplliboscmLTLIBRARIES uninstall-datlibLTLIBRARIES \
+	uninstall-libdatincludeHEADERS uninstall-man
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+
+uninstall-man: uninstall-man1 uninstall-man5
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-exec-am install-strip uninstall-am
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean \
+	clean-dapllibofaLTLIBRARIES clean-daplliboscmLTLIBRARIES \
+	clean-datlibLTLIBRARIES clean-generic clean-libtool ctags \
+	ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
+	dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-dapllibofaLTLIBRARIES \
+	install-daplliboscmLTLIBRARIES install-data install-data-am \
+	install-datlibLTLIBRARIES install-dvi install-dvi-am \
+	install-exec install-exec-am install-exec-hook install-html \
+	install-html-am install-info install-info-am \
+	install-libdatincludeHEADERS install-man install-man1 \
+	install-man5 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-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-dapllibofaLTLIBRARIES \
+	uninstall-daplliboscmLTLIBRARIES uninstall-datlibLTLIBRARIES \
+	uninstall-hook uninstall-libdatincludeHEADERS uninstall-man \
+	uninstall-man1 uninstall-man5
+
+
+dist-hook: dapl.spec 
+	cp dapl.spec $(distdir)
+
+install-exec-hook:
+	if ! test -d $(DESTDIR)$(sysconfdir); then \
+		mkdir -p $(DESTDIR)$(sysconfdir); \
+	fi; \
+	if test -e $(DESTDIR)$(sysconfdir)/dat.conf; then \
+		sed -e '/ofa-v2-.* u2/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$ofadapl; \
+		cp /tmp/$$$$ofadapl $(DESTDIR)$(sysconfdir)/dat.conf; \
+	fi; \
+	echo ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib0 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ib1 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib1 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mthca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mthca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mlx4_0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-mlx4_0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ipath0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ipath0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-ehca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ehca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo ofa-v2-iwarp u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"eth2 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf;
+
+uninstall-hook:
+	if test -e $(DESTDIR)$(sysconfdir)/dat.conf; then \
+		sed -e '/ofa-v2-.* u2/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$ofadapl; \
+		cp /tmp/$$$$ofadapl $(DESTDIR)$(sysconfdir)/dat.conf; \
+	fi;
+# 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
new file mode 100644
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644
index 0000000..1fc55a2
--- /dev/null
+++ b/README
@@ -0,0 +1,434 @@
+
+==========
+1.0 BUILD:
+==========
+
+The default build includes a non-debug version of libdat and libdapl-cma uDAPL provider. It will also builds test suites dtest and dapltest and provides manpages for each. This version requires libibverbs and librdmacm installation, IPoIB installation, and IPoIB configuration with an IP address. 
+
+Building :
+----------
+./autogen.sh 
+./configure 
+make
+
+Building debug version:
+----------------------
+./autogen.sh
+./configure --enable-debug
+make
+
+Build example with OFED 1.2+ prefix (x86_64)
+---------------------------------------------
+./autogen.sh
+./configure --prefix /usr --sysconf=/etc --libdir /usr/lib64 LDFLAGS=-L/usr/lib64 CPPFLAGS="-I/usr/include"
+make
+
+Installing:
+----------
+make install
+
+Note: The development package installs DAT 2.0 include files under /usr/include/dat2 to co-exist with DAT 1.2 /usr/include/dat
+
+NOTE: to link these libraries you must either use libtool and 
+specify the full pathname of the library, or use the `-LLIBDIR' 
+flag during linking and do at least one of the following:
+   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
+     during execution
+   - add LIBDIR to the `LD_RUN_PATH' environment variable
+     during linking
+   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
+   - have your system administrator add LIBDIR to `/etc/ld.so.conf'
+
+See any operating system documentation about shared libraries for
+more information, such as the ld(1) and ld.so(8) manual pages.
+
+===================
+2.0 CONFIGURATION:
+===================
+
+sample /etc/dat.conf 
+
+#
+# DAT 1.2 and 2.0 configuration file
+#
+# Each entry should have the following fields:
+#
+# <ia_name> <api_version> <threadsafety> <default> <lib_path> \
+#           <provider_version> <ia_params> <platform_params>
+#
+# For the uDAPL cma provder, specify <ia_params> as one of the following:
+#       network address, network hostname, or netdev name and 0 for port
+#
+# Simple (OpenIB-cma) default with netdev name provided first on list
+# to enable use of same dat.conf version on all nodes
+#
+# Add examples for multiple interfaces and IPoIB HA fail over, and bonding
+#
+OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "ib0 0" ""
+OpenIB-cma-1 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "ib1 0" ""
+OpenIB-cma-2 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "ib2 0" ""
+OpenIB-cma-3 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "ib3 0" ""
+OpenIB-bond u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "bond0 0" ""
+OpenIB-2-cma u2.0 nonthreadsafe default libdaplcma.so.2 dapl.2.0 "ib0 0" ""
+OpenIB-2-cma-1 u2.0 nonthreadsafe default libdaplcma.so.2 dapl.2.0 "ib1 0" ""
+OpenIB-2-cma-2 u2.0 nonthreadsafe default libdaplcma.so.2 dapl.2.0 "ib2 0" ""
+OpenIB-2-cma-3 u2.0 nonthreadsafe default libdaplcma.so.2 dapl.2.0 "ib3 0" ""
+OpenIB-2-bond u2.0 nonthreadsafe default libdaplcma.so.2 dapl.2.0 "bond0 0" ""
+
+
+=============================
+3.0 Bugs/Known issues
+=============================
+
+
+
+=============================
+4.0 SAMPLE uDAPL APPLICATION:
+=============================
+
+There are 2 sample programs, with manpages, provided with this package.
+
+(dapl/test/dtest/)
+
+NAME
+       dtest - simple uDAPL send/receive and RDMA test
+
+SYNOPSIS
+       dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-s]
+
+       dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-h HOSTNAME]
+
+DESCRIPTION
+       dtest  is a simple test used to exercise and verify the uDAPL interfaces.  At least two instantia-
+       tions of the test must be run. One acts as the server and the other the client. The server side of
+       the  test,  once invoked listens for connection requests, until timing out or killed. Upon receipt
+       of a cd connection request, the connection is established, the server and  client  sides  exchange
+       information necessary to perform RDMA writes and reads.
+
+OPTIONS
+       -P=PROVIDER
+              use PROVIDER to specify uDAPL interface using /etc/dat.conf (default OpenIB-cma)
+
+       -b=BUFFER_SIZE
+              use buffer size BUFFER_SIZE for RDMA(default 64)
+
+       -B=BURST_COUNT
+              use busrt count BURST_COUNT for interations (default 10)
+
+       -v, verbose output(default off)
+
+       -c, use consumer notification events (default off)
+
+       -p, use polling (default wait for event)
+
+       -d, delay in seconds before close (default off)
+
+       -s, run as server (default - run as server)
+
+       -h=HOSTNAME
+              use HOSTNAME to specify server hostname or IP address (default - none)
+
+EXAMPLES
+       dtest -P OpenIB-cma -v -s
+            Starts a server process with debug verbosity using provider OpenIB-cma.
+
+       dtest -P OpenIB-cma -h server1-ib0
+
+            Starts a client process, using OpenIB-cma provider to connect to hostname server1-ib0.
+
+SEE ALSO
+       dapltest(1)
+
+AUTHORS
+       Arlin Davis
+              <ardavis at ichips.intel.com>
+
+BUGS
+
+/dapl/test/dapltest/
+
+NAME
+        dapltest - test for the Direct Access Programming Library (DAPL)
+
+DESCRIPTION
+       Dapltest  is  a  set  of tests developed to exercise, characterize, and verify the DAPL interfaces
+       during development and porting.  At least two instantiations of the test must be run. One acts  as
+       the  server, fielding requests and spawning server-side test threads as needed. Other client invo-
+       cations connect to the server and issue test requests. The server side of the test, once  invoked,
+       listens  continuously for client connection requests, until quit or killed. Upon receipt of a con-
+       nection request, the connection is established, the server and client sides swap  version  numbers
+       to  verify that they are able to communicate, and the client sends the test request to the server.
+       If the version numbers match, and the test request is well-formed, the server spawns  the  threads
+       needed to run the test before awaiting further connections.
+
+USAGE
+       dapltest [ -f script_file_name ] [ -T S|Q|T|P|L ] [ -D device_name ] [ -d ] [ -R HT|LL|EC|PM|BE ]
+
+       With  no  arguments,  dapltest runs as a server using default values, and loops accepting requests
+       from clients.
+
+       The -f option allows all arguments to be placed in a file, to ease test automation.
+
+       The following arguments are common to all tests:
+
+       [ -T S|Q|T|P|L ]
+              Test function to be performed:
+
+              S      - server loop
+
+              Q      - quit, client requests that server wait for any outstanding tests to complete, then
+                     clean up and exit
+
+              T      - transaction test, transfers data between client and server
+
+              P      - performance test, times DTO operations
+
+              L      -  limit  test,  exhausts  various  resources, runs in client w/o server interaction
+                     Default: S
+
+      [ -D device_name ]
+              Specifies the interface adapter name as documented in the /etc/dat.conf  static  configura-
+              tion file. This name corresponds to the provider library to open.  Default: none
+
+       [ -d ] Enables  extra  debug  verbosity,  primarily tracing of the various DAPL operations as they
+              progress.  Repeating this parameter increases debug spew.  Errors encountered result in the
+              test  spewing some explanatory text and stopping; this flag provides more detail about what
+              lead up to the error.  Default: zero
+
+       [ -R BE ]
+              Indicate the quality of service (QoS) desired.  Choices are:
+
+              HT     - high throughput
+
+              LL     - low latency
+
+              EC     - economy (neither HT nor LL)
+
+              PM     - premium
+
+              BE     - best effort Default: BE
+
+       Usage - Quit test client
+
+           dapltest [Common_Args] [ -s server_name ]
+
+           Quit testing (-T Q) connects to the server to ask it to clean up and
+           exit (after it waits for any outstanding test runs to complete).
+           In addition to being more polite than simply killing the server,
+           this test exercises the DAPL object teardown code paths.
+           There is only one argument other than those supported by all tests:
+
+           -s server_name      Specifies the name of the server interface.
+                               No default.
+
+       Usage - Transaction test client
+
+           dapltest [Common_Args] [ -s server_name ]
+                    [ -t threads ] [ -w endpoints ] [ -i iterations ] [ -Q ]
+                    [ -V ] [ -P ] OPclient OPserver [ op3,
+
+           Transaction testing (-T T) transfers a variable amount of data between
+:
+          client and server.  The data transfer can be described as a sequence of
+           individual operations; that entire sequence is transferred ’iterations’
+           times by each thread over all of its endpoint(s).
+
+           The following parameters determine the behavior of the transaction test:
+
+           -s server_name      Specifies the name or IP address of the server interface.
+                               No default.
+
+           [ -t threads ]      Specify the number of threads to be used.
+                               Default: 1
+
+           [ -w endpoints ]    Specify the number of connected endpoints per thread.
+                               Default: 1
+
+           [ -i iterations ]   Specify the number of times the entire sequence
+                               of data transfers will be made over each endpoint.
+                               Default: 1000
+
+           [ -Q ]              Funnel completion events into a CNO.
+                               Default: use EVDs
+
+           [ -V ]              Validate the data being transferred.
+                               Default: ignore the data
+
+           [ -P ]              Turn on DTO completion polling
+                               Default: off
+
+           OP1 OP2 [ OP3, ... ]
+                               A single transaction (OPx) consists of:
+
+                               server|client   Indicates who initiates the
+                                               data transfer.
+
+                               SR|RR|RW        Indicates the type of transfer:
+                                               SR  send/recv
+                                               RR  RDMA read
+                                               RW  RDMA write
+                               Defaults: none
+
+                               [ seg_size [ num_segs ] ]
+:
+
+                                              Indicates the amount and format
+                                               of the data to be transferred.
+                                               Default:  4096  1
+                                                         (i.e., 1 4KB buffer)
+
+                               [ -f ]          For SR transfers only, indicates
+                                               that a client’s send transfer
+                                               completion should be reaped when
+                                               the next recv completion is reaped.
+                                               Sends and receives must be paired
+                                               (one client, one server, and in that
+                                               order) for this option to be used.
+
+           Restrictions:
+
+           Due to the flow control algorithm used by the transaction test, there
+           must be at least one SR OP for both the client and the server.
+
+           Requesting data validation (-V) causes the test to automatically append
+           three OPs to those specified. These additional operations provide
+           synchronization points during each iteration, at which all user-specified
+           transaction buffers are checked. These three appended operations satisfy
+           the "one SR in each direction" requirement.
+
+           The transaction OP list is printed out if -d is supplied.
+
+       Usage - Performance test client
+
+           dapltest [Common_Args] -s server_name [ -m p|b ]
+                    [ -i iterations ] [ -p pipeline ] OP
+
+           Performance testing (-T P) times the transfer of an operation.
+           The operation is posted ’iterations’ times.
+
+           The following parameters determine the behavior of the transaction test:
+
+           -s server_name      Specifies the name or IP address of the server interface.
+                               No default.
+
+           -m b|p              Used to choose either blocking (b) or polling (p)
+                               Default: blocking (b)
+          [ -i iterations ]   Specify the number of times the entire sequence
+                               of data transfers will be made over each endpoint.
+                               Default: 1000
+
+           [ -p pipeline ]     Specify the pipline length, valid arguments are in
+                               the range [0,MAX_SEND_DTOS]. If a value greater than
+                               MAX_SEND_DTOS is requested the value will be
+                               adjusted down to MAX_SEND_DTOS.
+                               Default: MAX_SEND_DTOS
+
+           OP                  Specifies the operation as follow:
+
+                               RR|RW           Indicates the type of transfer:
+                                               RR  RDMA read
+                                               RW  RDMA write
+                                               Defaults: none
+
+                               [ seg_size [ num_segs ] ]
+                                               Indicates the amount and format
+                                               of the data to be transferred.
+                                               Default:  4096  1
+                                                         (i.e., 1 4KB buffer)
+
+       Usage - Limit test client
+
+           Limit testing (-T L) neither requires nor connects to any server
+           instance.  The client runs one or more tests which attempt to
+           exhaust various resources to determine DAPL limits and exercise
+           DAPL error paths.  If no arguments are given, all tests are run.
+
+           Limit testing creates the sequence of DAT objects needed to
+           move data back and forth, attempting to find the limits supported
+           for the DAPL object requested.  For example, if the LMR creation
+           limit is being examined, the test will create a set of
+           {IA, PZ, CNO, EVD, EP} before trying to run dat_lmr_create() to
+           failure using that set of DAPL objects.  The ’width’ parameter
+           can be used to control how many of these parallel DAPL object
+           sets are created before beating upon the requested constructor.
+           Use of -m limits the number of dat_*_create() calls that will
+           be attempted, which can be helpful if the DAPL in use supports
+           essentailly unlimited numbers of some objects.
+           The limit test arguments are:
+
+           [ -m maximum ]      Specify the maximum number of dapl_*_create()
+                               attempts.
+                               Default: run to object creation failure
+
+           [ -w width ]        Specify the number of DAPL object sets to
+                               create while initializing.
+                               Default: 1
+
+           [ limit_ia ]        Attempt to exhaust dat_ia_open()
+
+           [ limit_pz ]        Attempt to exhaust dat_pz_create()
+
+           [ limit_cno ]       Attempt to exhaust dat_cno_create()
+
+           [ limit_evd ]       Attempt to exhaust dat_evd_create()
+
+           [ limit_ep ]        Attempt to exhaust dat_ep_create()
+
+           [ limit_rsp ]       Attempt to exhaust dat_rsp_create()
+
+           [ limit_psp ]       Attempt to exhaust dat_psp_create()
+
+           [ limit_lmr ]       Attempt to exhaust dat_lmr_create(4KB)
+
+           [ limit_rpost ]     Attempt to exhaust dat_ep_post_recv(4KB)
+
+           [ limit_size_lmr ]  Probe maximum size dat_lmr_create()
+
+                               Default: run all tests
+
+EXAMPLES
+       dapltest -T S -d -D OpenIB-cma
+
+                               Starts a server process with debug verbosity.
+
+       dapltest -T T -d -s host1-ib0 -D OpenIB-cma -i 100 client SR 4096 2 server SR 4096 2
+
+                               Runs a transaction test, with both sides
+                               sending one buffer with two 4KB segments,
+                              one hundred times.
+
+       dapltest -T P -d -s host1-ib0 -D OpenIB-cma -i 100 SR 4096 2
+
+                               Runs a performance test, with the client
+                               sending one buffer with two 4KB segments,
+                               one hundred times.
+
+       dapltest -T Q -s host1-ib0 -D OpenIB-cma
+
+                               Asks the server to clean up and exit.
+
+       dapltest -T L -D OpenIB-cma -d -w 16 -m 1000
+
+                               Runs all of the limit tests, setting up
+                               16 complete sets of DAPL objects, and
+                               creating at most a thousand instances
+                               when trying to exhaust resources.
+
+       dapltest -T T -V -d -t 2 -w 4 -i 55555 -s linux3 -D OpenIB-cma client RW 4096 1 server RW  2048  4
+       client SR 1024 4 server SR 4096 2 client SR 1024 3 -f server SR 2048 1 -f
+
+                               Runs a more complicated transaction test,
+                               with two thread using four EPs each,
+                               sending a more complicated buffer pattern
+                               for a larger number of iterations,
+                               validating the data received.
+
+       BUGS   (and  To Do List)
+
+           Use of CNOs (-Q) is not yet supported.
+
+           Further limit tests could be added.
+
+
+
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..e7ebfd5
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,8854 @@
+# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_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 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_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="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "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([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_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
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "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)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# 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\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO "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"')dnl "
+  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+  ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+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_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool at gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 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."
+
+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
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_XSI_SHELLFNS
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],			[_LT_LANG(C)],
+  [C++],		[_LT_LANG(CXX)],
+  [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
+
+
+# _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
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if 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"
+    ])
+    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
+    ;;
+  esac
+])
+
+
+# _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
+  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
+
+
+# _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
+
+
+# _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}
+
+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
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+[$]*
+_LT_EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$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.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
+
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
+
+	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
+
+	  if test "$prev" != 'sed 50q "[$]0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+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
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+  [AS_HELP_STRING([--disable-libtool-lock],
+    [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+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
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _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"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  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
+
+
+# _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*
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "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
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    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
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+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 ());
+
+  return status;
+}]
+_LT_EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+    ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+	  lt_cv_dlopen_self_static, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__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
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+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
+  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=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[[4-9]]*)
+  version_type=linux
+  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
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | 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,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
+
+    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
+    ;;
+
+  *)
+    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`'
+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*)
+    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_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
+
+  # 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="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  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
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="m4_if([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  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
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+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
+  ;;
+
+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
+  ;;
+
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  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
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_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
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /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 <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_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*
+
+  # 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
+
+_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
+
+
+# _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_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'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      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* | netbsdelf*-gnu)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      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
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+AC_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])
+
+#
+# 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])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_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'
+  ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+  ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _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=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
+  esac
+
+  _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}'
+
+    # 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
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.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.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(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
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      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'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # 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
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
+
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	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
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX
+        _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
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _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
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -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
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -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
+      ;;
+
+    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)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $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)=:
+      ;;
+
+    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)=:
+      ;;
+
+    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
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_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
+  ;;
+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)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # Report which library types will actually be built
+  AC_MSG_CHECKING([if libtool supports shared libraries])
+  AC_MSG_RESULT([$can_build_shared])
+
+  AC_MSG_CHECKING([whether to build shared libraries])
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[[4-9]]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  AC_MSG_RESULT([$enable_shared])
+
+  AC_MSG_CHECKING([whether to build static libraries])
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  AC_MSG_RESULT([$enable_static])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_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
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_LD
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -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
+
+      # 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
+      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_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _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)
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      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*)
+	    case $host_cpu in
+	      hppa*64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $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[[3-9]]*)
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $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
+        _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* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $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++
+	    _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*)
+	    # 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*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $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
+        ;;
+
+      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*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	    case $host_os in
+	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+	    output_verbose_link_cmd='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*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  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],
+[
+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
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_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
+
+# 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#*=}
+}
+
+# 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"`
+}
+
+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
+}
+
+# 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]"
+}
+
+_LT_EOF
+    ;;
+  esac
+])
+
+# 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.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+		      [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+  		   [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+		 [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+		 [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+		 [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+		 [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+		 [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+	     [m4_foreach([_Lt_suffix],
+		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [lt_append([$1], [$2], [$3])$4],
+		 [$5])],
+	  [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+	[$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers			-*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3012 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6])
+m4_define([LT_PACKAGE_REVISION], [1.3012])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6'
+macro_revision='1.3012'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007 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,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.10.2], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10.2])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 -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 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
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[# 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
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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 13
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_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"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 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
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..b337116
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,62 @@
+/* config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `ibverbs' library (-libverbs). */
+#undef HAVE_LIBIBVERBS
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/config/compile b/config/compile
new file mode 100755
index 0000000..1b1d232
--- /dev/null
+++ b/config/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# 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/config.guess b/config/config.guess
new file mode 100755
index 0000000..2fc3acc
--- /dev/null
+++ b/config/config.guess
@@ -0,0 +1,1411 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-06-17'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+## for Red Hat Linux
+if test -f /etc/redhat-release ; then
+    VENDOR=redhat ;
+else
+    VENDOR= ;
+fi
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha*:OpenVMS:*:*)
+	echo alpha-hp-vms
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c \
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && exit 0
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    *:UNICOS/mp:*:*)
+	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
+	exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+	# Determine whether the default compiler uses glibc.
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#if __GLIBC__ >= 2
+	LIBC=gnu
+	#else
+	LIBC=
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
+	exit 0 ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	case `uname -p` in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/config.sub b/config/config.sub
new file mode 100755
index 0000000..6b2ff9f
--- /dev/null
+++ b/config/config.sub
@@ -0,0 +1,1500 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-06-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| s390 | s390x \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| msp430-* \
+	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| s390-* | s390x-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nv1)
+		basic_machine=nv1-cray
+		os=-unicosmp
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/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/install-sh b/config/install-sh
new file mode 100755
index 0000000..4d4a951
--- /dev/null
+++ b/config/install-sh
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-05-14.22
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
+
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
+done
+
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/ltmain.sh b/config/ltmain.sh
new file mode 100644
index 0000000..3506ead
--- /dev/null
+++ b/config/ltmain.sh
@@ -0,0 +1,8413 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6
+# 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.
+#
+# 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.
+
+# 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.6 Debian-2.2.6a-4
+#       automake:		$automake_version
+#       autoconf:		$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION="2.2.6 Debian-2.2.6a-4"
+TIMESTAMP=""
+package_revision=1.3012
+
+# 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
+
+# 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).
+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
+	  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"
+
+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"`
+}
+
+# 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
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$opt_dry_run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# 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 ()
+{
+    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
+}
+
+
+# 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 ()
+{
+    case $1 in
+      *[\\\`\"]*)
+	my_arg=`$ECHO "X$1" | $Xsed \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        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_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 ()
+{
+    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 "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+# 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_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
+}
+
+
+
+
+
+# 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
+}
+
+exit_cmd=:
+
+
+
+
+
+# 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
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# 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=
+
+# 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."
+}
+
+
+# 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 "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# 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"
+    else
+      $ECHO "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $ECHO "enable static libraries"
+    else
+      $ECHO "disable static libraries"
+    fi
+
+    exit $?
+}
+
+# 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"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # 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.
+{
+
+  # Shorthand for --mode=foo, only valid as the first argument
+  case $1 in
+  clean|clea|cle|cl)
+    shift; set dummy --mode clean ${1+"$@"}; shift
+    ;;
+  compile|compil|compi|comp|com|co|c)
+    shift; set dummy --mode compile ${1+"$@"}; shift
+    ;;
+  execute|execut|execu|exec|exe|ex|e)
+    shift; set dummy --mode execute ${1+"$@"}; shift
+    ;;
+  finish|finis|fini|fin|fi|f)
+    shift; set dummy --mode finish ${1+"$@"}; shift
+    ;;
+  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
+
+  # Parse non-mode specific arguments:
+  while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+      --config)		func_config					;;
+
+      --debug)		preserve_args="$preserve_args $opt"
+			func_echo "enabling shell trace mode"
+			opt_debug='set -x'
+			$opt_debug
+			;;
+
+      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			execute_dlfiles="$execute_dlfiles $1"
+			shift
+			;;
+
+      --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=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      ;;
+  esac
+
+  # 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
+    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
+    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 \`$progname --help --mode=$mode' for more information."
+}
+
+
+# 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
+}
+
+# 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
+}
+
+# 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"
+}
+
+# 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
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  func_stripname '-Wc,' '' "$arg"
+	  args=$func_stripname_result
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+	  for arg in $args; do
+	    IFS="$save_ifs"
+	    func_quote_for_eval "$arg"
+	    lastarg="$lastarg $func_quote_for_eval_result"
+	  done
+	  IFS="$save_ifs"
+	  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.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      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
+    case $libobj in
+    *.[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
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    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
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    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
+
+    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
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $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 "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+      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
+    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
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      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 "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$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
+	func_show_eval '$MV "$output_obj" "$lobj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+	suppress_output=' >/dev/null 2>&1'
+      fi
+    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$pie_flag"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      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 "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$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
+	func_show_eval '$MV "$output_obj" "$obj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+	removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+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
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [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: $progname [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
+  -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
+
+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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -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
+
+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: $progname [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."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode \`$mode'"
+        ;;
+    esac
+
+    $ECHO
+    $ECHO "Try \`$progname --help' for more information about other modes."
+
+    exit $?
+}
+
+  # Now that we've collected a possible --mode arg, show help if necessary
+  $opt_help && func_mode_help
+
+
+# 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"
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      test -f "$file" \
+	|| func_fatal_help "\`$file' is not a file"
+
+      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"
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+	func_source "$file"
+
+	# 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
+
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+
+	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
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+	;;
+
+      *)
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if 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
+
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG 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
+
+      # 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
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  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
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
+
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    $ECHO "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $ECHO "   $libdir"
+    done
+    $ECHO
+    $ECHO "If you ever happen to want to link against installed libraries"
+    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $ECHO "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $ECHO "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $ECHO "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $ECHO "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $ECHO "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $ECHO
+
+    $ECHO "See any operating system documentation about shared libraries for"
+    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
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# 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
+
+    # 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"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o)
+	prev=$arg
+	;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest=$arg
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      install_prog="$install_prog $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    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
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # 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
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	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
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	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
+	  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"
+	;;
+
+      *.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
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  ;;
+	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
+	;;
+
+      *)
+	# 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
+
+	# 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
+
+	# 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=
+
+	  func_source "$wrapper"
+
+	  # 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
+	    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
+
+	  relink_command=
+	  func_source "$wrapper"
+
+	  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
+	    # Install the binary that we compiled earlier.
+	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    func_stripname '' '.exe' "$destfile"
+	    destfile=$func_stripname_result
+	    ;;
+	  esac
+	  ;;
+	esac
+	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+	$opt_dry_run || if test -n "$outputname"; then
+	  ${RM}r "$tmpdir"
+	fi
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
+
+      # 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
+
+	  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
+
+	  # 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
+	    $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
+	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
+
+	$opt_dry_run || {
+	  # Make sure we have at least an empty file.
+	  test -f "$nlist" || : > "$nlist"
+
+	  if test -n "$exclude_expsyms"; then
+	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	    $MV "$nlist"T "$nlist"
+	  fi
+
+	  # Try sorting and uniquifying the output.
+	  if $GREP -v "^: " < "$nlist" |
+	      if sort -k 3 </dev/null >/dev/null 2>&1; then
+		sort -k 3
+	      else
+		sort +2
+	      fi |
+	      uniq > "$nlist"S; then
+	    :
+	  else
+	    $GREP -v "^: " < "$nlist" > "$nlist"S
+	  fi
+
+	  if test -f "$nlist"S; then
+	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+	  else
+	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	  fi
+
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* 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
+
+	  $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 },"
+
+	  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}
+};
+
+/* 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
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	} # !$opt_dry_run
+
+	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
+
+	# 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 $?'
+
+	# Clean up the generated files.
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+	# 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_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  fi
+	  ;;
+	*)
+	  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.
+
+      # 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
+}
+
+# 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"
+}
+
+
+
+# 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
+}
+
+
+# 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=""
+
+    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"
+
+      func_mkdir_p "$my_xdir"
+
+      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
+	;;
+      *)
+        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_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
+
+	$ECHO "\
+#! $SHELL
+
+# $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.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+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
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following 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 "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+"
+}
+# end: func_emit_wrapper_part1
+
+# 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
+
+	$ECHO "\
+
+  # 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
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
+
+	  $ECHO "\
+
+    # 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
+
+    $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
+
+	$ECHO "\
+
+  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 "\
+      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
+
+
+# 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
+
+	# 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}"
+}
+
+
+# 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
+
+# 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
+
+# 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
+
+/* $cwrappersource - temporary wrapper executable 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 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* "$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
+	    else
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+	    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
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+	    else
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+	    fi
+
+
+	    cat <<"EOF"
+
+#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;
+
+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 */
+
+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} */
+
+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 */
+
+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;
+
+  int i;
+
+  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));
+
+  /* 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
+
+	    cat <<"EOF"
+	  printf ("%s", script_text_part1);
+	  printf ("%s", script_text_part2);
+	  return 0;
+	}
+    }
+
+  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
+
+	    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
+
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* 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
+
+	    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
+
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  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);
+
+  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;
+
+  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>")));
+    }
+
+EOF
+
+	    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
+
+	    cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+			  string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* 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;
+
+  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
+			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+	return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+	{
+	  concat_name = xstrdup (wrapper);
+	  if (check_executable (concat_name))
+	    return concat_name;
+	  XFREE (concat_name);
+	}
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+	has_slash = 1;
+	break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+	{
+	  for (p = path; *p; p = p_next)
+	    {
+	      const char *q;
+	      size_t p_len;
+	      for (q = p; *q; q++)
+		if (IS_PATH_SEPARATOR (*q))
+		  break;
+	      p_len = q - p;
+	      p_next = (*q == '\0' ? q : q + 1);
+	      if (p_len == 0)
+		{
+		  /* empty path: current directory */
+		  if (getcwd (tmp, LT_PATHMAX) == NULL)
+		    lt_fatal ("getcwd failed");
+		  tmp_len = strlen (tmp);
+		  concat_name =
+		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, tmp, tmp_len);
+		  concat_name[tmp_len] = '/';
+		  strcpy (concat_name + tmp_len + 1, wrapper);
+		}
+	      else
+		{
+		  concat_name =
+		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, p, p_len);
+		  concat_name[p_len] = '/';
+		  strcpy (concat_name + p_len + 1, wrapper);
+		}
+	      if (check_executable (concat_name))
+		return concat_name;
+	      XFREE (concat_name);
+	    }
+	}
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
+
+char *
+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;
+	    }
+
+	  /* 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);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal ("Could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert (str != NULL);
+  assert (pat != NULL);
+
+  len = strlen (str);
+  patlen = strlen (pat);
+
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+	*str = '\0';
+    }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+	       const char *message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+
+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
+  }
+}
+
+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;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+  const char *p;
+  int len;
+  if (!arg || !*arg)
+    return 1;
+
+  p = strchr (arg, (int)'=');
+
+  if (!p)
+    return 1;
+
+  *value = xstrdup (++p);
+
+  len = strlen (arg) - strlen (*value);
+  *name = XMALLOC (char, len);
+  strncpy (*name, arg, len-1);
+  (*name)[len - 1] = '\0';
+
+  return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+    }
+
+  lt_setenv (name, value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 0);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 1);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+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>")));
+
+  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>")));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# 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
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    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
+
+    # 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
+	  ;;
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
+	build_libtool_libs=no
+	build_old_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # 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
+
+	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
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	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.
+
+	      # Check to see that this really is a libtool object.
+	      if func_lalib_unsafe_p "$arg"; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		func_source "$arg"
+
+		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
+
+		# Extract subdirectory from the argument.
+		func_dirname "$arg" "/" ""
+		xdir="$func_dirname_result"
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  func_append libobjs " $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  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
+	    func_fatal_error "link input file \`$arg' does not exist"
+	  fi
+	  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
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      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
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  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
+	;;
+
+      -framework)
+	prev=framework
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -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
+	;;
+
+      -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
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # 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
+	;;
+
+      -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
+	;;
+
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -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
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	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
+	;;
+
+      -shared)
+	# The effects of -shared are defined in a previous loop.
+	continue
+	;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -weak)
+        prev=weak
+	continue
+	;;
+
+      -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
+	;;
+
+      -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
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # -msg_* for osf cc
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      # -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
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if func_lalib_unsafe_p "$arg"; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  func_source "$arg"
+
+	  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
+
+	  # Extract subdirectory from the argument.
+	  func_dirname "$arg" "/" ""
+	  xdir="$func_dirname_result"
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    func_append libobjs " $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    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
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+      esac # arg
+
+      # 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
+
+    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%"
+	  test "X$link_all_deplibs" != Xno && libs="$libs $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"
+	    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
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    func_fatal_error "\`$lib' is not a convenience library"
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  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
+	      path=
+	      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
+	    ;;
+	  *)
+	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+	    ;;
+	  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
+	# 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 "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	shift
+	realname="$1"
+	shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	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
+
+	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
+
+	# 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
+
+	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 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
+
+	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
+	    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
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    eval test_cmds=\"$archive_expsym_cmds\"
+	    cmds=$archive_expsym_cmds
+	  else
+	    eval test_cmds=\"$archive_cmds\"
+	    cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   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.
+
+	  # 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
+	    for obj
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    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
+	      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
+	    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
+	    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
+
+          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
+
+	    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
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  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
+	fi
+
+	if test -n "$delfiles"; then
+	  # Append the command to remove temporary files to $cmds.
+	  eval cmds=\"\$cmds~\$RM $delfiles\"
+	fi
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  libobjs="$libobjs $func_extract_archives_result"
+	  test "X$libobjs" = "X " && libobjs=
+	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
+	IFS="$save_ifs"
+
+	# 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 $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      func_show_eval '${RM}r "$gentop"'
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    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
+      ;;
+
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      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
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # 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
+
+      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
+      ;;
+
+    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"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for programs"
+
+      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
+
+      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
+
+
+      # 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* | *-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"
+
+      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
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      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"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	exit_status=0
+	func_show_eval "$link_command" 'exit_status=$?'
+
+	# Delete the generated files.
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	fi
+
+	exit $exit_status
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	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
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      # Now create the wrapper script.
+      func_verbose "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || $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
+	    func_quote_for_eval "$var_value"
+	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $ECHO for shipping.
+      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if 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
+	# 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
+	    }
+
+	    # 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
+
+	    func_emit_wrapper no > $output
+	    chmod +x $output
+	  ;;
+	esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save $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
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	cmds=$old_archive_from_new_cmds
+      else
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  oldobjs="$oldobjs $func_extract_archives_result"
+	fi
+
+	# 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
+	fi
+	eval cmds=\"$old_archive_cmds\"
+
+	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
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || $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
+	  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
+
+      # 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=
+
+	    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.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $ECHO >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      }
+
+      # 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+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) RM="$RM $arg"; rmforce=yes ;;
+      -*) RM="$RM $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+	 { test -h "$file"; } >/dev/null 2>&1 ||
+	 test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if func_lalib_p "$file"; then
+	  func_source $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      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.
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if func_lalib_p "$file"; then
+
+	  # Read the .lo file
+	  func_source $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" &&
+	     test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    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 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
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      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
+	func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+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"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-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/config/missing b/config/missing
new file mode 100755
index 0000000..894e786
--- /dev/null
+++ b/config/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..9890490
--- /dev/null
+++ b/configure
@@ -0,0 +1,14602 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.63 for dapl 2.0.19.
+#
+# Report bugs to <general at lists.openfabrics.org>.
+#
+# 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 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
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes &&	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # 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
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+	done
+	export CONFIG_SHELL
+	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell 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 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'"
+
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+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
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+$*
+_LT_EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$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.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
+
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
+
+	  for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
+
+	  if test "$prev" != 'sed 50q "$0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='dapl'
+PACKAGE_TARNAME='dapl'
+PACKAGE_VERSION='2.0.19'
+PACKAGE_STRING='dapl 2.0.19'
+PACKAGE_BUGREPORT='general at lists.openfabrics.org'
+
+ac_unique_file="dat/udat/udat.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+OS_SUSE11_FALSE
+OS_SUSE11_TRUE
+OS_RHEL5_FALSE
+OS_RHEL5_TRUE
+OS_RHEL4_FALSE
+OS_RHEL4_TRUE
+EXT_TYPE_IB_FALSE
+EXT_TYPE_IB_TRUE
+DEBUG_FALSE
+DEBUG_TRUE
+HAVE_LD_VERSION_SCRIPT_FALSE
+HAVE_LD_VERSION_SCRIPT_TRUE
+CPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+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
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+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_shared
+enable_static
+with_pic
+enable_fast_install
+enable_dependency_tracking
+with_gnu_ld
+enable_libtool_lock
+enable_libcheck
+enable_debug
+enable_ext_type
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# 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
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    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_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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    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_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_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    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_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_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    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_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.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+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
+fi
+
+# 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=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      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'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $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
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { $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 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
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures dapl 2.0.19 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/dapl]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of dapl 2.0.19:";;
+   esac
+  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]
+  --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-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-libcheck      do not test for presence of ib libraries
+  --enable-debug Turn on debug mode, default=off
+  --enable-ext-type Enable extensions support for library: ib, none, default=ib
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <general at lists.openfabrics.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$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
+
+    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
+      $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 $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+dapl configure 2.0.19
+generated by GNU Autoconf 2.63
+
+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
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by dapl $as_me 2.0.19, which was
+generated by GNU Autoconf 2.63.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  $as_echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $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=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$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
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	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
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer 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
+    { $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
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { $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";;
+    esac
+  fi
+else
+  { $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 $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $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)
+      { $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
+	# 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=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $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
+
+
+
+ac_aux_dir=
+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
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { $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
+
+# 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.10'
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# 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
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    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.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $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.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $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
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+$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
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+$as_echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ $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"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+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"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $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
+
+{ $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
+    # 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
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $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 '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { $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
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=dapl
+ VERSION=2.0.19
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $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"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+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
+
+
+
+macro_version='2.2.6'
+macro_revision='1.3012'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$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; }; }
+
+{ $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
+  $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=`$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
+{ $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
+  $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
+{ $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
+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
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $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
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $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
+{ $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
+  $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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  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.
+set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $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.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $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.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
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $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.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
+{ $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
+  $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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $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" && { { $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
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$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); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.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.
+{ $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=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+
+{ $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
+
+{ { $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
+$as_echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $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'
+  { (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
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $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
+$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; }; }; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $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=$?
+  $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
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $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
+$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; }; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ $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
+{ $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
+  $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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $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
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $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
+  $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.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_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=$?
+  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=$?
+  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
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $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
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $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_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_prog_cc_c89=$ac_arg
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $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; } ;;
+  *)
+    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
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $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
+  $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
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $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
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+{ $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 ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { 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
+  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
+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 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_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
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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
+	;;
+      *)
+	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
+  { $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
+
+
+
+
+
+
+
+
+
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $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
+
+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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    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
+
+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
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  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
+
+
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $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:4335: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:4338: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:4341: 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; }
+
+{ $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
+
+# 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"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    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
+
+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
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $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; }
+
+
+{ $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; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+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'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $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
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $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
+
+
+
+
+
+
+
+
+
+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
+  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
+
+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
+
+
+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
+
+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
+
+
+
+
+
+
+
+
+
+{ $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.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  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
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+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
+  ;;
+
+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
+  ;;
+
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $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
+
+
+
+
+
+
+
+
+
+
+
+
+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
+{ $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 "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $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
+{ $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_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $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_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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  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
+
+
+
+
+
+
+
+
+
+
+
+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
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+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"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+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.
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /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 <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if { (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
+    # 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=$?
+  $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
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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 5547 "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*
+  ;;
+
+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*
+  ;;
+
+*-*-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
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	lt_cv_cc_needs_belf=no
+fi
+
+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
+
+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
+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_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
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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_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
+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_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
+
+fi
+fi
+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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  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
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+    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 "$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
+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_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
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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_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
+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_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
+
+fi
+fi
+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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  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
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+    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 "$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
+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_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
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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_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
+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_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
+
+fi
+fi
+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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  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
+  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
+
+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
+
+
+fi
+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
+done
+IFS=$as_save_IFS
+
+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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  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
+
+    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
+  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
+
+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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+
+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
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  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
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $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.  */
+
+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_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
+
+	lt_cv_ld_exported_symbols_list=no
+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"
+
+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
+    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
+
+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
+{ $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
+  $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"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+  :
+else
+  $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 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_c_preproc_warn_flag$ac_c_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
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $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
+  # 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_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $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 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_c_preproc_warn_flag$ac_c_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
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { $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
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $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>
+
+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=$?
+  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
+
+	ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+( 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
+
+
+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
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$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
+
+#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
+
+	eval "$as_ac_Header=no"
+fi
+
+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
+
+done
+
+
+
+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
+
+#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
+
+	eval "$as_ac_Header=no"
+fi
+
+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
+
+done
+
+
+
+# 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
+
+
+
+
+
+
+
+
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=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
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $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
+  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
+{ $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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+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
+
+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
+
+
+
+
+
+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
+
+*** 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
+
+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
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+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;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# 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 the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+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*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+  { $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:7400: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7404: \$? = $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
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+
+
+
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      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
+      ;;
+
+    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='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    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
+      ;;
+
+    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=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      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
+      ;;
+
+    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'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    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
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+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; }
+
+
+
+
+
+
+#
+# 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:7739: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7743: \$? = $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*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+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
+
+fi
+
+
+
+
+
+
+#
+# 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"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+  { $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
+
+   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:7844: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:7848: \$? = $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*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&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+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
+
+   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:7899: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:7903: \$? = $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*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $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; }
+
+  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=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  linux* | k*bsd*-gnu)
+    link_all_deplibs=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&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
+
+    # 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
+
+*** 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.
+
+_LT_EOF
+      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
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | 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'
+
+      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
+      ;;
+
+    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'
+      ;;
+
+    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'
+
+        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
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	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
+	;;
+	*)
+	  # 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
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    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
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  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
+	link_all_deplibs=no
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      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
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_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='${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
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_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='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      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
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      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*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_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
+      ;;
+
+    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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  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
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "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
+
+
+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"
+      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
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      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
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    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
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "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'
+
+	# 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
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$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
+      ;;
+
+    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
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $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=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  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
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | 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,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
+
+    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
+    ;;
+
+  *)
+    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_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*)
+    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\"; \
+       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.  */
+
+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_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
+
+  # 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="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $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
+
+  # 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; }
+
+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
+
+
+
+
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { $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.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	ac_cv_lib_dl_dlopen=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_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
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    { $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
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	ac_cv_func_shl_load=no
+fi
+
+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.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	ac_cv_lib_dld_shl_load=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_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
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	ac_cv_func_dlopen=no
+fi
+
+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.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	ac_cv_lib_dl_dlopen=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_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.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	ac_cv_lib_svld_dlopen=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_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.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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
+
+	ac_cv_lib_dld_dld_link=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_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
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { $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
+  	  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 <<_LT_EOF
+#line 10715 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+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 ());
+
+  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
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+$as_echo "$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\"
+      { $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 10811 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+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 ());
+
+  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*
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+  # 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; }
+
+  { $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
+    ;;
+
+  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; }
+
+
+
+
+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"
+
+
+
+
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+# Check whether --enable-libcheck was given.
+if test "${enable_libcheck+set}" = set; then
+  enableval=$enable_libcheck;        if test x$enableval = xno ; then
+                disable_libcheck=yes
+        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
+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
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $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
+{ $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
+  $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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  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.
+set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $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.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $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.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
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $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.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
+{ $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
+  $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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $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
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $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" && { { $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
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$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); }
+
+{ $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
+  $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.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+{ $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
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_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=$?
+  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=$?
+  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
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $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
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $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_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval 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_prog_cc_c89=$ac_arg
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $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; } ;;
+  *)
+    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
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $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
+  $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
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $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
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+if test "$disable_libcheck" != "yes"
+then
+
+{ $as_echo "$as_me:$LINENO: checking for ibv_get_device_list in -libverbs" >&5
+$as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
+if test "${ac_cv_lib_ibverbs_ibv_get_device_list+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-libverbs  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ibv_get_device_list ();
+int
+main ()
+{
+return ibv_get_device_list ();
+  ;
+  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_ibverbs_ibv_get_device_list=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ibverbs_ibv_get_device_list=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_ibverbs_ibv_get_device_list" >&5
+$as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
+if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBIBVERBS 1
+_ACEOF
+
+  LIBS="-libverbs $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: ibv_get_device_list() not found.  libdapl requires libibverbs." >&5
+$as_echo "$as_me: error: ibv_get_device_list() not found.  libdapl requires libibverbs." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+
+if test "$disable_libcheck" != "yes"
+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.  */
+$ac_includes_default
+#include <infiniband/verbs.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_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 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_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: 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;}
+    ( cat <<\_ASBOX
+## -------------------------------------------- ##
+## Report this to general at lists.openfabrics.org ##
+## -------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+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; }
+
+fi
+if test "x$ac_cv_header_infiniband_verbs_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: <infiniband/verbs.h> not found.  Is libibverbs installed?" >&5
+$as_echo "$as_me: error: <infiniband/verbs.h> not found.  Is libibverbs installed?" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether ld accepts --version-script" >&5
+$as_echo_n "checking whether ld accepts --version-script... " >&6; }
+if test "${ac_cv_version_script+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
+        ac_cv_version_script=yes
+    else
+        ac_cv_version_script=no
+    fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_version_script" >&5
+$as_echo "$ac_cv_version_script" >&6; }
+ if test "$ac_cv_version_script" = "yes"; then
+  HAVE_LD_VERSION_SCRIPT_TRUE=
+  HAVE_LD_VERSION_SCRIPT_FALSE='#'
+else
+  HAVE_LD_VERSION_SCRIPT_TRUE='#'
+  HAVE_LD_VERSION_SCRIPT_FALSE=
+fi
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug; case "${enableval}" in
+  yes) debug=true ;;
+  no)  debug=false ;;
+  *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  debug=false
+fi
+
+ if test x$debug = xtrue; then
+  DEBUG_TRUE=
+  DEBUG_FALSE='#'
+else
+  DEBUG_TRUE='#'
+  DEBUG_FALSE=
+fi
+
+
+# Check whether --enable-ext-type was given.
+if test "${enable_ext_type+set}" = set; then
+  enableval=$enable_ext_type;  if   test "x$enableval" = "xib" ; then
+      ext_type=ib
+   elif test "x$enableval" = "xnone" ; then
+      ext_type=none
+   else
+      echo
+      echo "Error!"
+      echo "Unknown extension type' type"
+      exit -1
+   fi
+
+else
+  ext_type=ib
+fi
+
+ if test "$ext_type" = "ib"; then
+  EXT_TYPE_IB_TRUE=
+  EXT_TYPE_IB_FALSE='#'
+else
+  EXT_TYPE_IB_TRUE='#'
+  EXT_TYPE_IB_FALSE=
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking Check for RHEL4 system" >&5
+$as_echo_n "checking Check for RHEL4 system... " >&6; }
+if test "${ac_cv_rhel4+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -f /etc/redhat-release &&
+       test -n "`grep -e "release 4" /etc/redhat-release`"; then
+        ac_cv_rhel4=yes
+    else
+        ac_cv_rhel4=no
+    fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_rhel4" >&5
+$as_echo "$ac_cv_rhel4" >&6; }
+ if test "$ac_cv_rhel4" = "yes"; then
+  OS_RHEL4_TRUE=
+  OS_RHEL4_FALSE='#'
+else
+  OS_RHEL4_TRUE='#'
+  OS_RHEL4_FALSE=
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking Check for RHEL5 system" >&5
+$as_echo_n "checking Check for RHEL5 system... " >&6; }
+if test "${ac_cv_rhel5+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -f /etc/redhat-release &&
+       test -n "`grep -e "release 5" /etc/redhat-release`"; then
+        ac_cv_rhel5=yes
+    else
+        ac_cv_rhel5=no
+    fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_rhel5" >&5
+$as_echo "$ac_cv_rhel5" >&6; }
+ if test "$ac_cv_rhel5" = "yes"; then
+  OS_RHEL5_TRUE=
+  OS_RHEL5_FALSE='#'
+else
+  OS_RHEL5_TRUE='#'
+  OS_RHEL5_FALSE=
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking Check for SUSE_11 system" >&5
+$as_echo_n "checking Check for SUSE_11 system... " >&6; }
+if test "${ac_cv_suse11+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -f /etc/SuSE-release &&
+       test -n "`grep -e "VERSION = 11" /etc/SuSE-release`"; then
+        ac_cv_suse11=yes
+    else
+        ac_cv_suse11=no
+    fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_suse11" >&5
+$as_echo "$ac_cv_suse11" >&6; }
+ if test "$ac_cv_suse11" = "yes"; then
+  OS_SUSE11_TRUE=
+  OS_SUSE11_FALSE='#'
+else
+  OS_SUSE11_TRUE='#'
+  OS_SUSE11_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files Makefile test/dtest/Makefile test/dapltest/Makefile dapl.spec"
+
+
+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 -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 "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${EXT_TYPE_IB_TRUE}" && test -z "${EXT_TYPE_IB_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"EXT_TYPE_IB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"EXT_TYPE_IB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${OS_RHEL4_TRUE}" && test -z "${OS_RHEL4_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"OS_RHEL4\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"OS_RHEL4\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${OS_RHEL5_TRUE}" && test -z "${OS_RHEL5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"OS_RHEL5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"OS_RHEL5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${OS_SUSE11_TRUE}" && test -z "${OS_SUSE11_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"OS_SUSE11\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"OS_SUSE11\" 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 dapl $as_me 2.0.19, 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="\\
+dapl config.status 2.0.19
+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"`'
+
+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; 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; 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" ;;
+    "test/dtest/Makefile") CONFIG_FILES="$CONFIG_FILES test/dtest/Makefile" ;;
+    "test/dapltest/Makefile") CONFIG_FILES="$CONFIG_FILES test/dapltest/Makefile" ;;
+    "dapl.spec") CONFIG_FILES="$CONFIG_FILES dapl.spec" ;;
+
+  *) { { $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=""
+
+# ### 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
+
+# ### 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"
+}
+
+_LT_EOF
+    ;;
+  esac
+
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+ ;;
+
+  esac
+done # for ac_tag
+
+
+{ (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.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+if test -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
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..930d67b
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,101 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.57)
+AC_INIT(dapl, 2.0.19, general at lists.openfabrics.org)
+AC_CONFIG_SRCDIR([dat/udat/udat.c])
+AC_CONFIG_AUX_DIR(config)
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(dapl, 2.0.19)
+
+AM_PROG_LIBTOOL
+
+AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presence of ib libraries],
+[       if test x$enableval = xno ; then
+                disable_libcheck=yes
+        fi
+])
+
+dnl Checks for programs
+AC_PROG_CC
+
+dnl Checks for libraries
+if test "$disable_libcheck" != "yes"
+then
+AC_CHECK_LIB(ibverbs, ibv_get_device_list, [],
+    AC_MSG_ERROR([ibv_get_device_list() not found.  libdapl requires libibverbs.]))
+fi
+
+dnl Checks for header files.
+if test "$disable_libcheck" != "yes"
+then
+AC_CHECK_HEADER(infiniband/verbs.h, [],
+    AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
+fi
+
+AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
+    if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
+        ac_cv_version_script=yes
+    else
+        ac_cv_version_script=no
+    fi)
+AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
+
+dnl Support debug mode build - if enable-debug provided the DEBUG variable is set 
+AC_ARG_ENABLE(debug,
+[  --enable-debug Turn on debug mode, default=off],
+[case "${enableval}" in
+  yes) debug=true ;;
+  no)  debug=false ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+esac],[debug=false])
+AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
+
+dnl Support ib_extension build - if enable-ext-type == ib 
+AC_ARG_ENABLE(ext-type,
+[  --enable-ext-type Enable extensions support for library: ib, none, default=ib],
+ [ if   test "x$enableval" = "xib" ; then
+      ext_type=ib
+   elif test "x$enableval" = "xnone" ; then
+      ext_type=none
+   else
+      echo
+      echo "Error!"
+      echo "Unknown extension type' type"
+      exit -1
+   fi
+ ],[ext_type=ib])
+AM_CONDITIONAL(EXT_TYPE_IB, test "$ext_type" = "ib")
+
+dnl Check for Redhat EL release 4
+AC_CACHE_CHECK(Check for RHEL4 system, ac_cv_rhel4,
+    if test -f /etc/redhat-release &&
+       test -n "`grep -e "release 4" /etc/redhat-release`"; then
+        ac_cv_rhel4=yes
+    else
+        ac_cv_rhel4=no
+    fi)
+AM_CONDITIONAL(OS_RHEL4, test "$ac_cv_rhel4" = "yes")
+
+dnl Check for Redhat EL release 5
+AC_CACHE_CHECK(Check for RHEL5 system, ac_cv_rhel5,
+    if test -f /etc/redhat-release &&
+       test -n "`grep -e "release 5" /etc/redhat-release`"; then
+        ac_cv_rhel5=yes
+    else
+        ac_cv_rhel5=no
+    fi)
+AM_CONDITIONAL(OS_RHEL5, test "$ac_cv_rhel5" = "yes")
+
+dnl Check for SuSE release 11
+AC_CACHE_CHECK(Check for SUSE_11 system, ac_cv_suse11,
+    if test -f /etc/SuSE-release &&
+       test -n "`grep -e "VERSION = 11" /etc/SuSE-release`"; then
+        ac_cv_suse11=yes
+    else
+        ac_cv_suse11=no
+    fi)
+AM_CONDITIONAL(OS_SUSE11, test "$ac_cv_suse11" = "yes")
+
+AC_CONFIG_FILES([Makefile test/dtest/Makefile test/dapltest/Makefile dapl.spec])
+
+AC_OUTPUT
diff --git a/dapl.spec b/dapl.spec
new file mode 100644
index 0000000..8d38a67
--- /dev/null
+++ b/dapl.spec
@@ -0,0 +1,183 @@
+# Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+# Copyright (c) 2007, Intel Corporation. All rights reserved.
+#
+# This Software is licensed under one of the following licenses:
+#
+# 1) under the terms of the "Common Public License 1.0" a copy of which is
+#    in the file LICENSE.txt in the root directory. The license is also
+#    available from the Open Source Initiative, see
+#    http://www.opensource.org/licenses/cpl.php.
+#
+# 2) under the terms of the "The BSD License" a copy of which is in the file
+#    LICENSE2.txt in the root directory. The license is also available from
+#    the Open Source Initiative, see
+#    http://www.opensource.org/licenses/bsd-license.php.
+#
+# 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+#    copy of which is in the file LICENSE3.txt in the root directory. The 
+#    license is also available from the Open Source Initiative, see
+#    http://www.opensource.org/licenses/gpl-license.php.
+#
+# Licensee has the right to choose one of the above licenses.
+#
+# Redistributions of source code must retain the above copyright
+# notice and one of the license notices.
+#
+# Redistributions in binary form must reproduce both the above copyright
+# notice, one of the license notices in the documentation
+# and/or other materials provided with the distribution.
+#
+#
+# uDAT and uDAPL 2.0 Registry RPM SPEC file
+#
+# $Id: $
+Name: dapl
+Version: 2.0.15
+Release: 1%{?dist}
+Summary: A Library for userspace access to RDMA devices using OS Agnostic DAT APIs.
+
+Group: System Environment/Libraries
+License: Dual GPL/BSD/CPL
+Url: http://openfabrics.org/
+Source: http://www.openfabrics.org/downloads/%{name}/%{name}-%{version}.tar.gz
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+Along with the OpenFabrics kernel drivers, libdat and libdapl provides a userspace
+RDMA API that supports DAT 2.0 specification and IB transport extensions for
+atomic operations and rdma write with immediate data.
+
+%package devel
+Summary: Development files for the libdat and libdapl libraries
+Group: System Environment/Libraries
+
+%description devel
+Header files for libdat and libdapl library.
+
+%package devel-static
+Summary: Static development files for libdat and libdapl library
+Group: System Environment/Libraries
+ 
+%description devel-static
+Static libraries for libdat and libdapl library.
+
+%package utils
+Summary: Test suites for uDAPL library
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description utils
+Useful test suites to validate uDAPL library API's.
+
+%prep
+%setup -q
+
+%build
+%configure --enable-ext-type=ib 
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+# remove unpackaged files from the buildroot
+rm -f %{buildroot}%{_libdir}/*.la
+rm -f %{buildroot}%{_sysconfdir}/*.conf
+
+%clean
+rm -rf %{buildroot}
+
+%post 
+/sbin/ldconfig
+if [ -e %{_sysconfdir}/dat.conf ]; then
+    sed -e '/ofa-v2-.* u2/d' < %{_sysconfdir}/dat.conf > /tmp/$$ofadapl
+    mv /tmp/$$ofadapl %{_sysconfdir}/dat.conf
+fi
+echo ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib0 0" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ib1 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib1 0" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mthca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mthca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 2" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mlx4_0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mlx4_0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 2" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ipath0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ipath0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 2" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ehca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ehca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-iwarp u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"eth2 0" ""' >> %{_sysconfdir}/dat.conf
+
+%postun 
+/sbin/ldconfig
+if [ -e %{_sysconfdir}/dat.conf ]; then
+    sed -e '/ofa-v2-.* u2/d' < %{_sysconfdir}/dat.conf > /tmp/$$ofadapl
+    mv /tmp/$$ofadapl %{_sysconfdir}/dat.conf
+fi
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libda*.so.*
+%doc AUTHORS README ChangeLog
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/*.so
+%dir %{_includedir}/dat2
+%{_includedir}/dat2/*
+
+%files devel-static
+%defattr(-,root,root,-)
+%{_libdir}/*.a
+
+%files utils
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_mandir}/man1/*.1*
+%{_mandir}/man5/*.5*
+
+%changelog
+* Fri Nov 07 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.15
+- DAT/DAPL Version 2.0.15 Release 1, OFED 1.4 GA
+
+* Fri Oct 03 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.14
+- DAT/DAPL Version 2.0.14 Release 1, OFED 1.4 rc3
+
+* Mon Sep 01 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.13
+- DAT/DAPL Version 2.0.13 Release 1, OFED 1.4 rc1
+
+* Thu Aug 21 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.12
+- DAT/DAPL Version 2.0.12 Release 1, OFED 1.4 beta
+
+* Sun Jul 20 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.11
+- DAT/DAPL Version 2.0.11 Release 1, IB UD extensions in SCM provider 
+
+* Tue Jun 23 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.10
+- DAT/DAPL Version 2.0.10 Release 1, socket CM provider 
+
+* Tue May 20 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.9
+- DAT/DAPL Version 2.0.9 Release 1, OFED 1.3.1 GA  
+
+* Thu May 1 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.8
+- DAT/DAPL Version 2.0.8 Release 1, OFED 1.3.1  
+
+* Thu Feb 14 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.7
+- DAT/DAPL Version 2.0.7 Release 1, OFED 1.3 GA 
+
+* Mon Feb 04 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.6
+- DAT/DAPL Version 2.0.6 Release 1, OFED 1.3 RC4
+
+* Tue Jan 29 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.5
+- DAT/DAPL Version 2.0.5 Release 1, OFED 1.3 RC3
+
+* Thu Jan 17 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.4
+- DAT/DAPL Version 2.0.4 Release 1, OFED 1.3 RC2
+
+* Tue Nov 20 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.3
+- DAT/DAPL Version 2.0.3 Release 1
+
+* Tue Oct 30 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.2
+- DAT/DAPL Version 2.0.2 Release 1
+
+* Tue Sep 18 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.1-1
+- OFED 1.3-alpha, co-exist with DAT 1.2 library package.  
+
+* Wed Mar 7 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.0.pre
+- Initial release of DAT 2.0 APIs, includes IB extensions 
diff --git a/dapl.spec.in b/dapl.spec.in
new file mode 100644
index 0000000..432785b
--- /dev/null
+++ b/dapl.spec.in
@@ -0,0 +1,197 @@
+# Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+# Copyright (c) 2007, Intel Corporation. All rights reserved.
+#
+# This Software is licensed under one of the following licenses:
+#
+# 1) under the terms of the "Common Public License 1.0" a copy of which is
+#    in the file LICENSE.txt in the root directory. The license is also
+#    available from the Open Source Initiative, see
+#    http://www.opensource.org/licenses/cpl.php.
+#
+# 2) under the terms of the "The BSD License" a copy of which is in the file
+#    LICENSE2.txt in the root directory. The license is also available from
+#    the Open Source Initiative, see
+#    http://www.opensource.org/licenses/bsd-license.php.
+#
+# 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+#    copy of which is in the file LICENSE3.txt in the root directory. The 
+#    license is also available from the Open Source Initiative, see
+#    http://www.opensource.org/licenses/gpl-license.php.
+#
+# Licensee has the right to choose one of the above licenses.
+#
+# Redistributions of source code must retain the above copyright
+# notice and one of the license notices.
+#
+# Redistributions in binary form must reproduce both the above copyright
+# notice, one of the license notices in the documentation
+# and/or other materials provided with the distribution.
+#
+#
+# uDAT and uDAPL 2.0 Registry RPM SPEC file
+#
+# $Id: $
+Name: dapl
+Version: @VERSION@
+Release: 1%{?dist}
+Summary: A Library for userspace access to RDMA devices using OS Agnostic DAT APIs.
+
+Group: System Environment/Libraries
+License: Dual GPL/BSD/CPL
+Url: http://openfabrics.org/
+Source: http://www.openfabrics.org/downloads/%{name}/%{name}-%{version}.tar.gz
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+Requires(post): sed
+Requires(post): coreutils
+
+%description
+Along with the OpenFabrics kernel drivers, libdat and libdapl provides a userspace
+RDMA API that supports DAT 2.0 specification and IB transport extensions for
+atomic operations and rdma write with immediate data.
+
+%package devel
+Summary: Development files for the libdat and libdapl libraries
+Group: System Environment/Libraries
+
+%description devel
+Header files for libdat and libdapl library.
+
+%package devel-static
+Summary: Static development files for libdat and libdapl library
+Group: System Environment/Libraries
+ 
+%description devel-static
+Static libraries for libdat and libdapl library.
+
+%package utils
+Summary: Test suites for uDAPL library
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description utils
+Useful test suites to validate uDAPL library API's.
+
+%prep
+%setup -q
+
+%build
+%configure --enable-ext-type=ib 
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+# remove unpackaged files from the buildroot
+rm -f %{buildroot}%{_libdir}/*.la
+rm -f %{buildroot}%{_sysconfdir}/*.conf
+
+%clean
+rm -rf %{buildroot}
+
+%post 
+/sbin/ldconfig
+if [ -e %{_sysconfdir}/dat.conf ]; then
+    sed -e '/ofa-v2-.* u2/d' < %{_sysconfdir}/dat.conf > /tmp/$$ofadapl
+    mv /tmp/$$ofadapl %{_sysconfdir}/dat.conf
+fi
+echo ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib0 0" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ib1 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"ib1 0" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mthca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mthca0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mthca0 2" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mlx4_0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-mlx4_0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"mlx4_0 2" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ipath0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ipath0-2 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ipath0 2" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-ehca0-1 u2.0 nonthreadsafe default libdaploscm.so.2 dapl.2.0 '"ehca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo ofa-v2-iwarp u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 '"eth2 0" ""' >> %{_sysconfdir}/dat.conf
+
+%postun 
+/sbin/ldconfig
+if [ -e %{_sysconfdir}/dat.conf ]; then
+    sed -e '/ofa-v2-.* u2/d' < %{_sysconfdir}/dat.conf > /tmp/$$ofadapl
+    mv /tmp/$$ofadapl %{_sysconfdir}/dat.conf
+fi
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libda*.so.*
+%doc AUTHORS README ChangeLog
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/*.so
+%dir %{_includedir}/dat2
+%{_includedir}/dat2/*
+
+%files devel-static
+%defattr(-,root,root,-)
+%{_libdir}/*.a
+
+%files utils
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_mandir}/man1/*.1*
+%{_mandir}/man5/*.5*
+
+%changelog
+* Thu Apr 30 2009 Arlin Davis <ardavis at ichips.intel.com> - 2.0.19
+- DAT/DAPL Version 2.0.19 Release 1, OFED 1.4.1 GA Final 
+
+* Fri Apr 17 2009 Arlin Davis <ardavis at ichips.intel.com> - 2.0.18
+- DAT/DAPL Version 2.0.18 Release 1, OFED 1.4.1 GA 
+
+* Tue Mar 31 2009 Arlin Davis <ardavis at ichips.intel.com> - 2.0.17
+- DAT/DAPL Version 2.0.17 Release 1, OFED 1.4.1 GA
+
+* Mon Mar 16 2009 Arlin Davis <ardavis at ichips.intel.com> - 2.0.16
+- DAT/DAPL Version 2.0.16 Release 1, OFED 1.4.1 
+
+* Fri Nov 07 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.15
+- DAT/DAPL Version 2.0.15 Release 1, OFED 1.4 GA
+
+* Fri Oct 03 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.14
+- DAT/DAPL Version 2.0.14 Release 1, OFED 1.4 rc3
+
+* Mon Sep 01 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.13
+- DAT/DAPL Version 2.0.13 Release 1, OFED 1.4 rc1
+
+* Thu Aug 21 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.12
+- DAT/DAPL Version 2.0.12 Release 1, OFED 1.4 beta
+
+* Sun Jul 20 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.11
+- DAT/DAPL Version 2.0.11 Release 1, IB UD extensions in SCM provider 
+
+* Tue Jun 23 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.10
+- DAT/DAPL Version 2.0.10 Release 1, socket CM provider 
+
+* Tue May 20 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.9
+- DAT/DAPL Version 2.0.9 Release 1, OFED 1.3.1 GA  
+
+* Thu May 1 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.8
+- DAT/DAPL Version 2.0.8 Release 1, OFED 1.3.1  
+
+* Thu Feb 14 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.7
+- DAT/DAPL Version 2.0.7 Release 1, OFED 1.3 GA 
+
+* Mon Feb 04 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.6
+- DAT/DAPL Version 2.0.6 Release 1, OFED 1.3 RC4
+
+* Tue Jan 29 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.5
+- DAT/DAPL Version 2.0.5 Release 1, OFED 1.3 RC3
+
+* Thu Jan 17 2008 Arlin Davis <ardavis at ichips.intel.com> - 2.0.4
+- DAT/DAPL Version 2.0.4 Release 1, OFED 1.3 RC2
+
+* Tue Nov 20 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.3
+- DAT/DAPL Version 2.0.3 Release 1
+
+* Tue Oct 30 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.2
+- DAT/DAPL Version 2.0.2 Release 1
+
+* Tue Sep 18 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.1-1
+- OFED 1.3-alpha, co-exist with DAT 1.2 library package.  
+
+* Wed Mar 7 2007 Arlin Davis <ardavis at ichips.intel.com> - 2.0.0.pre
+- Initial release of DAT 2.0 APIs, includes IB extensions 
diff --git a/dapl/common/dapl_adapter_util.h b/dapl/common/dapl_adapter_util.h
new file mode 100755
index 0000000..1a8b7cc
--- /dev/null
+++ b/dapl/common/dapl_adapter_util.h
@@ -0,0 +1,302 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_adapter_util.h
+ *
+ * PURPOSE: Utility defs & routines for the adapter data structure
+ *
+ * $Id: dapl_adapter_util.h 1317 2005-04-25 17:29:42Z jlentini $
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_ADAPTER_UTIL_H_
+#define _DAPL_ADAPTER_UTIL_H_
+
+
+typedef enum async_handler_type
+{
+    DAPL_ASYNC_UNAFILIATED,
+	DAPL_ASYNC_CQ_ERROR,
+	DAPL_ASYNC_CQ_COMPLETION,
+	DAPL_ASYNC_QP_ERROR
+} DAPL_ASYNC_HANDLER_TYPE;
+
+
+int dapls_ib_init (void);
+
+int dapls_ib_release (void);
+
+DAT_RETURN dapls_ib_enum_hcas (
+        IN   const char                 *vendor, 
+	OUT  DAPL_HCA_NAME		**hca_names,
+	OUT  DAT_COUNT			*total_hca_count);
+
+DAT_RETURN dapls_ib_get_instance_data(
+	IN  DAPL_HCA_NAME hca_name, 
+	OUT char *instance);
+
+DAT_RETURN dapls_ib_open_hca (
+	IN   char	               *namestr,
+	IN   DAPL_HCA		       *hca_ptr);
+
+DAT_RETURN dapls_ib_close_hca (
+	IN   DAPL_HCA		       *hca_ptr);
+
+DAT_RETURN dapls_ib_qp_alloc (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_EP			*ep_ptr,
+	IN  DAPL_EP			*ep_ctx_ptr);
+
+DAT_RETURN dapls_ib_qp_free (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_EP			*ep_ptr);
+
+DAT_RETURN dapls_ib_qp_modify (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_EP			*ep_ptr,
+	IN  DAT_EP_ATTR			*ep_attr);
+
+DAT_RETURN dapls_ib_connect (
+	IN  DAT_EP_HANDLE		ep_handle,
+	IN  DAT_IA_ADDRESS_PTR		remote_ia_address,
+	IN  DAT_CONN_QUAL		remote_conn_qual,
+	IN  DAT_COUNT			private_data_size,
+	IN  DAT_PVOID			private_data);
+
+DAT_RETURN dapls_ib_disconnect (
+	IN  DAPL_EP			*ep_ptr,
+	IN  DAT_CLOSE_FLAGS		close_flags);
+
+DAT_RETURN dapls_ib_setup_conn_listener (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAT_UINT64			ServiceID,
+	IN  DAPL_SP			*sp_ptr);
+
+DAT_RETURN dapls_ib_remove_conn_listener (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_SP			*sp_ptr);
+
+DAT_RETURN dapls_ib_accept_connection (
+	IN  DAT_CR_HANDLE		cr_handle,
+	IN  DAT_EP_HANDLE		ep_handle,
+	IN  DAT_COUNT			private_data_size,
+	IN  const DAT_PVOID		private_data);
+
+DAT_RETURN dapls_ib_reject_connection (
+	IN  dp_ib_cm_handle_t		cm_handle,
+	IN  int				reject_reason,
+	IN  DAT_COUNT			private_data_size,
+	IN  const DAT_PVOID		private_data);
+
+DAT_RETURN dapls_ib_setup_async_callback (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_ASYNC_HANDLER_TYPE	handler_type,
+	IN  DAPL_EVD			*evd_ptr,
+	IN  ib_async_handler_t		callback,
+	IN  void			*context);
+
+DAT_RETURN dapls_ib_cq_alloc (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_EVD			*evd_ptr,
+	IN  DAT_COUNT			*cqlen);
+
+DAT_RETURN dapls_ib_cq_free (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_EVD			*evd_ptr);
+
+DAT_RETURN dapls_set_cq_notify (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_EVD			*evd_ptr);
+
+DAT_RETURN dapls_ib_cq_resize (
+	IN  DAPL_IA			*ia_ptr,
+	IN  DAPL_EVD			*evd_ptr,
+	IN  DAT_COUNT			*cqlen);
+
+DAT_RETURN dapls_ib_pd_alloc (
+	IN  DAPL_IA 			*ia_ptr,
+	IN  DAPL_PZ 			*pz);
+
+DAT_RETURN dapls_ib_pd_free (
+	IN  DAPL_PZ	 		*pz);
+
+DAT_RETURN dapls_ib_mr_register (
+	IN  DAPL_IA 			*ia_ptr,
+        IN  DAPL_LMR			*lmr,
+	IN  DAT_PVOID			virt_addr,
+	IN  DAT_VLEN			length,
+	IN  DAT_MEM_PRIV_FLAGS		privileges,
+	IN  DAT_VA_TYPE			va_type);
+
+#if defined(__KDAPL__)
+DAT_RETURN dapls_ib_mr_register_physical (
+	IN  DAPL_IA                     *ia_ptr,
+	INOUT  DAPL_LMR                 *lmr,
+	IN  DAT_PADDR                   phys_addr,
+	IN  DAT_VLEN                    length,
+	IN  DAT_MEM_PRIV_FLAGS          privileges);
+#endif /* __KDAPL__ */
+
+DAT_RETURN dapls_ib_mr_deregister (
+	IN  DAPL_LMR			*lmr);
+
+DAT_RETURN dapls_ib_mr_register_shared (
+	IN  DAPL_IA 			*ia_ptr,
+        IN  DAPL_LMR			*lmr,
+	IN  DAT_MEM_PRIV_FLAGS		privileges,
+	IN  DAT_VA_TYPE			va_type);
+
+DAT_RETURN dapls_ib_mw_alloc (
+	IN  DAPL_RMR 			*rmr);
+
+DAT_RETURN dapls_ib_mw_free (
+	IN  DAPL_RMR			*rmr);
+
+DAT_RETURN dapls_ib_mw_bind (
+	IN  DAPL_RMR			*rmr,
+	IN  DAPL_LMR			*lmr,
+	IN  DAPL_EP			*ep,
+	IN  DAPL_COOKIE			*cookie,
+	IN  DAT_VADDR			virtual_address,
+	IN  DAT_VLEN			length,
+	IN  DAT_MEM_PRIV_FLAGS		mem_priv,
+	IN  DAT_BOOLEAN			is_signaled);
+
+DAT_RETURN dapls_ib_mw_unbind (
+	IN  DAPL_RMR			*rmr,
+	IN  DAPL_EP			*ep,
+	IN  DAPL_COOKIE			*cookie,
+	IN  DAT_BOOLEAN			is_signaled);
+
+DAT_RETURN dapls_ib_query_hca (
+	IN  DAPL_HCA			*hca_ptr,
+	OUT DAT_IA_ATTR	   		*ia_attr,
+	OUT DAT_EP_ATTR			*ep_attr,
+	OUT DAT_SOCK_ADDR6		*ip_addr);
+
+DAT_RETURN dapls_ib_completion_poll (
+	IN  DAPL_HCA			*hca_ptr,
+	IN  DAPL_EVD			*evd_ptr,
+	IN  ib_work_completion_t	*cqe_ptr);
+
+DAT_RETURN dapls_ib_completion_notify (
+	IN  ib_hca_handle_t		hca_handle,
+	IN  DAPL_EVD			*evd_ptr,
+	IN  ib_notification_type_t	type);
+
+DAT_DTO_COMPLETION_STATUS dapls_ib_get_dto_status (
+	IN  ib_work_completion_t	*cqe_ptr);
+
+void dapls_ib_reinit_ep (
+	IN  DAPL_EP			*ep_ptr);
+
+void dapls_ib_disconnect_clean (
+	IN  DAPL_EP			*ep_ptr,
+	IN  DAT_BOOLEAN			passive,
+	IN  const ib_cm_events_t	ib_cm_event);
+
+DAT_RETURN dapls_ib_get_async_event (
+	IN  ib_error_record_t		*cause_ptr,
+	OUT DAT_EVENT_NUMBER		*async_event);
+
+DAT_EVENT_NUMBER dapls_ib_get_dat_event (
+	IN  const ib_cm_events_t	ib_cm_event,
+	IN  DAT_BOOLEAN			active);
+
+ib_cm_events_t dapls_ib_get_cm_event (
+	IN  DAT_EVENT_NUMBER		dat_event_num);
+
+DAT_RETURN dapls_ib_cm_remote_addr (
+	IN  DAT_HANDLE			dat_handle,
+	OUT DAT_SOCK_ADDR6		*remote_ia_address);
+
+int dapls_ib_private_data_size (
+	IN  DAPL_PRIVATE		*prd_ptr,
+	IN  DAPL_PDATA_OP		conn_op,
+	IN  DAPL_HCA			*hca_ptr);
+
+void 
+dapls_query_provider_specific_attr(
+   	IN DAPL_IA			*ia_ptr,
+	IN DAT_PROVIDER_ATTR		*attr_ptr );
+
+#ifdef CQ_WAIT_OBJECT
+DAT_RETURN
+dapls_ib_wait_object_create (
+	IN DAPL_EVD			*evd_ptr,
+	IN ib_wait_obj_handle_t		*p_cq_wait_obj_handle);
+
+DAT_RETURN
+dapls_ib_wait_object_destroy (
+	IN ib_wait_obj_handle_t		cq_wait_obj_handle);
+
+DAT_RETURN
+dapls_ib_wait_object_wakeup (
+	IN ib_wait_obj_handle_t		cq_wait_obj_handle);
+
+DAT_RETURN
+dapls_ib_wait_object_wait (
+	IN ib_wait_obj_handle_t		cq_wait_obj_handle,
+	IN uint32_t 			timeout);
+#endif
+
+#ifdef DAT_EXTENSIONS
+void
+dapls_cqe_to_event_extension(
+	IN DAPL_EP			*ep_ptr,
+	IN DAPL_COOKIE			*cookie,
+	IN ib_work_completion_t		*cqe_ptr,
+	IN DAT_EVENT			*event_ptr);
+#endif
+
+/*
+ * Values for provider DAT_NAMED_ATTR
+ */
+#define IB_QP_STATE		1	/* QP state change request */
+
+
+#ifdef	IBAPI
+#include "dapl_ibapi_dto.h"
+#elif VAPI
+#include "dapl_vapi_dto.h"
+#elif __OPENIB__
+#include "dapl_openib_dto.h"
+#elif DUMMY
+#include "dapl_dummy_dto.h"
+#elif OPENIB
+#include "dapl_ib_dto.h"
+#else
+#include "dapl_ibal_dto.h"
+#endif
+
+
+#endif	/*  _DAPL_ADAPTER_UTIL_H_ */
diff --git a/dapl/common/dapl_cno_util.c b/dapl/common/dapl_cno_util.c
new file mode 100755
index 0000000..2215f29
--- /dev/null
+++ b/dapl/common/dapl_cno_util.c
@@ -0,0 +1,313 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_cno_util.c
+ *
+ * PURPOSE: Manage CNO Info structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_ia_util.h"
+#include "dapl_cno_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_cno_alloc
+ *
+ * alloc and initialize an EVD struct
+ *
+ * Input:
+ *	ia
+ *
+ * Returns:
+ *	cno_ptr, or null on failure.
+ */
+#if defined(__KDAPL__)
+DAPL_CNO *dapl_cno_alloc(IN DAPL_IA * ia_ptr,
+			 IN const DAT_UPCALL_OBJECT * upcall)
+#else
+DAPL_CNO *dapl_cno_alloc(IN DAPL_IA * ia_ptr,
+			 IN DAT_OS_WAIT_PROXY_AGENT wait_agent)
+#endif				/* defined(__KDAPL__) */
+{
+	DAPL_CNO *cno_ptr;
+
+	cno_ptr = (DAPL_CNO *) dapl_os_alloc(sizeof(DAPL_CNO));
+	if (!cno_ptr) {
+		return NULL;
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(cno_ptr, sizeof(DAPL_CNO));
+
+	/*
+	 * Initialize the header.
+	 */
+	cno_ptr->header.provider = ia_ptr->header.provider;
+	cno_ptr->header.magic = DAPL_MAGIC_CNO;
+#if !defined(__KDAPL__)
+	cno_ptr->header.handle_type = DAT_HANDLE_TYPE_CNO;
+#endif				/* defined(__KDAPL__) */
+	cno_ptr->header.owner_ia = ia_ptr;
+	cno_ptr->header.user_context.as_64 = 0;
+	cno_ptr->header.user_context.as_ptr = NULL;
+	dapl_llist_init_entry(&cno_ptr->header.ia_list_entry);
+	dapl_os_lock_init(&cno_ptr->header.lock);
+
+	/*
+	 * Initialize the body
+	 */
+	cno_ptr->cno_waiters = 0;
+	dapl_os_atomic_set(&cno_ptr->cno_ref_count, 0);
+	cno_ptr->cno_state = DAPL_CNO_STATE_UNTRIGGERED;
+	cno_ptr->cno_evd_triggered = NULL;
+#if defined(__KDAPL__)
+	cno_ptr->cno_upcall = *upcall;
+#else
+	cno_ptr->cno_wait_agent = wait_agent;
+#endif				/* defined(__KDAPL__) */
+	dapl_os_wait_object_init(&cno_ptr->cno_wait_object);
+
+	return cno_ptr;
+}
+
+/*
+ * dapl_cno_dealloc
+ *
+ * Free the passed in CNO structure.
+ *
+ * Input:
+ * 	cno_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_cno_dealloc(IN DAPL_CNO * cno_ptr)
+{
+	dapl_os_assert(cno_ptr->header.magic == DAPL_MAGIC_CNO);
+	dapl_os_assert(dapl_os_atomic_read(&cno_ptr->cno_ref_count) == 0);
+
+	/*
+	 * deinitialize the header
+	 */
+	cno_ptr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+
+	dapl_os_wait_object_destroy(&cno_ptr->cno_wait_object);
+	dapl_os_free(cno_ptr, sizeof(DAPL_CNO));
+}
+
+/*
+ * dapl_internal_cno_trigger
+ *
+ * DAPL Internal routine to trigger the specified CNO.
+ * Called by the callback of some EVD associated with the CNO.
+ *
+ *
+ *
+ * Input:
+ *	cno_ptr
+ *	evd_ptr		EVD triggering
+ *
+ * Output:
+ *	None
+ *
+ * Returns:
+ *	None
+ */
+void dapl_internal_cno_trigger(IN DAPL_CNO * cno_ptr, IN DAPL_EVD * evd_ptr)
+{
+	DAT_RETURN dat_status;
+#if defined(__KDAPL__)
+	DAT_EVENT event;
+#endif				/* defined(__KDAPL__) */
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_os_assert(cno_ptr->header.magic == DAPL_MAGIC_CNO);
+	/* The spec allows NULL EVDs. kDAPL doesn't have CNOs, they
+	 * are strictly used behind the scenes
+	 */
+	dapl_os_assert(evd_ptr == NULL
+		       || evd_ptr->header.magic == DAPL_MAGIC_EVD);
+
+	dapl_os_lock(&cno_ptr->header.lock);
+
+	/* Maybe I should just return, but this really shouldn't happen.  */
+	dapl_os_assert(cno_ptr->cno_state != DAPL_CNO_STATE_DEAD);
+
+	if (cno_ptr->cno_state == DAPL_CNO_STATE_UNTRIGGERED) {
+#if !defined(__KDAPL__)
+		DAT_OS_WAIT_PROXY_AGENT agent;
+
+		/* Squirrel away wait agent, and delete link.  */
+		agent = cno_ptr->cno_wait_agent;
+#endif				/* !defined(__KDAPL__) */
+
+		/* Separate assignments for windows compiler.  */
+#ifndef _WIN32
+#if defined(__KDAPL__)
+		cno_ptr->cno_upcall = DAT_UPCALL_NULL;
+#else
+		cno_ptr->cno_wait_agent = DAT_OS_WAIT_PROXY_AGENT_NULL;
+#endif				/* defined(__KDAPL__) */
+#else
+		cno_ptr->cno_wait_agent.instance_data = NULL;
+		cno_ptr->cno_wait_agent.proxy_agent_func = NULL;
+#endif
+
+		cno_ptr->cno_evd_triggered = evd_ptr;
+
+		/*
+		 * Must set to triggerred and let waiter untrigger to handle
+		 * timeout of waiter.
+		 */
+		cno_ptr->cno_state = DAPL_CNO_STATE_TRIGGERED;
+		if (cno_ptr->cno_waiters > 0) {
+			dapl_os_wait_object_wakeup(&cno_ptr->cno_wait_object);
+		}
+
+		dapl_os_unlock(&cno_ptr->header.lock);
+
+		/* Trigger the OS proxy wait agent, if one exists.  */
+#if defined(__KDAPL__)
+		dat_status = dapl_evd_dequeue((DAT_EVD_HANDLE) evd_ptr, &event);
+		while (dat_status == DAT_SUCCESS) {
+			if (cno_ptr->cno_upcall.upcall_func !=
+			    (DAT_UPCALL_FUNC) NULL) {
+				cno_ptr->cno_upcall.upcall_func(cno_ptr->
+								cno_upcall.
+								instance_data,
+								&event,
+								DAT_FALSE);
+			}
+			dat_status = dapl_evd_dequeue((DAT_EVD_HANDLE) evd_ptr,
+						      &event);
+		}
+#else
+		if (agent.proxy_agent_func != (DAT_AGENT_FUNC) NULL) {
+			agent.proxy_agent_func(agent.instance_data,
+					       (DAT_EVD_HANDLE) evd_ptr);
+		}
+#endif				/* defined(__KDAPL__) */
+	} else {
+		dapl_os_unlock(&cno_ptr->header.lock);
+#if defined(__KDAPL__)
+		dat_status = dapl_evd_dequeue((DAT_EVD_HANDLE) evd_ptr, &event);
+		while (dat_status == DAT_SUCCESS) {
+			if (cno_ptr->cno_upcall.upcall_func !=
+			    (DAT_UPCALL_FUNC) NULL) {
+				cno_ptr->cno_upcall.upcall_func(cno_ptr->
+								cno_upcall.
+								instance_data,
+								&event,
+								DAT_FALSE);
+			}
+			dat_status = dapl_evd_dequeue((DAT_EVD_HANDLE) evd_ptr,
+						      &event);
+		}
+#endif				/* defined(__KDAPL__) */
+	}
+
+	return;
+}
+
+/*
+ * dapl_cno_fd_create
+ *
+ * DAPL Requirements Version 2.0, 6.3.2.x
+ *
+ * creates a CNO instance. Upon creation, there are no
+ * Event Dispatchers feeding it. os_fd is a File Descriptor in Unix, 
+ * i.e. struct pollfd or an equivalent object in other OSes that is 
+ * always associates with the created CNO. Consumer can multiplex event 
+ * waiting using UNIX poll or select functions. Upon creation, the CNO 
+ * is not associated with any EVDs, has no waiters and has the os_fd 
+ * associated with it.
+ *
+ * Input:
+ *	ia_handle
+ *
+ * Output:
+ *	file descripter
+ *	cno_handle
+ * 
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_STATE
+ *	DAT_LENGTH_ERROR
+ *	DAT_PROTECTION_VIOLATION
+ *	DAT_PRIVILEGES_VIOLATION
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API dapl_cno_fd_create(IN DAT_IA_HANDLE ia_handle,	/* ia_handle            */
+				      OUT DAT_FD * fd,	/* file_descriptor      */
+				      OUT DAT_CNO_HANDLE * cno_handle)
+{				/* cno_handle           */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * dapl_cno_fd_create
+ *
+ * DAPL Requirements Version 2.0, 6.3.2.x
+ *
+ * Returns the latest EVD that triggered the CNO.
+ * 
+ * Input:
+ *	cno_handle
+ *
+ * Output:
+ *	evd_handle
+ * 
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_cno_trigger(IN DAT_CNO_HANDLE cno_handle, OUT DAT_EVD_HANDLE * evd_handle)
+{
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_cno_util.h b/dapl/common/dapl_cno_util.h
new file mode 100755
index 0000000..1cd601f
--- /dev/null
+++ b/dapl/common/dapl_cno_util.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_cno_util.h
+ *
+ * PURPOSE: Utility defs & routines for the cno data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_CNO_UTIL_H_
+#define _DAPL_CNO_UTIL_H_
+
+#include "dapl.h"
+
+#if defined(__KDAPL__)
+DAPL_CNO *
+dapl_cno_alloc (
+    IN DAPL_IA				*ia_ptr,
+    IN const DAT_UPCALL_OBJECT		*upcall) ;
+
+#else
+DAPL_CNO *
+dapl_cno_alloc (
+    IN DAPL_IA				*ia_ptr,
+    IN DAT_OS_WAIT_PROXY_AGENT		wait_agent) ;
+
+#endif	/* defined(__KDAPL__) */
+
+void
+dapl_cno_dealloc (
+    IN DAPL_CNO *cno_ptr) ;
+
+void
+dapl_internal_cno_trigger(
+    IN DAPL_CNO		*cno_ptr,
+    IN DAPL_EVD		*evd_ptr);
+
+#endif
diff --git a/dapl/common/dapl_cookie.c b/dapl/common/dapl_cookie.c
new file mode 100644
index 0000000..990ff66
--- /dev/null
+++ b/dapl/common/dapl_cookie.c
@@ -0,0 +1,360 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cookie.c
+ *
+ * PURPOSE: Manage CQE cookie structures
+ *
+ * The DAPL spec requires that all a cookies passed to a posting operation 
+ * be returned in the operation's corresponding completion. 
+ * 
+ * Implementing this feature is complicated by the user's ability to 
+ * suppress event generation for specific operations. When these operations 
+ * complete successfully, the provider does not have an easy way to 
+ * deallocate resources devoted to storing context data for these operations.
+ *
+ * To support this feature, a pool of memory is allocated up front large 
+ * enough to hold cookie data for the maximum number of operations possible 
+ * on an endpoint. 
+ *
+ * Two pieces of information are maintained to manage cookie allocation:
+ *
+ * head index : index of next unallocated cookie 
+ * tail index : index of last unallocated cookie
+ *
+ * Each cookie store its index in this memory pool.
+ *
+ * When an event is received, the index stored in the event's cookie will be 
+ * used to update the tail. This will implicitly deallocate all of the cookies 
+ * "between" the old tail and the new tail.
+ *
+ * The implementation relies on the following assumptions:
+ *
+ * - there can be only 1 thread in dat_ep_post_send(), dat_ep_post_rdma_write(),
+ *   dat_ep_post_rdma_read(), or dat_rmr_bind() at a time, therefore 
+ *   dapls_cb_get() does not need to be thread safe when manipulating
+ *   request data structures.
+ *
+ * - there can be only 1 thread in dat_ep_post_recv(), therefore 
+ *   dapls_cb_get() does not need to be thread safe when manipulating
+ *   receive data structures.
+ *
+ * - there can be only 1 thread generating completions for a given EP's request 
+ *   opeartions, therefore dapls_cb_put() does not need to be thread safe when 
+ *   manipulating request data structures.
+ *
+ * - there can be only 1 thread generating completions for a given EP's receive 
+ *   opeartions therefore dapls_cb_put() does not need to be thread safe when 
+ *   manipulating receive data structures.
+ *
+ * - completions are delivered in order
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_cookie.h"
+#include "dapl_ring_buffer_util.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_RETURN dapls_cb_get(DAPL_COOKIE_BUFFER * buffer, DAPL_COOKIE ** cookie_ptr);
+
+DAT_RETURN dapls_cb_put(DAPL_COOKIE_BUFFER * buffer, DAPL_COOKIE * cookie);
+
+/*********************************************************************
+ *                                                                   *
+ * Function Definitions                                              *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * dapls_cb_create
+ *
+ * Given a DAPL_COOKIE_BUFFER, allocate and initialize memory for
+ * the data structure.
+ *
+ * Input:
+ *	buffer		pointer to DAPL_COOKIE_BUFFER
+ *	ep		endpoint to associate with cookies
+ *	size		number of elements to allocate & manage
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_cb_create(IN DAPL_COOKIE_BUFFER * buffer,
+		IN DAPL_EP * ep, IN DAT_COUNT size)
+{
+	DAT_COUNT i;
+
+	/*
+	 * allocate one additional entry so that the tail 
+	 * can always point at an empty location
+	 */
+	size++;
+
+	buffer->pool = dapl_os_alloc(size * sizeof(DAPL_COOKIE));
+	if (NULL != buffer->pool) {
+		buffer->pool_size = size;
+		dapl_os_atomic_set(&buffer->head, 0);
+		dapl_os_atomic_set(&buffer->tail, 0);
+
+		for (i = 0; i < size; i++) {
+			buffer->pool[i].index = i;
+			buffer->pool[i].ep = ep;
+		}
+
+		return (DAT_SUCCESS);
+	} else {
+		return (DAT_INSUFFICIENT_RESOURCES);
+	}
+}
+
+/*
+ * dapls_cb_free
+ *
+ * Free the data structure
+ *
+ * Input:
+ *	buffer		pointer to DAPL_COOKIE_BUFFER
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	none
+ *
+ */
+void dapls_cb_free(IN DAPL_COOKIE_BUFFER * buffer)
+{
+	if (NULL != buffer->pool) {
+		dapl_os_free(buffer->pool,
+			     buffer->pool_size * sizeof(DAPL_COOKIE));
+		buffer->pool = NULL;
+	}
+}
+
+/*
+ * dapls_cb_get
+ *
+ * Remove an entry from the buffer
+ *
+ * Input:
+ *	buffer		pointer to DAPL_COOKIE_BUFFER
+ *
+ * Output:
+ *      cookie_ptr 	pointer to pointer to cookie
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_cb_get(IN DAPL_COOKIE_BUFFER * buffer, OUT DAPL_COOKIE ** cookie_ptr)
+{
+	DAT_RETURN dat_status;
+	DAT_COUNT new_head;
+
+	dapl_os_assert(NULL != cookie_ptr);
+
+	new_head = (dapl_os_atomic_read(&buffer->head) + 1) % buffer->pool_size;
+
+	if (new_head == dapl_os_atomic_read(&buffer->tail)) {
+		dat_status = DAT_INSUFFICIENT_RESOURCES;
+		goto bail;
+	} else {
+		dapl_os_atomic_set(&buffer->head, new_head);
+		*cookie_ptr = &buffer->pool[dapl_os_atomic_read(&buffer->head)];
+		dat_status = DAT_SUCCESS;
+	}
+      bail:
+	return dat_status;
+}
+
+/*
+ * dapls_cb_put
+ *
+ * Add entry(s) to the buffer
+ *
+ * Input:
+ *	buffer		pointer to DAPL_COOKIE_BUFFER
+ *      cookie 		pointer to cookie
+ *
+ * Output:
+ *	entry		entry removed from the ring buffer
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_EMPTY
+ *
+ */
+DAT_RETURN dapls_cb_put(IN DAPL_COOKIE_BUFFER * buffer, IN DAPL_COOKIE * cookie)
+{
+	dapl_os_atomic_set(&buffer->tail, cookie->index);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_cb_pending
+ *
+ * snapshot of active entries on cookie ring buffer 
+ *
+ * Input:
+ *	buffer		pointer to DAPL_COOKIE_BUFFER
+ *
+ * Returns:
+ *	DAT_COUNT	number of active/pending cookies
+ *
+ */
+extern DAT_COUNT dapls_cb_pending(DAPL_COOKIE_BUFFER * buffer)
+{
+	DAT_COUNT head, tail;
+
+	head = dapl_os_atomic_read(&buffer->head);
+	tail = dapl_os_atomic_read(&buffer->tail);
+
+	if (head == tail)
+		return 0;
+	else if (head > tail)
+		return (head - tail);
+	else
+		return ((buffer->pool_size - tail) + head);
+}
+
+/*
+ * dapls_rmr_cookie_alloc
+ *
+ * Allocate an RMR Bind cookie
+ *
+ * Input:
+ *	buffer		pointer to DAPL_COOKIE_BUFFER
+ *      rmr 		rmr to associate with the cookie
+ *      user_cookie     user's cookie data 
+ *
+ * Output:
+ *	cookie_ptr	pointer to pointer to allocated cookie
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_EMPTY
+ *
+ */
+DAT_RETURN
+dapls_rmr_cookie_alloc(IN DAPL_COOKIE_BUFFER * buffer,
+		       IN DAPL_RMR * rmr,
+		       IN DAT_RMR_COOKIE user_cookie,
+		       OUT DAPL_COOKIE ** cookie_ptr)
+{
+	DAPL_COOKIE *cookie;
+	DAT_RETURN dat_status;
+
+	if (DAT_SUCCESS != dapls_cb_get(buffer, &cookie)) {
+		*cookie_ptr = NULL;
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_status = DAT_SUCCESS;
+	cookie->type = DAPL_COOKIE_TYPE_RMR;
+	cookie->val.rmr.rmr = rmr;
+	cookie->val.rmr.cookie = user_cookie;
+
+	*cookie_ptr = cookie;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * dapls_dto_cookie_alloc
+ *
+ * Allocate a DTO cookie
+ *
+ * Input:
+ *	buffer		pointer to DAPL_COOKIE_BUFFER
+ * 	type 		DTO type
+ *      user_cookie     user's cookie data 
+ *
+ * Output:
+ *	cookie_ptr	pointer to pointer to allocated cookie
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_EMPTY
+ *
+ */
+DAT_RETURN
+dapls_dto_cookie_alloc(IN DAPL_COOKIE_BUFFER * buffer,
+		       IN DAPL_DTO_TYPE type,
+		       IN DAT_DTO_COOKIE user_cookie,
+		       OUT DAPL_COOKIE ** cookie_ptr)
+{
+	DAPL_COOKIE *cookie;
+
+	if (DAT_SUCCESS != dapls_cb_get(buffer, &cookie)) {
+		*cookie_ptr = NULL;
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+	}
+
+	cookie->type = DAPL_COOKIE_TYPE_DTO;
+	cookie->val.dto.type = type;
+	cookie->val.dto.cookie = user_cookie;
+	cookie->val.dto.size = 0;
+
+	*cookie_ptr = cookie;
+	return DAT_SUCCESS;
+}
+
+void
+dapls_cookie_dealloc(IN DAPL_COOKIE_BUFFER * buffer, IN DAPL_COOKIE * cookie)
+{
+	dapls_cb_put(buffer, cookie);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_cookie.h b/dapl/common/dapl_cookie.h
new file mode 100644
index 0000000..f953b28
--- /dev/null
+++ b/dapl/common/dapl_cookie.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_cookie.h
+ *
+ * PURPOSE: Utility defs & routines for the cookie data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_COOKIE_H
+#define _DAPL_COOKIE_H_
+
+#include "dapl.h"
+
+extern DAT_RETURN 
+dapls_cb_create (
+    DAPL_COOKIE_BUFFER		*buffer,
+    DAPL_EP			*ep,
+    DAT_COUNT			size );
+
+extern void 
+dapls_cb_free (
+    DAPL_COOKIE_BUFFER		*buffer );
+
+extern DAT_COUNT 
+dapls_cb_pending (
+    DAPL_COOKIE_BUFFER		*buffer );
+
+extern DAT_RETURN
+dapls_rmr_cookie_alloc (
+    IN  DAPL_COOKIE_BUFFER	*buffer,
+    IN 	DAPL_RMR		*rmr,
+    IN 	DAT_RMR_COOKIE          user_cookie,
+    OUT DAPL_COOKIE 		**cookie_ptr );
+
+extern DAT_RETURN
+dapls_dto_cookie_alloc (
+    IN  DAPL_COOKIE_BUFFER	*buffer,
+    IN  DAPL_DTO_TYPE		type,
+    IN 	DAT_DTO_COOKIE	   	user_cookie,
+    OUT DAPL_COOKIE 		**cookie_ptr );
+
+extern void
+dapls_cookie_dealloc (
+    IN  DAPL_COOKIE_BUFFER	*buffer,
+    IN 	DAPL_COOKIE		*cookie );
+
+#endif /* _DAPL_COOKIE_H_ */
diff --git a/dapl/common/dapl_cr_accept.c b/dapl/common/dapl_cr_accept.c
new file mode 100644
index 0000000..76a841e
--- /dev/null
+++ b/dapl/common/dapl_cr_accept.c
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cr_accept.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_evd_util.h"
+
+/*
+ * dapl_cr_accept
+ *
+ * DAPL Requirements Version xxx, 6.4.2.1
+ *
+ * Establish a connection between active remote side requesting Endpoint
+ * and passic side local Endpoint.
+ *
+ * Input:
+ *	cr_handle
+ *	ep_handle
+ *	private_data_size
+ *	private_data
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_ATTRIBUTE
+ */
+DAT_RETURN DAT_API
+dapl_cr_accept(IN DAT_CR_HANDLE cr_handle,
+	       IN DAT_EP_HANDLE ep_handle,
+	       IN DAT_COUNT private_data_size, IN const DAT_PVOID private_data)
+{
+	DAPL_EP *ep_ptr;
+	DAT_RETURN dat_status;
+	DAPL_CR *cr_ptr;
+	DAT_EP_STATE entry_ep_state;
+	DAT_EP_HANDLE entry_ep_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_cr_accept (CR %p EP %p, PDsz %d PD %p)\n",
+		     cr_handle, ep_handle, private_data_size, private_data);
+
+	if (DAPL_BAD_HANDLE(cr_handle, DAPL_MAGIC_CR)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+		goto bail;
+	}
+
+	cr_ptr = (DAPL_CR *) cr_handle;
+
+	/*
+	 * Return an error if we have an ep_handle and the CR already has an
+	 * EP, indicating this is an RSP connection or PSP_PROVIDER_FLAG was
+	 * specified.
+	 */
+	if (ep_handle != NULL &&
+	    (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP) ||
+	     cr_ptr->param.local_ep_handle != NULL)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	/* Make sure we have an EP handle in one place or another */
+	if (ep_handle == NULL && cr_ptr->param.local_ep_handle == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	if ((0 != private_data_size) && (NULL == private_data)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+
+	/*
+	 * ep_handle is NULL if the user specified DAT_PSP_PROVIDER_FLAG
+	 * OR this is an RSP connection; retrieve it from the cr.
+	 */
+	if (ep_handle == NULL) {
+		ep_handle = cr_ptr->param.local_ep_handle;
+		if (((((DAPL_EP *) ep_handle)->param.ep_state !=
+		      DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING)
+		     && (((DAPL_EP *) ep_handle)->param.ep_state !=
+			 DAT_EP_STATE_PASSIVE_CONNECTION_PENDING))
+		    && (((DAPL_EP *) ep_handle)->param.ep_attr.service_type ==
+			DAT_SERVICE_TYPE_RC)) {
+			return DAT_INVALID_STATE;
+		}
+	} else {
+		/* ensure this EP isn't connected or in use */
+		if ((((DAPL_EP *) ep_handle)->param.ep_state !=
+		     DAT_EP_STATE_UNCONNECTED)
+		    && (((DAPL_EP *) ep_handle)->param.ep_attr.service_type ==
+			DAT_SERVICE_TYPE_RC)) {
+			return DAT_INVALID_STATE;
+		}
+	}
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Verify the attributes of the EP handle before we connect it. Test
+	 * all of the handles to make sure they are currently valid.
+	 * Specifically:
+	 *   pz_handle              required
+	 *   recv_evd_handle        optional, but must be valid
+	 *   request_evd_handle     optional, but must be valid
+	 *   connect_evd_handle     required
+	 * We do all verification and state change under lock, at which
+	 * point the EP state should protect us from most races.
+	 */
+	dapl_os_lock(&ep_ptr->header.lock);
+	if (ep_ptr->param.pz_handle == NULL
+	    || DAPL_BAD_HANDLE(ep_ptr->param.pz_handle, DAPL_MAGIC_PZ)
+	    /* test connect handle */
+	    || ep_ptr->param.connect_evd_handle == NULL
+	    || DAPL_BAD_HANDLE(ep_ptr->param.connect_evd_handle, DAPL_MAGIC_EVD)
+	    || !(((DAPL_EVD *) ep_ptr->param.connect_evd_handle)->
+		 evd_flags & DAT_EVD_CONNECTION_FLAG)
+	    /* test optional completion handles */
+	    || (ep_ptr->param.recv_evd_handle != DAT_HANDLE_NULL &&
+		(DAPL_BAD_HANDLE
+		 (ep_ptr->param.recv_evd_handle, DAPL_MAGIC_EVD)))
+
+	    || (ep_ptr->param.request_evd_handle != DAT_HANDLE_NULL &&
+		(DAPL_BAD_HANDLE
+		 (ep_ptr->param.request_evd_handle, DAPL_MAGIC_EVD)))) {
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	/* The qp must be attached by this point! */
+	if (ep_ptr->qp_state == DAPL_QP_STATE_UNATTACHED) {
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	entry_ep_state = ep_ptr->param.ep_state;
+	entry_ep_handle = cr_ptr->param.local_ep_handle;
+	ep_ptr->param.ep_state = DAT_EP_STATE_COMPLETION_PENDING;
+	ep_ptr->cm_handle = cr_ptr->ib_cm_handle;
+	ep_ptr->cr_ptr = cr_ptr;
+	ep_ptr->param.remote_ia_address_ptr =
+	    cr_ptr->param.remote_ia_address_ptr;
+	cr_ptr->param.local_ep_handle = ep_handle;
+
+	dapl_os_unlock(&ep_ptr->header.lock);
+
+	dat_status = dapls_ib_accept_connection(cr_handle,
+						ep_handle,
+						private_data_size,
+						private_data);
+
+	/*
+	 * If the provider failed, unwind the damage so we are back at
+	 * the initial state.
+	 */
+	if (dat_status != DAT_SUCCESS) {
+		if (DAT_GET_TYPE(dat_status) == DAT_INVALID_ADDRESS) {
+			/* The remote connection request has disappeared; timeout,
+			 * system error, app termination, perhaps other reasons.
+			 */
+			dat_status =
+			    dapls_evd_post_connection_event(ep_ptr->param.
+							    connect_evd_handle,
+							    DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR,
+							    (DAT_HANDLE) ep_ptr,
+							    0, 0);
+
+			cr_ptr->header.magic = DAPL_MAGIC_CR_DESTROYED;
+		} else {
+			ep_ptr->param.ep_state = entry_ep_state;
+			cr_ptr->param.local_ep_handle = entry_ep_handle;
+			ep_ptr->cr_ptr = NULL;
+			ep_ptr->param.remote_ia_address_ptr = NULL;
+		}
+
+		/*
+		 * After restoring values above, we now check if we need
+		 * to translate the error
+		 */
+		if (DAT_GET_TYPE(dat_status) == DAT_LENGTH_ERROR) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		}
+
+	} else {
+		/* Make this CR invalid. We need to hang on to it until
+		 * the connection terminates, but it's destroyed from
+		 * the app point of view.
+		 */
+		cr_ptr->header.magic = DAPL_MAGIC_CR_DESTROYED;
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_cr_callback.c b/dapl/common/dapl_cr_callback.c
new file mode 100644
index 0000000..2340489
--- /dev/null
+++ b/dapl/common/dapl_cr_callback.c
@@ -0,0 +1,549 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapls_cr_callback.c
+ *
+ * PURPOSE: implements passive side connection callbacks
+ *
+ * Description: Accepts asynchronous callbacks from the Communications Manager
+ *              for EVDs that have been specified as the connection_evd.
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_cr_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_sp_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * Prototypes
+ */
+DAT_RETURN dapli_connection_request(IN dp_ib_cm_handle_t ib_cm_handle,
+				    IN DAPL_SP * sp_ptr,
+				    IN DAPL_PRIVATE * prd_ptr,
+				    IN DAPL_EVD * evd_ptr);
+
+DAPL_EP *dapli_get_sp_ep(IN dp_ib_cm_handle_t ib_cm_handle,
+			 IN DAPL_SP * sp_ptr,
+			 IN DAT_EVENT_NUMBER dat_event_num);
+
+/*
+ * dapls_cr_callback
+ *
+ * The callback function registered with verbs for passive side of
+ * connection requests. The interface is specified by cm_api.h
+ *
+ *
+ * Input:
+ * 	ib_cm_handle,		Handle to CM
+ * 	ib_cm_event		Specific CM event
+ *	instant_data		Private data with DAT ADDRESS header
+ * 	context			SP pointer
+ *
+ * Output:
+ * 	None
+ *
+ */
+void dapls_cr_callback(IN dp_ib_cm_handle_t ib_cm_handle, IN const ib_cm_events_t ib_cm_event, IN const void *private_data_ptr,	/* event data */
+		       IN const void *context)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_EVD *evd_ptr;
+	DAPL_SP *sp_ptr;
+	DAPL_PRIVATE *prd_ptr;
+	DAT_EVENT_NUMBER dat_event_num;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM | DAPL_DBG_TYPE_CALLBACK,
+		     "--> dapl_cr_callback! context: %p event: %x cm_handle %p\n",
+		     context, ib_cm_event, (void *)ib_cm_handle);
+
+	/*
+	 * Passive side of the connection, context is a SP and
+	 * we need to look up the EP.
+	 */
+	sp_ptr = (DAPL_SP *) context;
+	/*
+	 * The context pointer could have been cleaned up in a racing
+	 * CM callback, check to see if we should just exit here
+	 */
+	if (sp_ptr->header.magic == DAPL_MAGIC_INVALID) {
+		return;
+	}
+	dapl_os_assert(sp_ptr->header.magic == DAPL_MAGIC_PSP ||
+		       sp_ptr->header.magic == DAPL_MAGIC_RSP);
+
+	/* Obtain the event number from the provider layer */
+	dat_event_num = dapls_ib_get_dat_event(ib_cm_event, DAT_FALSE);
+
+	/*
+	 * CONNECT_REQUEST events create an event on the PSP
+	 * EVD, which will trigger connection processing. The
+	 * sequence is:
+	 *    CONNECT_REQUEST         Event to SP
+	 *    CONNECTED               Event to EP
+	 *    DISCONNECT              Event to EP
+	 *
+	 * Obtain the EP if required and set an event up on the correct
+	 * EVD.
+	 */
+	if (dat_event_num == DAT_CONNECTION_REQUEST_EVENT) {
+		ep_ptr = NULL;
+		evd_ptr = sp_ptr->evd_handle;
+	} else {
+		/* see if there is an EP connected with this CM handle */
+		ep_ptr = dapli_get_sp_ep(ib_cm_handle, sp_ptr, dat_event_num);
+
+		/* if we lost a race with the CM just exit. */
+		if (ep_ptr == NULL) {
+			return;
+		}
+
+		evd_ptr = (DAPL_EVD *) ep_ptr->param.connect_evd_handle;
+		/* if something has happened to our EVD, bail. */
+		if (evd_ptr == NULL) {
+			return;
+		}
+	}
+
+	prd_ptr = (DAPL_PRIVATE *) private_data_ptr;
+
+	dat_status = DAT_INTERNAL_ERROR;	/* init to ERR */
+
+	switch (dat_event_num) {
+	case DAT_CONNECTION_REQUEST_EVENT:
+		{
+			/*
+			 * Requests arriving on a disabled SP are immediatly rejected
+			 */
+
+			dapl_os_lock(&sp_ptr->header.lock);
+			if (sp_ptr->listening == DAT_FALSE) {
+				dapl_os_unlock(&sp_ptr->header.lock);
+				dapl_dbg_log(DAPL_DBG_TYPE_CM,
+					     "---> dapls_cr_callback: conn event on down SP\n");
+				(void)dapls_ib_reject_connection(ib_cm_handle,
+								 DAT_CONNECTION_EVENT_UNREACHABLE,
+								 0, NULL);
+
+				return;
+			}
+
+			if (sp_ptr->header.handle_type == DAT_HANDLE_TYPE_RSP) {
+				/*
+				 * RSP connections only allow a single connection. Close
+				 * it down NOW so we reject any further connections.
+				 */
+				sp_ptr->listening = DAT_FALSE;
+			}
+			dapl_os_unlock(&sp_ptr->header.lock);
+
+			/*
+			 * Only occurs on the passive side of a connection
+			 * dapli_connection_request will post the connection
+			 * event if appropriate.
+			 */
+			dat_status = dapli_connection_request(ib_cm_handle,
+							      sp_ptr,
+							      prd_ptr, evd_ptr);
+			/* Set evd_ptr = NULL so we don't generate an event below */
+			evd_ptr = NULL;
+
+			break;
+		}
+	case DAT_CONNECTION_EVENT_ESTABLISHED:
+		{
+			/* This is just a notification the connection is now
+			 * established, there isn't any private data to deal with.
+			 *
+			 * Update the EP state and cache a copy of the cm handle,
+			 * then let the user know we are ready to go.
+			 */
+			dapl_os_lock(&ep_ptr->header.lock);
+			if (ep_ptr->header.magic != DAPL_MAGIC_EP ||
+			    ep_ptr->param.ep_state !=
+			    DAT_EP_STATE_COMPLETION_PENDING) {
+				/* If someone pulled the plug on the EP or connection,
+				 * just exit
+				 */
+				dapl_os_unlock(&ep_ptr->header.lock);
+				dat_status = DAT_SUCCESS;
+				/* Set evd_ptr = NULL so we don't generate an event below */
+				evd_ptr = NULL;
+
+				break;
+			}
+
+			ep_ptr->param.ep_state = DAT_EP_STATE_CONNECTED;
+			ep_ptr->cm_handle = ib_cm_handle;
+			dapl_os_unlock(&ep_ptr->header.lock);
+
+			break;
+		}
+	case DAT_CONNECTION_EVENT_DISCONNECTED:
+		{
+			/*
+			 * EP is now fully disconnected; initiate any post processing
+			 * to reset the underlying QP and get the EP ready for
+			 * another connection
+			 */
+			dapl_os_lock(&ep_ptr->header.lock);
+			if (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED) {
+				/* The disconnect has already occurred, we are now
+				 * cleaned up and ready to exit
+				 */
+				dapl_os_unlock(&ep_ptr->header.lock);
+				return;
+			}
+			ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+			dapls_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+						  ib_cm_event);
+			dapl_os_unlock(&ep_ptr->header.lock);
+
+			break;
+		}
+	case DAT_CONNECTION_EVENT_NON_PEER_REJECTED:
+	case DAT_CONNECTION_EVENT_PEER_REJECTED:
+	case DAT_CONNECTION_EVENT_UNREACHABLE:
+		{
+			/*
+			 * After posting an accept the requesting node has
+			 * stopped talking.
+			 */
+			dapl_os_lock(&ep_ptr->header.lock);
+			ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+			ep_ptr->cm_handle = IB_INVALID_HANDLE;
+			dapls_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+						  ib_cm_event);
+			dapl_os_unlock(&ep_ptr->header.lock);
+
+			break;
+		}
+	case DAT_CONNECTION_EVENT_BROKEN:
+		{
+			dapl_os_lock(&ep_ptr->header.lock);
+			ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+			dapls_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+						  ib_cm_event);
+			dapl_os_unlock(&ep_ptr->header.lock);
+
+			break;
+		}
+	default:
+		{
+			evd_ptr = NULL;
+			dapl_os_assert(0);	/* shouldn't happen */
+			break;
+		}
+	}
+
+	if (evd_ptr != NULL) {
+		dat_status = dapls_evd_post_connection_event(evd_ptr,
+							     dat_event_num,
+							     (DAT_HANDLE)
+							     ep_ptr, 0, NULL);
+	}
+
+	if (dat_status != DAT_SUCCESS) {
+		/* The event post failed; take appropriate action.  */
+		(void)dapls_ib_reject_connection(ib_cm_handle,
+						 DAT_CONNECTION_EVENT_BROKEN,
+						 0, NULL);
+
+		return;
+	}
+}
+
+/*
+ * dapli_connection_request
+ *
+ * Process a connection request on the Passive side of a connection.
+ * Create a CR record and link it on to the SP so we can update it
+ * and free it later. Create an EP if specified by the PSP flags.
+ *
+ * Input:
+ * 	ib_cm_handle,
+ * 	sp_ptr
+ * 	event_ptr
+ *	prd_ptr
+ *
+ * Output:
+ * 	None
+ *
+ * Returns
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_SUCCESS
+ *
+ */
+DAT_RETURN
+dapli_connection_request(IN dp_ib_cm_handle_t ib_cm_handle,
+			 IN DAPL_SP * sp_ptr,
+			 IN DAPL_PRIVATE * prd_ptr, IN DAPL_EVD * evd_ptr)
+{
+	DAT_RETURN dat_status;
+
+	DAPL_CR *cr_ptr;
+	DAPL_EP *ep_ptr;
+	DAPL_IA *ia_ptr;
+	DAT_SP_HANDLE sp_handle;
+
+	cr_ptr = dapls_cr_alloc(sp_ptr->header.owner_ia);
+	if (cr_ptr == NULL) {
+		/* Invoking function will call dapls_ib_cm_reject() */
+		return DAT_INSUFFICIENT_RESOURCES;
+	}
+
+	/*
+	 * Set up the CR
+	 */
+	cr_ptr->sp_ptr = sp_ptr;	/* maintain sp_ptr in case of reject */
+	cr_ptr->param.remote_port_qual = 0;
+	cr_ptr->ib_cm_handle = ib_cm_handle;
+#ifdef IBHOSTS_NAMING
+	/*
+	 * Special case: pull the remote HCA address from the private data
+	 * prefix. This is a spec violation as it introduces a protocol, but
+	 * some implementations may find it necessary for a time.
+	 */
+	cr_ptr->remote_ia_address = prd_ptr->hca_address;
+#endif				/* IBHOSTS_NAMING */
+	cr_ptr->param.remote_ia_address_ptr =
+	    (DAT_IA_ADDRESS_PTR) & cr_ptr->remote_ia_address;
+	/*
+	 * Copy the remote address and private data out of the private_data
+	 * payload and put them in a local structure
+	 */
+
+	/* Private data size will be determined by the provider layer */
+	cr_ptr->param.private_data = cr_ptr->private_data;
+	if (prd_ptr == NULL) {
+		cr_ptr->param.private_data_size = 0;
+	} else {
+		cr_ptr->param.private_data_size =
+		    dapls_ib_private_data_size(prd_ptr, DAPL_PDATA_CONN_REQ,
+					       sp_ptr->header.owner_ia->
+					       hca_ptr);
+	}
+	if (cr_ptr->param.private_data_size > 0) {
+		dapl_os_memcpy(cr_ptr->private_data,
+			       prd_ptr->private_data,
+			       DAPL_MIN(cr_ptr->param.private_data_size,
+					DAPL_MAX_PRIVATE_DATA_SIZE));
+	}
+
+	/* EP will be NULL unless RSP service point */
+	ep_ptr = (DAPL_EP *) sp_ptr->ep_handle;
+
+	if (sp_ptr->psp_flags == DAT_PSP_PROVIDER_FLAG) {
+		/*
+		 * Never true for RSP connections
+		 *
+		 * Create an EP for the user. If we can't allocate an
+		 * EP we are out of resources and need to tell the
+		 * requestor that we cant help them.
+		 */
+		ia_ptr = sp_ptr->header.owner_ia;
+		ep_ptr = dapl_ep_alloc(ia_ptr, NULL);
+		if (ep_ptr == NULL) {
+			dapls_cr_free(cr_ptr);
+			/* Invoking function will call dapls_ib_cm_reject() */
+			return DAT_INSUFFICIENT_RESOURCES;
+		}
+		ep_ptr->param.ia_handle = ia_ptr;
+		ep_ptr->param.local_ia_address_ptr =
+		    (DAT_IA_ADDRESS_PTR) & ia_ptr->hca_ptr->hca_address;
+
+		/* Link the EP onto the IA */
+		dapl_ia_link_ep(ia_ptr, ep_ptr);
+	}
+
+	cr_ptr->param.local_ep_handle = ep_ptr;
+
+	if (ep_ptr != NULL) {
+		/* Assign valid EP fields: RSP and PSP_PROVIDER_FLAG only */
+		if (sp_ptr->psp_flags == DAT_PSP_PROVIDER_FLAG) {
+			ep_ptr->param.ep_state =
+			    DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING;
+		} else {
+			/* RSP */
+			dapl_os_assert(sp_ptr->header.handle_type ==
+				       DAT_HANDLE_TYPE_RSP);
+			ep_ptr->param.ep_state =
+			    DAT_EP_STATE_PASSIVE_CONNECTION_PENDING;
+		}
+		ep_ptr->cm_handle = ib_cm_handle;
+	}
+
+	/* link the CR onto the SP so we can pick it up later */
+	dapl_sp_link_cr(sp_ptr, cr_ptr);
+
+	/* Post the event.  */
+	/* assign sp_ptr to union to avoid typecast errors from some compilers */
+	sp_handle.psp_handle = (DAT_PSP_HANDLE) sp_ptr;
+
+	dat_status = dapls_evd_post_cr_arrival_event(evd_ptr,
+						     DAT_CONNECTION_REQUEST_EVENT,
+						     sp_handle,
+						     (DAT_IA_ADDRESS_PTR)
+						     & sp_ptr->header.owner_ia->
+						     hca_ptr->hca_address,
+						     sp_ptr->conn_qual,
+						     (DAT_CR_HANDLE) cr_ptr);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapls_cr_free(cr_ptr);
+		(void)dapls_ib_reject_connection(ib_cm_handle,
+						 DAT_CONNECTION_EVENT_BROKEN,
+						 0, NULL);
+
+		/* Take the CR off the list, we can't use it */
+		dapl_os_lock(&sp_ptr->header.lock);
+		dapl_sp_remove_cr(sp_ptr, cr_ptr);
+		dapl_os_unlock(&sp_ptr->header.lock);
+		return DAT_INSUFFICIENT_RESOURCES;
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapli_get_sp_ep
+ *
+ * Passive side of a connection is now fully established. Clean
+ * up resources and obtain the EP pointer associated with a CR in
+ * the SP
+ *
+ * Input:
+ * 	ib_cm_handle,
+ * 	sp_ptr
+ *	connection_event
+ *
+ * Output:
+ *	none
+ *
+ * Returns
+ * 	ep_ptr
+ *
+ */
+DAPL_EP *dapli_get_sp_ep(IN dp_ib_cm_handle_t ib_cm_handle,
+			 IN DAPL_SP * sp_ptr, IN DAT_EVENT_NUMBER dat_event_num)
+{
+	DAPL_CR *cr_ptr;
+	DAPL_EP *ep_ptr;
+
+	/*
+	 * acquire the lock, we may be racing with other threads here
+	 */
+	dapl_os_lock(&sp_ptr->header.lock);
+
+	/* Verify under lock that the SP is still valid */
+	if (sp_ptr->header.magic == DAPL_MAGIC_INVALID) {
+		dapl_os_unlock(&sp_ptr->header.lock);
+		return NULL;
+	}
+	/*
+	 * There are potentially multiple connections in progress. Need to
+	 * go through the list and find the one we are interested
+	 * in. There is no guarantee of order. dapl_sp_search_cr
+	 * leaves the CR on the SP queue.
+	 */
+	cr_ptr = dapl_sp_search_cr(sp_ptr, ib_cm_handle);
+	if (cr_ptr == NULL) {
+		dapl_os_unlock(&sp_ptr->header.lock);
+		return NULL;
+	}
+
+	ep_ptr = (DAPL_EP *) cr_ptr->param.local_ep_handle;
+
+	/* Quick check to ensure our EP is still valid */
+	if ((DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP))) {
+		ep_ptr = NULL;
+	}
+
+	/* The CR record is discarded in all except for the CONNECTED case,
+	 * as it will have no further relevance.
+	 */
+	if (dat_event_num != DAT_CONNECTION_EVENT_ESTABLISHED) {
+		/* Remove the CR from the queue */
+		dapl_sp_remove_cr(sp_ptr, cr_ptr);
+
+		if (ep_ptr != NULL) {
+			ep_ptr->cr_ptr = NULL;
+		}
+
+		/*
+		 * If this SP has been removed from service, free it
+		 * up after the last CR is removed
+		 */
+		if (sp_ptr->listening != DAT_TRUE && sp_ptr->cr_list_count == 0
+		    && sp_ptr->state != DAPL_SP_STATE_FREE) {
+			dapl_dbg_log(DAPL_DBG_TYPE_CM,
+				     "--> dapli_get_sp_ep! disconnect dump sp: %p \n",
+				     sp_ptr);
+			/* Decrement the ref count on the EVD */
+			if (sp_ptr->evd_handle) {
+				dapl_os_atomic_dec(&
+						   ((DAPL_EVD *) sp_ptr->
+						    evd_handle)->evd_ref_count);
+				sp_ptr->evd_handle = NULL;
+			}
+			sp_ptr->state = DAPL_SP_STATE_FREE;
+			dapl_os_unlock(&sp_ptr->header.lock);
+			(void)dapls_ib_remove_conn_listener(sp_ptr->header.
+							    owner_ia, sp_ptr);
+			dapls_ia_unlink_sp((DAPL_IA *) sp_ptr->header.owner_ia,
+					   sp_ptr);
+			dapls_sp_free_sp(sp_ptr);
+			dapls_cr_free(cr_ptr);
+			goto skip_unlock;
+		}
+
+		dapl_os_unlock(&sp_ptr->header.lock);
+		/* free memory outside of the lock */
+		dapls_cr_free(cr_ptr);
+	} else {
+		dapl_os_unlock(&sp_ptr->header.lock);
+	}
+
+      skip_unlock:
+	return ep_ptr;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_cr_handoff.c b/dapl/common/dapl_cr_handoff.c
new file mode 100644
index 0000000..fe1b3b5
--- /dev/null
+++ b/dapl/common/dapl_cr_handoff.c
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cr_handoff.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_cr_handoff
+ *
+ * DAPL Requirements Version xxx, 6.4.2.4
+ *
+ * Hand the connection request to another Sevice pont specified by the
+ * Connectin Qualifier.
+ *
+ * Input:
+ *	cr_handle
+ *	cr_handoff
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_cr_handoff(IN DAT_CR_HANDLE cr_handle, IN DAT_CONN_QUAL cr_handoff)
+{				/* handoff */
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, 0);
+}
diff --git a/dapl/common/dapl_cr_query.c b/dapl/common/dapl_cr_query.c
new file mode 100644
index 0000000..7332639
--- /dev/null
+++ b/dapl/common/dapl_cr_query.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cr_query.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_cr_query
+ *
+ * DAPL Requirements Version xxx, 6.4.2.1
+ *
+ * Return Connection Request args
+ *
+ * Input:
+ *	cr_handle
+ *	cr_param_mask
+ *
+ * Output:
+ *	cr_param
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_HANDLE
+ */
+DAT_RETURN DAT_API
+dapl_cr_query(IN DAT_CR_HANDLE cr_handle,
+	      IN DAT_CR_PARAM_MASK cr_param_mask, OUT DAT_CR_PARAM * cr_param)
+{
+	DAPL_CR *cr_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_cr_query (%p, %x, %p)\n",
+		     cr_handle, cr_param_mask, cr_param);
+
+	dat_status = DAT_SUCCESS;
+	if (DAPL_BAD_HANDLE(cr_handle, DAPL_MAGIC_CR)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+		goto bail;
+	}
+
+	if (NULL == cr_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	cr_ptr = (DAPL_CR *) cr_handle;
+
+	/* obtain the remote IP address */
+	if (cr_param_mask & DAT_CR_FIELD_REMOTE_IA_ADDRESS_PTR) {
+		dat_status = dapls_ib_cm_remote_addr((DAT_HANDLE) cr_handle,
+						     &cr_ptr->
+						     remote_ia_address);
+	}
+
+	/* since the arguments are easily accessible, ignore the mask */
+	dapl_os_memcpy(cr_param, &cr_ptr->param, sizeof(DAT_CR_PARAM));
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_cr_reject.c b/dapl/common/dapl_cr_reject.c
new file mode 100755
index 0000000..edac95c
--- /dev/null
+++ b/dapl/common/dapl_cr_reject.c
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cr_reject.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_cr_util.h"
+#include "dapl_sp_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_cr_reject
+ *
+ * DAPL Requirements Version xxx, 6.4.2.2
+ *
+ * Reject a connection request from the active remote side requesting
+ * an Endpoint.
+ *
+ * Input:
+ *	cr_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API dapl_cr_reject(IN DAT_CR_HANDLE cr_handle,	/* cr_handle            */
+				  IN DAT_COUNT pdata_size,	/* private_data_size    */
+				  IN const DAT_PVOID pdata)
+{				/* private_data         */
+	DAPL_CR *cr_ptr;
+	DAPL_EP *ep_ptr;
+	DAT_EP_STATE entry_ep_state;
+	DAT_EP_HANDLE entry_ep_handle;
+	DAPL_SP *sp_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_cr_reject (%p)\n", cr_handle);
+
+	if (DAPL_BAD_HANDLE(cr_handle, DAPL_MAGIC_CR)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+		goto bail;
+	}
+
+	cr_ptr = (DAPL_CR *) cr_handle;
+
+	/*
+	 * Clean up provider created EP if there is one: only if
+	 * DAT_PSP_PROVIDER_FLAG was set on the PSP
+	 */
+	ep_ptr = (DAPL_EP *) cr_ptr->param.local_ep_handle;
+	entry_ep_handle = cr_ptr->param.local_ep_handle;
+	entry_ep_state = 0;
+	if (ep_ptr != NULL) {
+		entry_ep_state = ep_ptr->param.ep_state;
+		ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+		cr_ptr->param.local_ep_handle = NULL;
+	}
+
+	dat_status = dapls_ib_reject_connection(cr_ptr->ib_cm_handle,
+						IB_CM_REJ_REASON_CONSUMER_REJ,
+						pdata_size, pdata);
+
+	if (dat_status != DAT_SUCCESS) {
+		if (ep_ptr != NULL) {
+			/* Revert our state to the beginning */
+			ep_ptr->param.ep_state = entry_ep_state;
+			cr_ptr->param.local_ep_handle = entry_ep_handle;
+			cr_ptr->param.local_ep_handle = (DAT_EP_HANDLE) ep_ptr;
+		}
+	} else {
+		/* 
+		 * If this EP has been allocated by the provider, clean it up;
+		 * see DAT 1.1 spec, page 100, lines 3-4 (section 6.4.3.1.1.1).
+		 * RSP and user-provided EPs are in the control of the user.
+		 */
+		sp_ptr = cr_ptr->sp_ptr;
+		if (ep_ptr != NULL &&
+		    sp_ptr->psp_flags == DAT_PSP_PROVIDER_FLAG) {
+			(void)dapl_ep_free(ep_ptr);
+		}
+
+		/* Remove the CR from the queue, then free it */
+		dapl_os_lock(&sp_ptr->header.lock);
+		dapl_sp_remove_cr(sp_ptr, cr_ptr);
+		dapl_os_unlock(&sp_ptr->header.lock);
+
+		dapls_cr_free(cr_ptr);
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_cr_util.c b/dapl/common/dapl_cr_util.c
new file mode 100644
index 0000000..39b61ad
--- /dev/null
+++ b/dapl/common/dapl_cr_util.c
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cr_util.c
+ *
+ * PURPOSE: Manage CR (Connection Request) structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_cr_util.h"
+
+/*
+ * dapls_cr_create
+ *
+ * Create a CR. Part of the passive side of a connection
+ *
+ * Input:
+ * 	ia_ptr
+ *
+ * Returns:
+ * 	DAPL_CR
+ *
+ */
+
+DAPL_CR *dapls_cr_alloc(DAPL_IA * ia_ptr)
+{
+	DAPL_CR *cr_ptr;
+
+	/* Allocate EP */
+	cr_ptr = (DAPL_CR *) dapl_os_alloc(sizeof(DAPL_CR));
+	if (cr_ptr == NULL) {
+		return (NULL);
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(cr_ptr, sizeof(DAPL_CR));
+
+	/*
+	 * initialize the header
+	 */
+	cr_ptr->header.provider = ia_ptr->header.provider;
+	cr_ptr->header.magic = DAPL_MAGIC_CR;
+	cr_ptr->header.handle_type = DAT_HANDLE_TYPE_CR;
+	cr_ptr->header.owner_ia = ia_ptr;
+	cr_ptr->header.user_context.as_64 = 0;
+	cr_ptr->header.user_context.as_ptr = NULL;
+	dapl_llist_init_entry(&cr_ptr->header.ia_list_entry);
+	dapl_os_lock_init(&cr_ptr->header.lock);
+
+	return (cr_ptr);
+}
+
+/*
+ * dapls_cr_free
+ *
+ * Free the passed in EP structure.
+ *
+ * Input:
+ * 	entry point pointer
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapls_cr_free(IN DAPL_CR * cr_ptr)
+{
+	dapl_os_assert(cr_ptr->header.magic == DAPL_MAGIC_CR ||
+		       cr_ptr->header.magic == DAPL_MAGIC_CR_DESTROYED);
+
+	cr_ptr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+	dapl_os_free(cr_ptr, sizeof(DAPL_CR));
+}
diff --git a/dapl/common/dapl_cr_util.h b/dapl/common/dapl_cr_util.h
new file mode 100644
index 0000000..33aed7c
--- /dev/null
+++ b/dapl/common/dapl_cr_util.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_cr_util.h
+ *
+ * PURPOSE: Utility defs & routines for the CR data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_CR_UTIL_H_
+#define _DAPL_CR_UTIL_H_
+
+#include "dapl.h" 
+
+DAPL_CR	*
+dapls_cr_alloc (
+	DAPL_IA		*ia_ptr );
+
+void
+dapls_cr_free (
+	IN DAPL_CR		*cr_ptr );
+
+void
+dapls_cr_callback (
+    IN    dp_ib_cm_handle_t     ib_cm_handle,
+    IN    const ib_cm_events_t  ib_cm_event,
+    IN	  const void 		*instant_data_p,
+    IN    const void         	*context);
+
+#endif /* _DAPL_CR_UTIL_H_ */
diff --git a/dapl/common/dapl_csp.c b/dapl/common/dapl_csp.c
new file mode 100755
index 0000000..ce7c015
--- /dev/null
+++ b/dapl/common/dapl_csp.c
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_csp.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 2.0 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_sp_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_psp_create, dapl_csp_query, dapl_csp_free
+ *
+ * uDAPL: User Direct Access Program Library Version 2.0, 6.4.4.2
+ *
+ * The Common Service Point is transport-independent analog of the Public
+ * Service Point. It allows the Consumer to listen on socket-equivalent for
+ * requests for connections arriving on a specified IP port instead of
+ * transport-dependent Connection Qualifier. An IA Address follows the
+ * platform conventions and provides among others the IP port to listen on.
+ * An IP port of the Common Service Point advertisement is supported by
+ * existing Ethernet infrastructure or DAT Name Service.
+ *
+ * Input:
+ * 	ia_handle
+ * 	comm_id
+ * 	address
+ * 	evd_handle
+ *      csp_handle
+ *
+ * Output:
+ * 	csp_handle
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_CONN_QUAL_IN_USE
+ * 	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API dapl_csp_create(IN DAT_IA_HANDLE ia_handle,	/* ia_handle      */
+				   IN DAT_COMM * comm,	/* communicator   */
+				   IN DAT_IA_ADDRESS_PTR addr,	/* address        */
+				   IN DAT_EVD_HANDLE evd_handle,	/* evd_handle     */
+				   OUT DAT_CSP_HANDLE * csp_handle)
+{				/* csp_handle     */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+DAT_RETURN DAT_API dapl_csp_query(IN DAT_CSP_HANDLE csp_handle,	/* csp_handle     */
+				  IN DAT_CSP_PARAM_MASK param_mask,	/* csp_param_mask */
+				  OUT DAT_CSP_PARAM * param)
+{				/* csp_param      */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+DAT_RETURN DAT_API dapl_csp_free(IN DAT_CSP_HANDLE csp_handle)
+{				/* csp_handle     */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_debug.c b/dapl/common/dapl_debug.c
new file mode 100644
index 0000000..ba33cfc
--- /dev/null
+++ b/dapl/common/dapl_debug.c
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl.h"
+#if !defined(__KDAPL__)
+#include <stdarg.h>
+#include <stdlib.h>
+#endif				/* __KDAPL__ */
+
+DAPL_DBG_TYPE g_dapl_dbg_type;	/* initialized in dapl_init.c */
+DAPL_DBG_DEST g_dapl_dbg_dest;	/* initialized in dapl_init.c */
+
+static char *_ptr_host_ = NULL;
+static char _hostname_[128];
+
+void dapl_internal_dbg_log(DAPL_DBG_TYPE type, const char *fmt, ...)
+{
+	va_list args;
+
+	if (_ptr_host_ == NULL) {
+		gethostname(_hostname_, sizeof(_hostname_));
+		_ptr_host_ = _hostname_;
+	}
+
+	if (type & g_dapl_dbg_type) {
+		if (DAPL_DBG_DEST_STDOUT & g_dapl_dbg_dest) {
+			va_start(args, fmt);
+			fprintf(stdout, "%s:%d: ", _ptr_host_,
+				dapl_os_getpid());
+			dapl_os_vprintf(fmt, args);
+			va_end(args);
+		}
+
+		if (DAPL_DBG_DEST_SYSLOG & g_dapl_dbg_dest) {
+			va_start(args, fmt);
+			dapl_os_syslog(fmt, args);
+			va_end(args);
+		}
+	}
+}
+
+#ifdef DAPL_COUNTERS
+
+/*
+ * The order of this list must match the DAT counter definitions 
+ */
+static char *ia_cntr_names[] = {
+	"DCNT_IA_PZ_CREATE",
+	"DCNT_IA_PZ_FREE",
+	"DCNT_IA_LMR_CREATE",
+	"DCNT_IA_LMR_FREE",
+	"DCNT_IA_RMR_CREATE",
+	"DCNT_IA_RMR_FREE",
+	"DCNT_IA_PSP_CREATE",
+	"DCNT_IA_PSP_CREATE_ANY",
+	"DCNT_IA_PSP_FREE",
+	"DCNT_IA_RSP_CREATE",
+	"DCNT_IA_RSP_FREE",
+	"DCNT_IA_EVD_CREATE",
+	"DCNT_IA_EVD_FREE",
+	"DCNT_IA_EP_CREATE",
+	"DCNT_IA_EP_FREE",
+	"DCNT_IA_SRQ_CREATE",
+	"DCNT_IA_SRQ_FREE",
+	"DCNT_IA_SP_CR",
+	"DCNT_IA_SP_CR_ACCEPTED",
+	"DCNT_IA_SP_CR_REJECTED",
+	"DCNT_IA_MEM_ALLOC",
+	"DCNT_IA_MEM_ALLOC_DATA",
+	"DCNT_IA_MEM_FREE",
+	"DCNT_IA_ASYNC_ERROR",
+	"DCNT_IA_ASYNC_QP_ERROR",
+	"DCNT_IA_ASYNC_CQ_ERROR"
+};
+
+static char *ep_cntr_names[] = {
+	"DCNT_EP_CONNECT",
+	"DCNT_EP_DISCONNECT",
+	"DCNT_EP_POST_SEND",
+	"DCNT_EP_POST_SEND_DATA",
+	"DCNT_EP_POST_SEND_UD",
+	"DCNT_EP_POST_SEND_UD_DATA",
+	"DCNT_EP_POST_RECV",
+	"DCNT_EP_POST_RECV_DATA",
+	"DCNT_EP_POST_WRITE",
+	"DCNT_EP_POST_WRITE_DATA",
+	"DCNT_EP_POST_WRITE_IMM",
+	"DCNT_EP_POST_WRITE_IMM_DATA",
+	"DCNT_EP_POST_READ",
+	"DCNT_EP_POST_READ_DATA",
+	"DCNT_EP_POST_CMP_SWAP",
+	"DCNT_EP_POST_FETCH_ADD",
+	"DCNT_EP_RECV",
+	"DCNT_EP_RECV_DATA",
+	"DCNT_EP_RECV_UD",
+	"DCNT_EP_RECV_UD_DATA",
+	"DCNT_EP_RECV_IMM",
+	"DCNT_EP_RECV_IMM_DATA",
+	"DCNT_EP_RECV_RDMA_IMM",
+	"DCNT_EP_RECV_RDMA_IMM_DATA",
+};
+
+static char *evd_cntr_names[] = {
+	"DCNT_EVD_WAIT",
+	"DCNT_EVD_WAIT_BLOCKED",
+	"DCNT_EVD_WAIT_NOTIFY",
+	"DCNT_EVD_DEQUEUE",
+	"DCNT_EVD_DEQUEUE_FOUND",
+	"DCNT_EVD_DEQUEUE_NOT_FOUND",
+	"DCNT_EVD_DEQUEUE_POLL",
+	"DCNT_EVD_DEQUEUE_POLL_FOUND",
+	"DCNT_EVD_CONN_CALLBACK",
+	"DCNT_EVD_DTO_CALLBACK",
+};
+
+DAT_RETURN dapl_query_counter(DAT_HANDLE dh,
+			      int counter, void *p_cntrs_out, int reset)
+{
+	int i, max;
+	DAT_UINT64 *p_cntrs;
+	DAT_HANDLE_TYPE type = 0;
+
+	dat_get_handle_type(dh, &type);
+
+	switch (type) {
+	case DAT_HANDLE_TYPE_IA:
+		max = DCNT_IA_ALL_COUNTERS;
+		p_cntrs = ((DAPL_IA *) dh)->cntrs;
+		break;
+	case DAT_HANDLE_TYPE_EP:
+		max = DCNT_EP_ALL_COUNTERS;
+		p_cntrs = ((DAPL_EP *) dh)->cntrs;
+		break;
+	case DAT_HANDLE_TYPE_EVD:
+		max = DCNT_EVD_ALL_COUNTERS;
+		p_cntrs = ((DAPL_EVD *) dh)->cntrs;
+		break;
+	default:
+		return DAT_INVALID_HANDLE;
+	}
+
+	for (i = 0; i < max; i++) {
+		if ((counter == i) || (counter == max)) {
+			((DAT_UINT64 *) p_cntrs_out)[i] = p_cntrs[i];
+			if (reset)
+				p_cntrs[i] = 0;
+		}
+	}
+	return DAT_SUCCESS;
+}
+
+char *dapl_query_counter_name(DAT_HANDLE dh, int counter)
+{
+	DAT_HANDLE_TYPE type = 0;
+
+	dat_get_handle_type(dh, &type);
+
+	switch (type) {
+	case DAT_HANDLE_TYPE_IA:
+		if (counter < DCNT_IA_ALL_COUNTERS)
+			return ia_cntr_names[counter];
+		break;
+	case DAT_HANDLE_TYPE_EP:
+		if (counter < DCNT_EP_ALL_COUNTERS)
+			return ep_cntr_names[counter];
+		break;
+	case DAT_HANDLE_TYPE_EVD:
+		if (counter < DCNT_EVD_ALL_COUNTERS)
+			return evd_cntr_names[counter];
+		break;
+	default:
+		return NULL;
+	}
+	return NULL;
+}
+
+#include <inttypes.h>
+void dapl_print_counter(DAT_HANDLE dh, int counter, int reset)
+{
+	int i, max;
+	DAT_UINT64 *p_cntrs;
+	DAT_HANDLE_TYPE type = 0;
+
+	dat_get_handle_type(dh, &type);
+
+	switch (type) {
+	case DAT_HANDLE_TYPE_IA:
+		max = DCNT_IA_ALL_COUNTERS;
+		p_cntrs = ((DAPL_IA *) dh)->cntrs;
+		break;
+	case DAT_HANDLE_TYPE_EP:
+		max = DCNT_EP_ALL_COUNTERS;
+		p_cntrs = ((DAPL_EP *) dh)->cntrs;
+		break;
+	case DAT_HANDLE_TYPE_EVD:
+		max = DCNT_EVD_ALL_COUNTERS;
+		p_cntrs = ((DAPL_EVD *) dh)->cntrs;
+		break;
+	default:
+		return;
+	}
+
+	for (i = 0; i < max; i++) {
+		if ((counter == i) || (counter == max)) {
+			printf(" %s = " F64u " \n",
+			       dapl_query_counter_name(dh, i), p_cntrs[i]);
+			if (reset)
+				p_cntrs[i] = 0;
+		}
+	}
+	return;
+}
+
+#endif				/* DAPL_COUNTERS */
diff --git a/dapl/common/dapl_ep_connect.c b/dapl/common/dapl_ep_connect.c
new file mode 100755
index 0000000..5e4dc41
--- /dev/null
+++ b/dapl/common/dapl_ep_connect.c
@@ -0,0 +1,416 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_connect.c
+ *
+ * PURPOSE: Endpoint management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_timer_util.h"
+
+/*
+ * dapl_ep_connect
+ *
+ * Request a connection be established between the local Endpoint
+ * and a remote Endpoint. This operation is used by the active/client
+ * side of a connection
+ *
+ * Input:
+ *	ep_handle
+ *	remote_ia_address
+ *	remote_conn_qual
+ *	timeout
+ *	private_data_size
+ *	privaet_data
+ *	qos
+ *	connect_flags
+ *
+ * Output:
+ *	None
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOUCRES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_MODLE_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_ep_connect(IN DAT_EP_HANDLE ep_handle,
+		IN DAT_IA_ADDRESS_PTR remote_ia_address,
+		IN DAT_CONN_QUAL remote_conn_qual,
+		IN DAT_TIMEOUT timeout,
+		IN DAT_COUNT private_data_size,
+		IN const DAT_PVOID private_data,
+		IN DAT_QOS qos, IN DAT_CONNECT_FLAGS connect_flags)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_EP alloc_ep;
+	DAT_RETURN dat_status;
+	DAT_COUNT req_hdr_size;
+	DAT_UINT32 max_req_pdata_size;
+	void *private_data_ptr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API | DAPL_DBG_TYPE_CM,
+		     "dapl_ep_connect (%p, {%u.%u.%u.%u}, %X, %d, %d, %p, %x, %x)\n",
+		     ep_handle,
+		     remote_ia_address->sa_data[2],
+		     remote_ia_address->sa_data[3],
+		     remote_ia_address->sa_data[4],
+		     remote_ia_address->sa_data[5],
+		     remote_conn_qual,
+		     timeout,
+		     private_data_size, private_data, qos, connect_flags);
+
+	dat_status = DAT_SUCCESS;
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Verify parameter & state. The connection handle must be good
+	 * at this point.
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	if (DAPL_BAD_HANDLE(ep_ptr->param.connect_evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CONN);
+		goto bail;
+	}
+
+	/* Can't do a connection in 0 time, reject outright */
+	if (timeout == 0) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+	DAPL_CNTR(ep_ptr, DCNT_EP_CONNECT);
+
+	/*
+	 * If the endpoint needs a QP, associated the QP with it.
+	 * This needs to be done carefully, in order to:
+	 *  * Avoid allocating under a lock.
+	 *  * Not step on data structures being altered by
+	 *    routines with which we are racing.
+	 * So we:
+	 *  * Confirm that a new QP is needed and is not forbidden by the
+	 *    current state.
+	 *  * Allocate it into a separate EP.
+	 *  * Take the EP lock.
+	 *  * Reconfirm that the EP is in a state where it needs a QP.
+	 *  * Assign the QP and release the lock.
+	 */
+	if (ep_ptr->qp_state == DAPL_QP_STATE_UNATTACHED) {
+		if (ep_ptr->param.pz_handle == NULL
+		    || DAPL_BAD_HANDLE(ep_ptr->param.pz_handle, DAPL_MAGIC_PZ))
+		{
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_STATE,
+				      DAT_INVALID_STATE_EP_NOTREADY);
+			goto bail;
+		}
+		alloc_ep = *ep_ptr;
+
+		dat_status = dapls_ib_qp_alloc(ep_ptr->header.owner_ia,
+					       &alloc_ep, ep_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dat_status =
+			    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				      DAT_RESOURCE_MEMORY);
+			goto bail;
+		}
+
+		dapl_os_lock(&ep_ptr->header.lock);
+		/*
+		 * PZ shouldn't have changed since we're only racing with
+		 * dapl_cr_accept()
+		 */
+		if (ep_ptr->qp_state != DAPL_QP_STATE_UNATTACHED) {
+			/* Bail, cleaning up.  */
+			dapl_os_unlock(&ep_ptr->header.lock);
+			dat_status = dapls_ib_qp_free(ep_ptr->header.owner_ia,
+						      &alloc_ep);
+			if (dat_status != DAT_SUCCESS) {
+				dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+					     "ep_connect: ib_qp_free failed with %x\n",
+					     dat_status);
+			}
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_STATE,
+				      dapls_ep_state_subtype(ep_ptr));
+			goto bail;
+		}
+
+		ep_ptr->qp_handle = alloc_ep.qp_handle;
+		ep_ptr->qpn = alloc_ep.qpn;
+		ep_ptr->qp_state = alloc_ep.qp_state;
+
+		dapl_os_unlock(&ep_ptr->header.lock);
+	}
+
+	/*
+	 * We do state checks and transitions under lock.
+	 * The only code we're racing against is dapl_cr_accept.
+	 */
+	dapl_os_lock(&ep_ptr->header.lock);
+
+	/*
+	 * Verify the attributes of the EP handle before we connect it. Test
+	 * all of the handles to make sure they are currently valid.
+	 * Specifically:
+	 *   pz_handle              required
+	 *   recv_evd_handle        optional, but must be valid
+	 *   request_evd_handle     optional, but must be valid
+	 *   connect_evd_handle     required
+	 */
+	if (ep_ptr->param.pz_handle == NULL
+	    || DAPL_BAD_HANDLE(ep_ptr->param.pz_handle, DAPL_MAGIC_PZ)
+	    /* test connect handle */
+	    || ep_ptr->param.connect_evd_handle == NULL
+	    || DAPL_BAD_HANDLE(ep_ptr->param.connect_evd_handle, DAPL_MAGIC_EVD)
+	    || !(((DAPL_EVD *) ep_ptr->param.connect_evd_handle)->
+		 evd_flags & DAT_EVD_CONNECTION_FLAG)
+	    /* test optional completion handles */
+	    || (ep_ptr->param.recv_evd_handle != DAT_HANDLE_NULL &&
+		(DAPL_BAD_HANDLE
+		 (ep_ptr->param.recv_evd_handle, DAPL_MAGIC_EVD)))
+	    || (ep_ptr->param.request_evd_handle != DAT_HANDLE_NULL
+		&&
+		(DAPL_BAD_HANDLE
+		 (ep_ptr->param.request_evd_handle, DAPL_MAGIC_EVD)))) {
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_EP_NOTREADY);
+		goto bail;
+	}
+
+	/* Check both the EP state and the QP state: if we don't have a QP
+	 *  we need to attach one now.
+	 */
+	if (ep_ptr->qp_state == DAPL_QP_STATE_UNATTACHED) {
+		dat_status = dapls_ib_qp_alloc(ep_ptr->header.owner_ia,
+					       ep_ptr, ep_ptr);
+
+		if (dat_status != DAT_SUCCESS) {
+			dapl_os_unlock(&ep_ptr->header.lock);
+			dat_status =
+			    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				      DAT_RESOURCE_TEP);
+			goto bail;
+		}
+	}
+
+	if (ep_ptr->param.ep_state != DAT_EP_STATE_UNCONNECTED &&
+	    ep_ptr->param.ep_attr.service_type == DAT_SERVICE_TYPE_RC) {
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      dapls_ep_state_subtype(ep_ptr));
+		goto bail;
+	}
+
+	if (qos != DAT_QOS_BEST_EFFORT ||
+	    connect_flags != DAT_CONNECT_DEFAULT_FLAG) {
+		/*
+		 * At this point we only support one QOS level
+		 */
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status = DAT_ERROR(DAT_MODEL_NOT_SUPPORTED, 0);
+		goto bail;
+	}
+
+	/*
+	 * Verify the private data size doesn't exceed the max
+	 * req_hdr_size will evaluate to 0 unless IBHOSTS_NAMING is enabled.
+	 */
+	req_hdr_size = (sizeof(DAPL_PRIVATE) - DAPL_MAX_PRIVATE_DATA_SIZE);
+
+	max_req_pdata_size =
+	    dapls_ib_private_data_size(NULL, DAPL_PDATA_CONN_REQ,
+				       ep_ptr->header.owner_ia->hca_ptr);
+
+	if (private_data_size + req_hdr_size > (DAT_COUNT) max_req_pdata_size) {
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG5);
+		goto bail;
+	}
+
+	/* transition the state before requesting a connection to avoid
+	 * race conditions
+	 */
+	ep_ptr->param.ep_state = DAT_EP_STATE_ACTIVE_CONNECTION_PENDING;
+
+	/*
+	 * At this point we're committed, and done with the endpoint
+	 * except for the connect, so we can drop the lock.
+	 */
+	dapl_os_unlock(&ep_ptr->header.lock);
+
+#ifdef IBHOSTS_NAMING
+	/*
+	 * Special case: put the remote HCA address into the private data
+	 * prefix. This is a spec violation as it introduces a protocol, but
+	 * some implementations may find it necessary for a time.
+	 * Copy the private data into the EP area so the data is contiguous.
+	 * If the provider needs to pad the buffer with NULLs, it happens at
+	 * the provider layer.
+	 */
+	dapl_os_memcpy(&ep_ptr->hca_address,
+		       &ep_ptr->header.owner_ia->hca_ptr->hca_address,
+		       sizeof(DAT_SOCK_ADDR));
+	dapl_os_memcpy(ep_ptr->private.private_data, private_data,
+		       private_data_size);
+	private_data_ptr = (void *)&ep_ptr->private.private_data;
+#else
+	private_data_ptr = private_data;
+#endif				/* IBHOSTS_NAMING */
+
+	/* Copy the connection qualifiers */
+	dapl_os_memcpy(ep_ptr->param.remote_ia_address_ptr,
+		       remote_ia_address, sizeof(DAT_SOCK_ADDR));
+	ep_ptr->param.remote_port_qual = remote_conn_qual;
+
+	dat_status = dapls_ib_connect(ep_handle,
+				      remote_ia_address,
+				      remote_conn_qual,
+				      private_data_size + req_hdr_size,
+				      private_data_ptr);
+
+	if (dat_status != DAT_SUCCESS) {
+		ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+
+		/*
+		 * Some implementations provide us with an error code that the
+		 * remote destination is unreachable, but DAT doesn't have a
+		 * synchronous error code to communicate this. So the provider
+		 * layer generates an INTERNAL_ERROR with a subtype; when
+		 * this happens, return SUCCESS and generate the event
+		 */
+		if (dat_status == DAT_ERROR(DAT_INTERNAL_ERROR, 1)) {
+			dapls_evd_post_connection_event((DAPL_EVD *) ep_ptr->
+							param.
+							connect_evd_handle,
+							DAT_CONNECTION_EVENT_UNREACHABLE,
+							(DAT_HANDLE) ep_ptr, 0,
+							0);
+			dat_status = DAT_SUCCESS;
+		}
+	} else {
+		/*
+		 * Acquire the lock and recheck the state of the EP; this
+		 * thread could have been descheduled after issuing the connect
+		 * request and the EP is now connected. Set up a timer if
+		 * necessary.
+		 */
+		dapl_os_lock(&ep_ptr->header.lock);
+		if (ep_ptr->param.ep_state ==
+		    DAT_EP_STATE_ACTIVE_CONNECTION_PENDING
+		    && timeout != DAT_TIMEOUT_INFINITE) {
+			ep_ptr->cxn_timer =
+			    (DAPL_OS_TIMER *)
+			    dapl_os_alloc(sizeof(DAPL_OS_TIMER));
+
+			dapls_timer_set(ep_ptr->cxn_timer,
+					dapls_ep_timeout, ep_ptr, timeout);
+		}
+		dapl_os_unlock(&ep_ptr->header.lock);
+	}
+
+      bail:
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN | DAPL_DBG_TYPE_CM,
+		     "dapl_ep_connect () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
+
+/*
+ * dapl_ep_common_connect
+ *
+ * DAPL Requirements Version 2.0, 6.6.x
+ *
+ * Requests that a connection be established
+ * between the local Endpoint and a remote Endpoint specified by the
+ * remote_ia_address. This operation is used by the active/client side
+ * Consumer of the Connection establishment model.
+ *
+ * EP must be properly configured for this operation. The EP Communicator
+ * must be specified. As part of the successful completion of this operation,
+ * the local Endpoint is bound to a local IA Address if it had these assigned
+ * before.
+ * 
+ * The local IP Address, port and protocol are passed to the remote side of
+ * the requested connection and is available to the remote Consumer in the
+ * Connection Request of the DAT_CONNECTION_REQUEST_EVENT.
+ * 
+ * The Consumer-provided private_data is passed to the remote side and is
+ * provided to the remote Consumer in the Connection Request. Consumers
+ * can encapsulate any local Endpoint attributes that remote Consumers
+ * need to know as part of an upper-level protocol.
+ *
+ * Input:
+ *	ep_handle
+ *	remote_ia_address
+ *	timeout
+ *	private_data_size
+ *	private_date pointer
+ *
+ * Output:
+ *	none
+ * 
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_STATE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API dapl_ep_common_connect(IN DAT_EP_HANDLE ep,	/* ep_handle            */
+					  IN DAT_IA_ADDRESS_PTR remote_addr,	/* remote_ia_address    */
+					  IN DAT_TIMEOUT timeout,	/* timeout              */
+					  IN DAT_COUNT pdata_size,	/* private_data_size    */
+					  IN const DAT_PVOID pdata)
+{				/* private_data         */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_create.c b/dapl/common/dapl_ep_create.c
new file mode 100644
index 0000000..e154b8d
--- /dev/null
+++ b/dapl/common/dapl_ep_create.c
@@ -0,0 +1,335 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_create.c
+ *
+ * PURPOSE: Endpoint management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_ep_create
+ *
+ * Create an instance of an Endpoint that is provided to the
+ * consumer at ep_handle.
+ *
+ * Input:
+ *	ia_handle
+ *	pz_handle
+ *	recv_evd_handle (recv DTOs)
+ *	request_evd_handle (xmit DTOs)
+ *	connect_evd_handle
+ *	ep_attrs
+ *
+ * Output:
+ *	ep_handle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_ATTRIBUTE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_ep_create(IN DAT_IA_HANDLE ia_handle,
+	       IN DAT_PZ_HANDLE pz_handle,
+	       IN DAT_EVD_HANDLE recv_evd_handle,
+	       IN DAT_EVD_HANDLE request_evd_handle,
+	       IN DAT_EVD_HANDLE connect_evd_handle,
+	       IN const DAT_EP_ATTR * ep_attr, OUT DAT_EP_HANDLE * ep_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_EP *ep_ptr;
+	DAT_EP_ATTR ep_attr_limit;
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_create (%p, %p, %p, %p, %p, %p, %p)\n",
+		     ia_handle,
+		     pz_handle,
+		     recv_evd_handle,
+		     request_evd_handle,
+		     connect_evd_handle, ep_attr, ep_handle);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+	dat_status = DAT_SUCCESS;
+
+	/*
+	 * Verify parameters
+	 */
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	DAPL_CNTR(ia_ptr, DCNT_IA_EP_CREATE);
+
+	/*
+	 * Verify non-required parameters.
+	 * N.B. Assumption: any parameter that can be
+	 *      modified by dat_ep_modify() is not strictly
+	 *      required when the EP is created
+	 */
+	if (pz_handle != DAT_HANDLE_NULL &&
+	    DAPL_BAD_HANDLE(pz_handle, DAPL_MAGIC_PZ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+		goto bail;
+	}
+
+	/* If connect handle is !NULL verify handle is good  */
+	if (connect_evd_handle != DAT_HANDLE_NULL &&
+	    (DAPL_BAD_HANDLE(connect_evd_handle, DAPL_MAGIC_EVD) ||
+	     !(((DAPL_EVD *) connect_evd_handle)->
+	       evd_flags & DAT_EVD_CONNECTION_FLAG))) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CONN);
+		goto bail;
+	}
+
+	/* If recv_evd is !NULL, verify handle is good and flags are valid */
+	if (recv_evd_handle != DAT_HANDLE_NULL &&
+	    (DAPL_BAD_HANDLE(recv_evd_handle, DAPL_MAGIC_EVD) ||
+	     !(((DAPL_EVD *) recv_evd_handle)->evd_flags & DAT_EVD_DTO_FLAG))) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_RECV);
+		goto bail;
+	}
+
+	/* If req_evd is !NULL, verify handle is good and flags are valid */
+	if (request_evd_handle != DAT_HANDLE_NULL &&
+	    (DAPL_BAD_HANDLE(request_evd_handle, DAPL_MAGIC_EVD) ||
+	     !(((DAPL_EVD *) request_evd_handle)->
+	       evd_flags & DAT_EVD_DTO_FLAG))) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE,
+			      DAT_INVALID_HANDLE_EVD_REQUEST);
+		goto bail;
+	}
+
+	if (ep_handle == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG7);
+		goto bail;
+	}
+	if (DAPL_BAD_PTR(ep_attr)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG6);
+		goto bail;
+	}
+
+	/*
+	 * Qualify EP Attributes are legal and make sense.  Note that if one
+	 * or both of the DTO handles are NULL, then the corresponding
+	 * max_*_dtos must 0 as the user will not be able to post dto ops on
+	 * the respective queue.
+	 */
+	if (ep_attr != NULL && (
+#ifndef DAT_EXTENSIONS
+				       ep_attr->service_type !=
+				       DAT_SERVICE_TYPE_RC ||
+#endif
+				       (recv_evd_handle == DAT_HANDLE_NULL
+					&& ep_attr->max_recv_dtos != 0)
+				       || (recv_evd_handle != DAT_HANDLE_NULL
+					   && ep_attr->max_recv_dtos == 0)
+				       || (request_evd_handle == DAT_HANDLE_NULL
+					   && ep_attr->max_request_dtos != 0)
+				       || (request_evd_handle != DAT_HANDLE_NULL
+					   && ep_attr->max_request_dtos == 0)
+				       || (recv_evd_handle != DAT_HANDLE_NULL
+					   && ep_attr->max_recv_iov == 0)
+				       || ep_attr->max_request_iov == 0
+				       || (DAT_SUCCESS !=
+					   dapl_ep_check_recv_completion_flags
+					   (ep_attr->recv_completion_flags)))) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG6);
+		goto bail;
+	}
+
+	/* Verify the attributes against the transport */
+	if (ep_attr != NULL) {
+		dapl_os_memzero(&ep_attr_limit, sizeof(DAT_EP_ATTR));
+		dat_status = dapls_ib_query_hca(ia_ptr->hca_ptr,
+						NULL, &ep_attr_limit, NULL);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+		if (ep_attr->max_mtu_size > ep_attr_limit.max_mtu_size ||
+		    ep_attr->max_rdma_size > ep_attr_limit.max_rdma_size ||
+		    ep_attr->max_recv_dtos > ep_attr_limit.max_recv_dtos ||
+		    ep_attr->max_request_dtos > ep_attr_limit.max_request_dtos
+		    || ep_attr->max_recv_iov > ep_attr_limit.max_recv_iov
+		    || ep_attr->max_request_iov > ep_attr_limit.max_request_iov
+		    || ep_attr->max_rdma_read_in >
+		    ep_attr_limit.max_rdma_read_in
+		    || ep_attr->max_rdma_read_out >
+		    ep_attr_limit.max_rdma_read_out)
+		{
+			dat_status = DAT_INVALID_PARAMETER | DAT_INVALID_ARG6;
+			goto bail;
+		}
+	}
+
+	/*
+	 * Verify the completion flags for the EVD and the EP
+	 */
+	/*
+	 * XXX FIXME
+	 * XXX Need to make assign the EVD to the right completion type
+	 * XXX depending on the EP attributes. Fail if the types don't
+	 * XXX match, they are mutually exclusive.
+	 */
+	evd_ptr = (DAPL_EVD *) recv_evd_handle;
+	if (evd_ptr != NULL && evd_ptr->completion_type == DAPL_EVD_STATE_INIT) {
+		if (ep_attr != NULL &&
+		    ep_attr->recv_completion_flags ==
+		    DAT_COMPLETION_DEFAULT_FLAG) {
+			evd_ptr->completion_type = DAPL_EVD_STATE_THRESHOLD;
+		} else {
+			evd_ptr->completion_type =
+			    ep_attr->recv_completion_flags;
+		}
+	}
+
+	evd_ptr = (DAPL_EVD *) request_evd_handle;
+	if (evd_ptr != NULL && evd_ptr->completion_type == DAPL_EVD_STATE_INIT) {
+		if (ep_attr != NULL &&
+		    ep_attr->recv_completion_flags ==
+		    DAT_COMPLETION_DEFAULT_FLAG) {
+			evd_ptr->completion_type = DAPL_EVD_STATE_THRESHOLD;
+		} else {
+			evd_ptr->completion_type =
+			    ep_attr->recv_completion_flags;
+		}
+	}
+
+	/* Allocate EP */
+	ep_ptr = dapl_ep_alloc(ia_ptr, ep_attr);
+	if (ep_ptr == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	/*
+	 * Fill in the EP
+	 */
+	ep_ptr->param.ia_handle = ia_handle;
+	ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+	ep_ptr->param.local_ia_address_ptr =
+	    (DAT_IA_ADDRESS_PTR) & ia_ptr->hca_ptr->hca_address;
+	/* Set the remote address pointer to the end of the EP struct */
+	ep_ptr->param.remote_ia_address_ptr = (DAT_IA_ADDRESS_PTR) (ep_ptr + 1);
+
+	ep_ptr->param.pz_handle = pz_handle;
+	ep_ptr->param.recv_evd_handle = recv_evd_handle;
+	ep_ptr->param.request_evd_handle = request_evd_handle;
+	ep_ptr->param.connect_evd_handle = connect_evd_handle;
+
+	/*
+	 * Make sure we handle the NULL DTO EVDs
+	 */
+	if (recv_evd_handle == DAT_HANDLE_NULL && ep_attr == NULL) {
+		ep_ptr->param.ep_attr.max_recv_dtos = 0;
+	}
+
+	if (request_evd_handle == DAT_HANDLE_NULL && ep_attr == NULL) {
+		ep_ptr->param.ep_attr.max_request_dtos = 0;
+	}
+
+	/*
+	 * If the user has specified a PZ handle we allocate a QP for
+	 * this EP; else we defer until it is assigned via ep_modify().
+	 * As much as possible we try to keep QP creation out of the
+	 * connect path to avoid resource errors in strange places.
+	 */
+	if (pz_handle != DAT_HANDLE_NULL) {
+		/* Take a reference on the PZ handle */
+		dapl_os_atomic_inc(&((DAPL_PZ *) pz_handle)->pz_ref_count);
+
+		/*
+		 * Get a QP from the IB provider
+		 */
+		dat_status = dapls_ib_qp_alloc(ia_ptr, ep_ptr, ep_ptr);
+
+		if (dat_status != DAT_SUCCESS) {
+			dapl_os_atomic_dec(&((DAPL_PZ *) pz_handle)->
+					   pz_ref_count);
+			dapl_ep_dealloc(ep_ptr);
+			goto bail;
+		}
+	} else {
+		ep_ptr->qp_state = DAPL_QP_STATE_UNATTACHED;
+	}
+
+	/*
+	 * Update ref counts. See the spec where the endpoint marks
+	 * a data object as 'in use'
+	 *   pz_handle: dat_pz_free, uDAPL Document, 6.6.1.2
+	 *   evd_handles:
+	 *
+	 * N.B. This should really be done by a util routine.
+	 */
+	if (connect_evd_handle != DAT_HANDLE_NULL) {
+		dapl_os_atomic_inc(&((DAPL_EVD *) connect_evd_handle)->
+				   evd_ref_count);
+	}
+	/* Optional handles */
+	if (recv_evd_handle != DAT_HANDLE_NULL) {
+		dapl_os_atomic_inc(&((DAPL_EVD *) recv_evd_handle)->
+				   evd_ref_count);
+	}
+	if (request_evd_handle != DAT_HANDLE_NULL) {
+		dapl_os_atomic_inc(&((DAPL_EVD *) request_evd_handle)->
+				   evd_ref_count);
+	}
+
+	/* Link it onto the IA */
+	dapl_ia_link_ep(ia_ptr, ep_ptr);
+
+	*ep_handle = ep_ptr;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_create_with_srq.c b/dapl/common/dapl_ep_create_with_srq.c
new file mode 100644
index 0000000..b85abfd
--- /dev/null
+++ b/dapl/common/dapl_ep_create_with_srq.c
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_create_with_srq.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the kDAPL 1.2 API, Chapter 6, section 6.5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_ep_create_with_srq
+ *
+ * uDAPL Version 1.2, 6.6.5
+ *
+ * Create an instance of an Endpoint that is provided to the
+ * consumer at ep_handle.
+ *
+ * Input:
+ *	ia_handle
+ *	pz_handle
+ *	recv_evd_handle (recv DTOs)
+ *	request_evd_handle (xmit DTOs)
+ *	connect_evd_handle
+ *	srq_handle
+ *	ep_attrs
+ *
+ * Output:
+ *	ep_handle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_ATTRIBUTE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_ep_create_with_srq(IN DAT_IA_HANDLE ia_handle,
+			IN DAT_PZ_HANDLE pz_handle,
+			IN DAT_EVD_HANDLE recv_evd_handle,
+			IN DAT_EVD_HANDLE request_evd_handle,
+			IN DAT_EVD_HANDLE connect_evd_handle,
+			IN DAT_SRQ_HANDLE srq_handle,
+			IN const DAT_EP_ATTR * ep_attr,
+			OUT DAT_EP_HANDLE * ep_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_EP *ep_ptr;
+	DAT_EP_ATTR ep_attr_limit;
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_create_with_srq (%p, %p, %p, %p, %p, %p, %p %p)\n",
+		     ia_handle,
+		     pz_handle,
+		     recv_evd_handle,
+		     request_evd_handle,
+		     connect_evd_handle, srq_handle, ep_attr, ep_handle);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+
+	/*
+	 * Verify parameters
+	 */
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	/*
+	 * Verify non-required parameters.
+	 * N.B. Assumption: any parameter that can be
+	 *      modified by dat_ep_modify() is not strictly
+	 *      required when the EP is created
+	 */
+	if (pz_handle != NULL && DAPL_BAD_HANDLE(pz_handle, DAPL_MAGIC_PZ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+		goto bail;
+	}
+
+	/* If connect handle is !NULL verify handle is good  */
+	if (connect_evd_handle != DAT_HANDLE_NULL &&
+	    (DAPL_BAD_HANDLE(connect_evd_handle, DAPL_MAGIC_EVD) ||
+	     !(((DAPL_EVD *) connect_evd_handle)->
+	       evd_flags & DAT_EVD_CONNECTION_FLAG))) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CONN);
+		goto bail;
+	}
+	/* If recv_evd is !NULL, verify handle is good and flags are valid */
+	if (recv_evd_handle != DAT_HANDLE_NULL &&
+	    (DAPL_BAD_HANDLE(recv_evd_handle, DAPL_MAGIC_EVD) ||
+	     !(((DAPL_EVD *) recv_evd_handle)->evd_flags & DAT_EVD_DTO_FLAG))) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_RECV);
+		goto bail;
+	}
+
+	/* If req_evd is !NULL, verify handle is good and flags are valid */
+	if (request_evd_handle != DAT_HANDLE_NULL &&
+	    (DAPL_BAD_HANDLE(request_evd_handle, DAPL_MAGIC_EVD) ||
+	     !(((DAPL_EVD *) request_evd_handle)->
+	       evd_flags & DAT_EVD_DTO_FLAG))) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE,
+			      DAT_INVALID_HANDLE_EVD_REQUEST);
+		goto bail;
+	}
+
+	/*
+	 * Verify the SRQ handle. It is an error to invoke this call with
+	 * a NULL handle
+	 */
+	if (DAPL_BAD_HANDLE(srq_handle, DAPL_MAGIC_SRQ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+		goto bail;
+	}
+
+	if (ep_handle == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG7);
+		goto bail;
+	}
+
+	if (DAPL_BAD_PTR(ep_attr)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG6);
+		goto bail;
+	}
+
+	/*
+	 * Qualify EP Attributes are legal and make sense.  Note that if one
+	 * or both of the DTO handles are NULL, then the corresponding
+	 * max_*_dtos must 0 as the user will not be able to post dto ops on
+	 * the respective queue.
+	 */
+	if (ep_attr != NULL &&
+	    (ep_attr->service_type != DAT_SERVICE_TYPE_RC ||
+	     (recv_evd_handle == DAT_HANDLE_NULL && ep_attr->max_recv_dtos != 0)
+	     || (recv_evd_handle != DAT_HANDLE_NULL
+		 && ep_attr->max_recv_dtos == 0)
+	     || (request_evd_handle == DAT_HANDLE_NULL
+		 && ep_attr->max_request_dtos != 0)
+	     || (request_evd_handle != DAT_HANDLE_NULL
+		 && ep_attr->max_request_dtos == 0)
+	     || ep_attr->max_recv_iov == 0 || ep_attr->max_request_iov == 0
+	     || (DAT_SUCCESS !=
+		 dapl_ep_check_recv_completion_flags(ep_attr->
+						     recv_completion_flags)))) {
+		dat_status = DAT_INVALID_PARAMETER | DAT_INVALID_ARG6;
+		goto bail;
+	}
+
+	/* Verify the attributes against the transport */
+	if (ep_attr != NULL) {
+		dapl_os_memzero(&ep_attr_limit, sizeof(DAT_EP_ATTR));
+		dat_status = dapls_ib_query_hca(ia_ptr->hca_ptr,
+						NULL, &ep_attr_limit, NULL);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+		if (ep_attr->max_mtu_size > ep_attr_limit.max_mtu_size ||
+		    ep_attr->max_rdma_size > ep_attr_limit.max_rdma_size ||
+		    ep_attr->max_recv_dtos > ep_attr_limit.max_recv_dtos ||
+		    ep_attr->max_request_dtos > ep_attr_limit.max_request_dtos
+		    || ep_attr->max_recv_iov > ep_attr_limit.max_recv_iov
+		    || ep_attr->max_request_iov > ep_attr_limit.max_request_iov
+		    || ep_attr->max_rdma_read_in >
+		    ep_attr_limit.max_rdma_read_in
+		    || ep_attr->max_rdma_read_out >
+		    ep_attr_limit.max_rdma_read_out)
+		{
+			dat_status = DAT_INVALID_PARAMETER | DAT_INVALID_ARG6;
+			goto bail;
+		}
+	}
+
+	/*
+	 * Verify the completion flags for the EVD and the EP
+	 */
+	/*
+	 * XXX FIXME
+	 * XXX Need to make assign the EVD to the right completion type
+	 * XXX depending on the EP attributes. Fail if the types don't
+	 * XXX match, they are mutually exclusive.
+	 */
+	evd_ptr = (DAPL_EVD *) recv_evd_handle;
+	if (evd_ptr != NULL && evd_ptr->completion_type == DAPL_EVD_STATE_INIT) {
+		if (ep_attr != NULL &&
+		    ep_attr->recv_completion_flags ==
+		    DAT_COMPLETION_DEFAULT_FLAG) {
+			evd_ptr->completion_type = DAPL_EVD_STATE_THRESHOLD;
+		} else {
+			evd_ptr->completion_type =
+			    ep_attr->recv_completion_flags;
+		}
+	}
+
+	evd_ptr = (DAPL_EVD *) request_evd_handle;
+	if (evd_ptr != NULL && evd_ptr->completion_type == DAPL_EVD_STATE_INIT) {
+		if (ep_attr != NULL &&
+		    ep_attr->recv_completion_flags ==
+		    DAT_COMPLETION_DEFAULT_FLAG) {
+			evd_ptr->completion_type = DAPL_EVD_STATE_THRESHOLD;
+		} else {
+			evd_ptr->completion_type =
+			    ep_attr->recv_completion_flags;
+		}
+	}
+
+	dat_status = DAT_NOT_IMPLEMENTED;
+
+	/*
+	 * XXX The rest of the EP code is useful in this case too,
+	 * XXX but need to complete the SRQ implementation before
+	 * XXX committing resources
+	 */
+	*ep_handle = ep_ptr = NULL;
+	goto bail;
+#ifdef notdef
+
+	/* Allocate EP */
+	ep_ptr = dapl_ep_alloc(ia_ptr, ep_attr);
+	if (ep_ptr == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	/*
+	 * Fill in the EP
+	 */
+	ep_ptr->param.ia_handle = ia_handle;
+	ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+	ep_ptr->param.local_ia_address_ptr =
+	    (DAT_IA_ADDRESS_PTR) & ia_ptr->hca_ptr->hca_address;
+	/* Set the remote address pointer to the end of the EP struct */
+	ep_ptr->param.remote_ia_address_ptr = (DAT_IA_ADDRESS_PTR) (ep_ptr + 1);
+
+	ep_ptr->param.pz_handle = pz_handle;
+	ep_ptr->param.recv_evd_handle = recv_evd_handle;
+	ep_ptr->param.request_evd_handle = request_evd_handle;
+	ep_ptr->param.connect_evd_handle = connect_evd_handle;
+
+	/*
+	 * Make sure we handle the NULL DTO EVDs
+	 */
+	if (recv_evd_handle == DAT_HANDLE_NULL && ep_attr == NULL) {
+		ep_ptr->param.ep_attr.max_recv_dtos = 0;
+	}
+
+	if (request_evd_handle == DAT_HANDLE_NULL && ep_attr == NULL) {
+		ep_ptr->param.ep_attr.max_request_dtos = 0;
+	}
+
+	/*
+	 * If the user has specified a PZ handle we allocate a QP for
+	 * this EP; else we defer until it is assigned via ep_modify().
+	 * As much as possible we try to keep QP creation out of the
+	 * connect path to avoid resource errors in strange places.
+	 */
+	if (pz_handle != DAT_HANDLE_NULL) {
+		/* Take a reference on the PZ handle */
+		dapl_os_atomic_inc(&((DAPL_PZ *) pz_handle)->pz_ref_count);
+
+		/*
+		 * Get a QP from the IB provider
+		 */
+		dat_status = dapls_ib_qp_alloc(ia_ptr, ep_ptr, ep_ptr);
+
+		if (dat_status != DAT_SUCCESS) {
+			dapl_os_atomic_dec(&((DAPL_PZ *) pz_handle)->
+					   pz_ref_count);
+			dapl_ep_dealloc(ep_ptr);
+			goto bail;
+		}
+	} else {
+		ep_ptr->qp_state = DAPL_QP_STATE_UNATTACHED;
+	}
+
+	/*
+	 * Update ref counts. See the spec where the endpoint marks
+	 * a data object as 'in use'
+	 *   pz_handle: dat_pz_free, uDAPL Document, 6.6.1.2
+	 *   evd_handles:
+	 *
+	 * N.B. This should really be done by a util routine.
+	 */
+	dapl_os_atomic_inc(&((DAPL_EVD *) connect_evd_handle)->evd_ref_count);
+	/* Optional handles */
+	if (recv_evd_handle != DAT_HANDLE_NULL) {
+		dapl_os_atomic_inc(&((DAPL_EVD *) recv_evd_handle)->
+				   evd_ref_count);
+	}
+	if (request_evd_handle != DAT_HANDLE_NULL) {
+		dapl_os_atomic_inc(&((DAPL_EVD *) request_evd_handle)->
+				   evd_ref_count);
+	}
+
+	/* Link it onto the IA */
+	dapl_ia_link_ep(ia_ptr, ep_ptr);
+
+	*ep_handle = ep_ptr;
+
+#endif				/* notdef */
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_disconnect.c b/dapl/common/dapl_ep_disconnect.c
new file mode 100644
index 0000000..72da620
--- /dev/null
+++ b/dapl/common/dapl_ep_disconnect.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_disconnect.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_sp_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_ep_disconnect
+ *
+ * DAPL Requirements Version xxx, 6.5.9
+ *
+ * Terminate a connection.
+ *
+ * Input:
+ *	ep_handle
+ *	disconnect_flags
+ *
+ * Output:
+ *	None
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_ep_disconnect(IN DAT_EP_HANDLE ep_handle,
+		   IN DAT_CLOSE_FLAGS disconnect_flags)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API | DAPL_DBG_TYPE_CM,
+		     "dapl_ep_disconnect (%p, %x)\n",
+		     ep_handle, disconnect_flags);
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+	DAPL_CNTR(ep_ptr, DCNT_EP_DISCONNECT);
+
+	/*
+	 * Do the verification of parameters and the state change
+	 * atomically.
+	 */
+	dapl_os_lock(&ep_ptr->header.lock);
+
+	/* Disconnecting a disconnected EP is a no-op. */
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED ||
+	    ep_ptr->param.ep_attr.service_type != DAT_SERVICE_TYPE_RC) {
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status = DAT_SUCCESS;
+		goto bail;
+	}
+
+	/* Check the EP state to ensure we are queiscent. Note that
+	 * we may get called in UNCONNECTED state in order to remove
+	 * RECV requests from the queue prior to destroying an EP.
+	 * See the states in the spec at 6.5.1 Endpont Lifecycle
+	 */
+	if (ep_ptr->param.ep_state != DAT_EP_STATE_CONNECTED &&
+	    ep_ptr->param.ep_state != DAT_EP_STATE_ACTIVE_CONNECTION_PENDING &&
+	    ep_ptr->param.ep_state != DAT_EP_STATE_COMPLETION_PENDING &&
+	    ep_ptr->param.ep_state != DAT_EP_STATE_DISCONNECT_PENDING) {
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      dapls_ep_state_subtype(ep_ptr));
+		goto bail;
+	}
+
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECT_PENDING &&
+	    disconnect_flags != DAT_CLOSE_ABRUPT_FLAG) {
+		/*
+		 * If in state DISCONNECT_PENDING then this must be an
+		 * ABRUPT disconnect
+		 */
+		dapl_os_unlock(&ep_ptr->header.lock);
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_ACTIVE_CONNECTION_PENDING ||
+	    ep_ptr->param.ep_state == DAT_EP_STATE_COMPLETION_PENDING) {
+		/*
+		 * Beginning or waiting on a connection: abort and reset the
+		 * state
+		 */
+		ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+
+		dapl_os_unlock(&ep_ptr->header.lock);
+		/* disconnect and make sure we get no callbacks */
+		(void)dapls_ib_disconnect(ep_ptr, DAT_CLOSE_ABRUPT_FLAG);
+
+		/* clean up connection state */
+		dapl_sp_remove_ep(ep_ptr);
+
+		evd_ptr = (DAPL_EVD *) ep_ptr->param.connect_evd_handle;
+		dapls_evd_post_connection_event(evd_ptr,
+						DAT_CONNECTION_EVENT_DISCONNECTED,
+						(DAT_HANDLE) ep_ptr, 0, 0);
+		dat_status = DAT_SUCCESS;
+		goto bail;
+	}
+
+	/*
+	 * Transition the EP state to DISCONNECT_PENDING if we are
+	 * CONNECTED. Otherwise we do not get a disconnect event and will be
+	 * stuck in DISCONNECT_PENDING.
+	 *
+	 * If the user specifies a graceful disconnect, the underlying
+	 * provider should complete all DTOs before disconnecting; in IB
+	 * terms, this means setting the QP state to SQD before completing
+	 * the disconnect state transitions.
+	 */
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_CONNECTED) {
+		ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECT_PENDING;
+	}
+	dapl_os_unlock(&ep_ptr->header.lock);
+	dat_status = dapls_ib_disconnect(ep_ptr, disconnect_flags);
+
+      bail:
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN | DAPL_DBG_TYPE_CM,
+		     "dapl_ep_disconnect (EP %p) returns 0x%x\n",
+		     ep_ptr, dat_status);
+
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_dup_connect.c b/dapl/common/dapl_ep_dup_connect.c
new file mode 100644
index 0000000..799cdb4
--- /dev/null
+++ b/dapl/common/dapl_ep_dup_connect.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_dup_connect.c 
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_timer_util.h"
+
+/*
+ * dapl_ep_dup_connect
+ *
+ * DAPL Requirements Version xxx, 6.5.8
+ *
+ * Requst that a connection be established between the local Endpoint
+ * and a remote Endpoint. The remote Endpoint is identified by the
+ * dup_ep.
+ *
+ * Input:
+ *	ep_handle
+ *	ep_dup_handle
+ *	conn_qual
+ *	timeout
+ *	private_data_size
+ *	private_data
+ *	qos
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_ep_dup_connect(IN DAT_EP_HANDLE ep_handle,
+		    IN DAT_EP_HANDLE ep_dup_handle,
+		    IN DAT_TIMEOUT timeout,
+		    IN DAT_COUNT private_data_size,
+		    IN const DAT_PVOID private_data, IN DAT_QOS qos)
+{
+	DAPL_EP *ep_dup_ptr;
+	DAT_RETURN dat_status;
+	DAT_IA_ADDRESS_PTR remote_ia_address_ptr;
+	DAT_CONN_QUAL remote_conn_qual;
+
+	ep_dup_ptr = (DAPL_EP *) ep_dup_handle;
+
+	/*
+	 * Verify the dup handle, which must be connected. All other
+	 * parameters will be verified by dapl_ep_connect
+	 */
+	if (DAPL_BAD_HANDLE(ep_dup_handle, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	/* Can't do a connection in 0 time, reject outright */
+	if (timeout == 0) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	/* Check both the EP state and the QP state: if we don't have a QP
+	 *  there is a problem.  Do this under a lock and pull out
+	 * the connection parameters for atomicity.
+	 */
+	dapl_os_lock(&ep_dup_ptr->header.lock);
+	if (ep_dup_ptr->param.ep_state != DAT_EP_STATE_CONNECTED) {
+		dapl_os_unlock(&ep_dup_ptr->header.lock);
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      dapls_ep_state_subtype(ep_dup_ptr));
+		goto bail;
+	}
+	remote_ia_address_ptr = ep_dup_ptr->param.remote_ia_address_ptr;
+	remote_conn_qual = ep_dup_ptr->param.remote_port_qual;
+	dapl_os_unlock(&ep_dup_ptr->header.lock);
+
+	dat_status = dapl_ep_connect(ep_handle,
+				     remote_ia_address_ptr,
+				     remote_conn_qual,
+				     timeout,
+				     private_data_size,
+				     private_data,
+				     qos, DAT_CONNECT_DEFAULT_FLAG);
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_ep_free.c b/dapl/common/dapl_ep_free.c
new file mode 100644
index 0000000..fd9fcc7
--- /dev/null
+++ b/dapl/common/dapl_ep_free.c
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_free.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5.4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ring_buffer_util.h"
+#include "dapl_timer_util.h"
+
+/*
+ * dapl_ep_free
+ *
+ * DAPL Requirements Version xxx, 6.5.3
+ *
+ * Destroy an instance of the Endpoint
+ *
+ * Input:
+ *	ep_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ */
+DAT_RETURN DAT_API dapl_ep_free(IN DAT_EP_HANDLE ep_handle)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_IA *ia_ptr;
+	DAT_EP_PARAM *param;
+	ib_qp_state_t save_qp_state;
+	DAT_RETURN dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API | DAPL_DBG_TYPE_CM,
+		     "dapl_ep_free (%p)\n", ep_handle);
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+	param = &ep_ptr->param;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+	DAPL_CNTR(ep_ptr->header.owner_ia, DCNT_IA_EP_FREE);
+
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_RESERVED ||
+	    ep_ptr->param.ep_state == DAT_EP_STATE_PASSIVE_CONNECTION_PENDING ||
+	    ep_ptr->param.ep_state == DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING)
+	{
+		dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+			     "--> dapl_ep_free: invalid state: %x, ep %p\n",
+			     ep_ptr->param.ep_state, ep_ptr);
+		dat_status = DAT_ERROR(DAT_INVALID_STATE,
+				       dapls_ep_state_subtype(ep_ptr));
+		goto bail;
+	}
+
+	ia_ptr = ep_ptr->header.owner_ia;
+
+	/* If we are connected, issue a disconnect. If we are in the
+	 * disconnect_pending state, disconnect with the ABRUPT flag
+	 * set.
+	 */
+
+	/*
+	 * Invoke ep_disconnect to clean up outstanding connections
+	 */
+	(void)dapl_ep_disconnect(ep_ptr, DAT_CLOSE_ABRUPT_FLAG);
+
+	/*
+	 * Do verification of parameters and the state change atomically.
+	 */
+	dapl_os_lock(&ep_ptr->header.lock);
+
+#ifdef DAPL_DBG
+	/* check if event pending and warn, don't assert, state is valid */
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECT_PENDING) {
+		dapl_dbg_log(DAPL_DBG_TYPE_WARN, " dat_ep_free WARNING: "
+			     "EVENT PENDING on ep %p, disconnect "
+			     "and wait before calling dat_ep_free\n", ep_ptr);
+	}
+#endif
+
+	if (ep_ptr->cxn_timer != NULL) {
+		dapls_timer_cancel(ep_ptr->cxn_timer);
+		dapl_os_free(ep_ptr->cxn_timer, sizeof(DAPL_OS_TIMER));
+		ep_ptr->cxn_timer = NULL;
+	}
+
+	/* Remove the EP from the IA */
+	dapl_ia_unlink_ep(ia_ptr, ep_ptr);
+
+	/*
+	 * Update ref counts. Note the user may have used ep_modify
+	 * to set handles to NULL. Set handles to NULL so this routine
+	 * is idempotent.
+	 */
+	if (param->pz_handle != NULL) {
+		dapl_os_atomic_dec(&((DAPL_PZ *) param->pz_handle)->
+				   pz_ref_count);
+		param->pz_handle = NULL;
+	}
+	if (param->recv_evd_handle != NULL) {
+		dapl_os_atomic_dec(&((DAPL_EVD *) param->recv_evd_handle)->
+				   evd_ref_count);
+		param->recv_evd_handle = NULL;
+	}
+	if (param->request_evd_handle != NULL) {
+		dapl_os_atomic_dec(&((DAPL_EVD *) param->request_evd_handle)->
+				   evd_ref_count);
+		param->request_evd_handle = NULL;
+	}
+	if (param->connect_evd_handle != NULL) {
+		dapl_os_atomic_dec(&((DAPL_EVD *) param->connect_evd_handle)->
+				   evd_ref_count);
+		param->connect_evd_handle = NULL;
+	}
+
+	/*
+	 * Finish tearing everything down.
+	 */
+	dapl_dbg_log(DAPL_DBG_TYPE_EP | DAPL_DBG_TYPE_CM,
+		     "dapl_ep_free: Free EP: %x, ep %p qp_state %x qp_handle %x\n",
+		     ep_ptr->param.ep_state,
+		     ep_ptr, ep_ptr->qp_state, ep_ptr->qp_handle);
+	/*
+	 * Take care of the transport resource. Make a copy of the qp_state
+	 * to prevent race conditions when we exit the lock.
+	 */
+	save_qp_state = ep_ptr->qp_state;
+	ep_ptr->qp_state = DAPL_QP_STATE_UNATTACHED;
+	dapl_os_unlock(&ep_ptr->header.lock);
+
+	/* Free the QP. If the EP has never been used, the QP is invalid */
+	if (save_qp_state != DAPL_QP_STATE_UNATTACHED) {
+		dat_status = dapls_ib_qp_free(ia_ptr, ep_ptr);
+		/* This should always succeed, but report to the user if
+		 * there is a problem. The qp_state must be restored so
+		 * they can try it again in the face of EINTR or similar
+		 * where the QP is OK but the call couldn't complete.
+		 */
+		if (dat_status != DAT_SUCCESS) {
+			ep_ptr->qp_state = save_qp_state;
+			goto bail;
+		}
+	}
+
+	/* Free the resource */
+	dapl_ep_dealloc(ep_ptr);
+
+      bail:
+	return dat_status;
+
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_get_status.c b/dapl/common/dapl_ep_get_status.c
new file mode 100644
index 0000000..6880f6f
--- /dev/null
+++ b/dapl/common/dapl_ep_get_status.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_get_status.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ring_buffer_util.h"
+#include "dapl_cookie.h"
+
+/*
+ * dapl_ep_get_status
+ *
+ * DAPL Requirements Version xxx, 6.5.4
+ *
+ * Provide the consumer with a quick snapshot of the Endpoint.
+ * The snapshot consists of Endpoint state and DTO information.
+ *
+ * Input:
+ *	ep_handle
+ *
+ * Output:
+ *	ep_state
+ *	in_dto_idle
+ *	out_dto_idle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_ep_get_status(IN DAT_EP_HANDLE ep_handle,
+		   OUT DAT_EP_STATE * ep_state,
+		   OUT DAT_BOOLEAN * in_dto_idle,
+		   OUT DAT_BOOLEAN * out_dto_idle)
+{
+	DAPL_EP *ep_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_get_status (%p, %p, %p, %p)\n",
+		     ep_handle, ep_state, in_dto_idle, out_dto_idle);
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+	dat_status = DAT_SUCCESS;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	/*
+	 * Gather state info for user
+	 */
+	if (ep_state != NULL) {
+		*ep_state = ep_ptr->param.ep_state;
+	}
+
+	if (in_dto_idle != NULL) {
+		*in_dto_idle = dapls_cb_pending(&ep_ptr->recv_buffer);
+	}
+
+	if (out_dto_idle != NULL) {
+		*out_dto_idle = dapls_cb_pending(&ep_ptr->req_buffer);
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_modify.c b/dapl/common/dapl_ep_modify.c
new file mode 100644
index 0000000..9f0095f
--- /dev/null
+++ b/dapl/common/dapl_ep_modify.c
@@ -0,0 +1,642 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_modify.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.0 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_cookie.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * Internal prototypes
+ */
+
+static _INLINE_ DAT_RETURN
+dapli_ep_modify_validate_parameters(IN DAT_EP_HANDLE ep_handle,
+				    IN DAT_EP_PARAM_MASK ep_param_mask,
+				    IN const DAT_EP_PARAM * ep_param,
+				    OUT DAPL_IA ** ia_ptr,
+				    OUT DAPL_EP ** ep_ptr,
+				    OUT DAT_EP_ATTR * ep_attr_ptr);
+
+/*
+ * dapl_ep_modify
+ *
+ * DAPL Requirements Version xxx, 6.5.6
+ *
+ * Provide the consumer parameters, including attributes and status of
+ * the Endpoint.
+ *
+ * Input:
+ *	ep_handle
+ *	ep_args_mask
+ *
+ * Output:
+ *	ep_args
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_ATTRIBUTE
+ *	DAT_INVALID_STATE
+ */
+DAT_RETURN DAT_API
+dapl_ep_modify(IN DAT_EP_HANDLE ep_handle,
+	       IN DAT_EP_PARAM_MASK ep_param_mask,
+	       IN const DAT_EP_PARAM * ep_param)
+{
+	DAPL_IA *ia;
+	DAPL_EP *ep1, *ep2;
+	DAT_EP_ATTR ep_attr1 = { 0 }, ep_attr2 = {
+	0};
+	DAPL_EP new_ep, copy_of_old_ep;
+	DAPL_EP alloc_ep;	/* Holder for resources.  */
+	DAPL_PZ *tmp_pz;
+	DAPL_EVD *tmp_evd;
+	DAT_RETURN dat_status;
+
+	/* Flag indicating we've allocated a new one of these.  */
+	DAT_BOOLEAN qp_allocated = DAT_FALSE;
+	DAT_BOOLEAN rqst_cb_allocated = DAT_FALSE;
+	DAT_BOOLEAN recv_cb_allocated = DAT_FALSE;
+
+	/* Flag indicating we've used (assigned to QP) a new one of these.  */
+	DAT_BOOLEAN qp_used = DAT_FALSE;
+	DAT_BOOLEAN rqst_cb_used = DAT_FALSE;
+	DAT_BOOLEAN recv_cb_used = DAT_FALSE;
+
+	dat_status = dapli_ep_modify_validate_parameters(ep_handle,
+							 ep_param_mask,
+							 ep_param,
+							 &ia, &ep1, &ep_attr1);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail;
+	}
+
+	/*
+	 * Setup the alloc_ep with the appropriate parameters (primarily
+	 * for allocating the QP.
+	 */
+	alloc_ep = *ep1;
+	alloc_ep.param.ep_attr = ep_attr1;
+	if (ep_param_mask & DAT_EP_FIELD_PZ_HANDLE) {
+		alloc_ep.param.pz_handle = ep_param->pz_handle;
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_RECV_EVD_HANDLE) {
+		alloc_ep.param.recv_evd_handle = ep_param->recv_evd_handle;
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_REQUEST_EVD_HANDLE) {
+		alloc_ep.param.request_evd_handle =
+		    ep_param->request_evd_handle;
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_CONNECT_EVD_HANDLE) {
+		alloc_ep.param.connect_evd_handle =
+		    ep_param->connect_evd_handle;
+	}
+
+	/*
+	 * Allocate everything that might be needed.
+	 * We allocate separately, and into a different "holding"
+	 * ep, since we a) want the copy of the old ep into the new ep to
+	 * be atomic with the assignment back (under lock), b) want the
+	 * assignment of the allocated materials to be after the copy of the
+	 * old ep into the new ep, and c) don't want the allocation done
+	 * under lock.
+	 */
+	dat_status = dapls_cb_create(&alloc_ep.req_buffer, ep1,	/* For pointer in buffer bool.  */
+				     ep_attr1.max_request_dtos);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail;
+	}
+	rqst_cb_allocated = DAT_TRUE;
+
+	dat_status = dapls_cb_create(&alloc_ep.recv_buffer, ep1,	/* For pointer in buffer bool.  */
+				     ep_attr1.max_recv_dtos);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail;
+	}
+	recv_cb_allocated = DAT_TRUE;
+
+	dat_status = dapls_ib_qp_alloc(ia, &alloc_ep, ep1);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+	qp_allocated = DAT_TRUE;
+
+	/*
+	 * Now we atomically modify the EP, under lock
+	 * There's a lot of work done here, but there should be no
+	 * allocation or blocking.
+	 */
+	dapl_os_lock(&ep1->header.lock);
+
+	/*
+	 * Revalidate parameters; make sure that races haven't
+	 * changed anything important.
+	 */
+	dat_status = dapli_ep_modify_validate_parameters(ep_handle,
+							 ep_param_mask,
+							 ep_param,
+							 &ia, &ep2, &ep_attr2);
+	if (DAT_SUCCESS != dat_status) {
+		dapl_os_unlock(&ep2->header.lock);
+		goto bail;
+	}
+
+	/*
+	 * All of the following should be impossible, if validation
+	 * occurred.  But they're important to the logic of this routine,
+	 * so we check.
+	 */
+	dapl_os_assert(ep1 == ep2);
+	dapl_os_assert(ep_attr2.max_recv_dtos == ep_attr1.max_recv_dtos);
+	dapl_os_assert(ep_attr2.max_request_dtos == ep_attr1.max_request_dtos);
+	dapl_os_assert(ep_attr2.max_recv_iov == ep_attr1.max_recv_iov);
+	dapl_os_assert(ep_attr2.max_request_iov == ep_attr1.max_request_iov);
+
+	copy_of_old_ep = *ep2;
+
+	/*
+	 * Setup new ep.
+	 */
+	new_ep = *ep2;
+	new_ep.param.ep_attr = ep_attr2;
+
+	/*
+	 * We can initialize the PZ and EVD handles from the alloc_ep because
+	 * the only thing that could have changed since we setup the alloc_ep
+	 * is stuff changed by dapl_cr_accept, and neither PZ nor EVD is in that
+	 * list.
+	 */
+	new_ep.param.pz_handle = alloc_ep.param.pz_handle;
+	new_ep.param.recv_evd_handle = alloc_ep.param.recv_evd_handle;
+	new_ep.param.request_evd_handle = alloc_ep.param.request_evd_handle;
+	new_ep.param.connect_evd_handle = alloc_ep.param.connect_evd_handle;
+
+	/* Deal with each of the allocation fields.  */
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_RECV_DTOS
+	    && (ep_param->ep_attr.max_recv_dtos
+		!= ep2->param.ep_attr.max_recv_dtos)) {
+		new_ep.recv_buffer = alloc_ep.recv_buffer;
+		recv_cb_used = DAT_TRUE;
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_DTOS
+	    && (ep_param->ep_attr.max_request_dtos
+		!= ep2->param.ep_attr.max_request_dtos)) {
+		new_ep.req_buffer = alloc_ep.req_buffer;
+		rqst_cb_used = DAT_TRUE;
+	}
+
+	/*
+	 * We need to change the QP only if there already was a QP
+	 * (leave things the way you found them!) and one of the
+	 * following has changed: send/recv EVD, send/recv reqs/IOV max.
+	 */
+	if (DAPL_QP_STATE_UNATTACHED != new_ep.qp_state
+	    && (ep_param_mask
+		& (DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_IOV
+		   | DAT_EP_FIELD_EP_ATTR_MAX_RECV_IOV
+		   | DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_DTOS
+		   | DAT_EP_FIELD_EP_ATTR_MAX_RECV_DTOS
+		   | DAT_EP_FIELD_RECV_EVD_HANDLE
+		   | DAT_EP_FIELD_REQUEST_EVD_HANDLE))) {
+		/*
+		 * We shouldn't be racing with connection establishment
+		 * because the parameter validate routine should protect us,
+		 * but it's an important enough point that we assert it.
+		 */
+		dapl_os_assert((ep2->param.ep_state
+				!= DAT_EP_STATE_PASSIVE_CONNECTION_PENDING)
+			       && (ep2->param.ep_state
+				   != DAT_EP_STATE_ACTIVE_CONNECTION_PENDING));
+
+		new_ep.qp_handle = alloc_ep.qp_handle;
+		new_ep.qpn = alloc_ep.qpn;
+	}
+
+	/*
+	 * The actual assignment, including modifying QP parameters.
+	 * Modifying QP parameters needs to come first, as if it fails
+	 * we need to exit. 
+	 */
+	if (DAPL_QP_STATE_UNATTACHED != new_ep.qp_state) {
+		dat_status = dapls_ib_qp_modify(ia, ep2, &ep_attr2);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_os_unlock(&ep2->header.lock);
+			goto bail;
+		}
+	}
+	*ep2 = new_ep;
+
+	dapl_os_unlock(&ep2->header.lock);
+
+	/*
+	 * Modify reference counts, incrementing new ones
+	 * and then decrementing old ones (so if they're the same
+	 * the refcount never drops to zero).
+	 */
+	tmp_pz = (DAPL_PZ *) new_ep.param.pz_handle;
+	if (NULL != tmp_pz) {
+		dapl_os_atomic_inc(&tmp_pz->pz_ref_count);
+	}
+
+	tmp_evd = (DAPL_EVD *) new_ep.param.recv_evd_handle;
+	if (NULL != tmp_evd) {
+		dapl_os_atomic_inc(&tmp_evd->evd_ref_count);
+	}
+
+	tmp_evd = (DAPL_EVD *) new_ep.param.request_evd_handle;
+	if (NULL != tmp_evd) {
+		dapl_os_atomic_inc(&tmp_evd->evd_ref_count);
+	}
+
+	tmp_evd = (DAPL_EVD *) new_ep.param.connect_evd_handle;
+	if (NULL != tmp_evd) {
+		dapl_os_atomic_inc(&tmp_evd->evd_ref_count);
+	}
+
+	/* decreament the old reference counts */
+	tmp_pz = (DAPL_PZ *) copy_of_old_ep.param.pz_handle;
+	if (NULL != tmp_pz) {
+		dapl_os_atomic_dec(&tmp_pz->pz_ref_count);
+	}
+
+	tmp_evd = (DAPL_EVD *) copy_of_old_ep.param.recv_evd_handle;
+	if (NULL != tmp_evd) {
+		dapl_os_atomic_dec(&tmp_evd->evd_ref_count);
+	}
+
+	tmp_evd = (DAPL_EVD *) copy_of_old_ep.param.request_evd_handle;
+	if (NULL != tmp_evd) {
+		dapl_os_atomic_dec(&tmp_evd->evd_ref_count);
+	}
+
+	tmp_evd = (DAPL_EVD *) copy_of_old_ep.param.connect_evd_handle;
+	if (NULL != tmp_evd) {
+		dapl_os_atomic_dec(&tmp_evd->evd_ref_count);
+	}
+
+      bail:
+	if (qp_allocated) {
+		DAT_RETURN local_dat_status;
+		if (dat_status != DAT_SUCCESS || !qp_used) {
+			local_dat_status = dapls_ib_qp_free(ia, &alloc_ep);
+		} else {
+			local_dat_status =
+			    dapls_ib_qp_free(ia, &copy_of_old_ep);
+		}
+		if (local_dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ep_modify: Failed to free QP; status %x\n",
+				     local_dat_status);
+		}
+	}
+
+	if (rqst_cb_allocated) {
+		if (dat_status != DAT_SUCCESS || !rqst_cb_used) {
+			dapls_cb_free(&alloc_ep.req_buffer);
+		} else {
+			dapls_cb_free(&copy_of_old_ep.req_buffer);
+		}
+	}
+
+	if (recv_cb_allocated) {
+		if (dat_status != DAT_SUCCESS || !recv_cb_used) {
+			dapls_cb_free(&alloc_ep.recv_buffer);
+		} else {
+			dapls_cb_free(&copy_of_old_ep.recv_buffer);
+		}
+	}
+
+	return dat_status;
+}
+
+/*
+ * dapli_ep_modify_validate_parameters
+ *
+ * Validate parameters
+ *
+ * The space for the ep_attr_ptr parameter should be allocated by the
+ * consumer. Upon success, this parameter will contain the current ep
+ * attribute values with the requested modifications made.
+ *
+ */
+
+static DAT_RETURN
+dapli_ep_modify_validate_parameters(IN DAT_EP_HANDLE ep_handle,
+				    IN DAT_EP_PARAM_MASK ep_param_mask,
+				    IN const DAT_EP_PARAM * ep_param,
+				    OUT DAPL_IA ** ia_ptr,
+				    OUT DAPL_EP ** ep_ptr,
+				    OUT DAT_EP_ATTR * ep_attr_ptr)
+{
+	DAPL_IA *ia;
+	DAPL_EP *ep;
+	DAT_EP_ATTR ep_attr;
+	DAT_EP_ATTR ep_attr_limit;
+	DAT_EP_ATTR ep_attr_request;
+	DAT_RETURN dat_status;
+
+	*ia_ptr = NULL;
+	*ep_ptr = NULL;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	ep = (DAPL_EP *) ep_handle;
+	ia = ep->header.owner_ia;
+
+	/*
+	 * Verify parameters valid in current EP state
+	 */
+	if (ep_param_mask & (DAT_EP_FIELD_IA_HANDLE |
+			     DAT_EP_FIELD_EP_STATE |
+			     DAT_EP_FIELD_LOCAL_IA_ADDRESS_PTR |
+			     DAT_EP_FIELD_LOCAL_PORT_QUAL |
+			     DAT_EP_FIELD_REMOTE_IA_ADDRESS_PTR |
+			     DAT_EP_FIELD_REMOTE_PORT_QUAL)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	/*
+	 * Can only change the PZ handle if we are UNCONNECTED or
+	 * TENTATIVE_CONNECTION_PENDING (psp PROVIDER allocated EP)
+	 */
+	if ((ep_param_mask & DAT_EP_FIELD_PZ_HANDLE) &&
+	    (ep->param.ep_state != DAT_EP_STATE_UNCONNECTED &&
+	     ep->param.ep_state != DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, dapls_ep_state_subtype(ep));
+		goto bail;
+	}
+
+	if ((ep_param_mask & (DAT_EP_FIELD_RECV_EVD_HANDLE |
+			      DAT_EP_FIELD_REQUEST_EVD_HANDLE |
+			      DAT_EP_FIELD_CONNECT_EVD_HANDLE |
+			      DAT_EP_FIELD_EP_ATTR_SERVICE_TYPE |
+			      DAT_EP_FIELD_EP_ATTR_MAX_MESSAGE_SIZE |
+			      DAT_EP_FIELD_EP_ATTR_MAX_RDMA_SIZE |
+			      DAT_EP_FIELD_EP_ATTR_QOS |
+			      DAT_EP_FIELD_EP_ATTR_REQUEST_COMPLETION_FLAGS |
+			      DAT_EP_FIELD_EP_ATTR_RECV_COMPLETION_FLAGS |
+			      DAT_EP_FIELD_EP_ATTR_MAX_RECV_DTOS |
+			      DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_DTOS |
+			      DAT_EP_FIELD_EP_ATTR_MAX_RECV_IOV |
+			      DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_IOV)) &&
+	    (ep->param.ep_state != DAT_EP_STATE_UNCONNECTED &&
+	     ep->param.ep_state != DAT_EP_STATE_RESERVED &&
+	     ep->param.ep_state != DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, dapls_ep_state_subtype(ep));
+		goto bail;
+	}
+
+	/*
+	 * Validate handles being modified
+	 */
+	if (ep_param_mask & DAT_EP_FIELD_PZ_HANDLE) {
+		if (ep_param->pz_handle != NULL &&
+		    DAPL_BAD_HANDLE(ep_param->pz_handle, DAPL_MAGIC_PZ)) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_RECV_EVD_HANDLE) {
+		if (ep_param->recv_evd_handle != NULL &&
+		    (DAPL_BAD_HANDLE(ep_param->recv_evd_handle, DAPL_MAGIC_EVD)
+		     || !((DAPL_EVD *) ep_param->recv_evd_handle)->
+		     evd_flags & DAT_EVD_DTO_FLAG))
+		{
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_REQUEST_EVD_HANDLE) {
+		if (ep_param->request_evd_handle != NULL &&
+		    DAPL_BAD_HANDLE(ep_param->request_evd_handle,
+				    DAPL_MAGIC_EVD)) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_CONNECT_EVD_HANDLE) {
+		if (ep_param->connect_evd_handle != NULL &&
+		    DAPL_BAD_HANDLE(ep_param->connect_evd_handle,
+				    DAPL_MAGIC_EVD)
+		    && !(((DAPL_EVD *) ep_param->connect_evd_handle)->
+			 evd_flags & DAT_EVD_CONNECTION_FLAG))
+		{
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		}
+	}
+
+	/*
+	 * Validate the attributes against the HCA limits
+	 */
+	ep_attr = ep->param.ep_attr;
+
+	dapl_os_memzero(&ep_attr_limit, sizeof(DAT_EP_ATTR));
+	dat_status =
+	    dapls_ib_query_hca(ia->hca_ptr, NULL, &ep_attr_limit, NULL);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+
+	ep_attr_request = ep_param->ep_attr;
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_SERVICE_TYPE) {
+		if (ep_attr_request.service_type != DAT_SERVICE_TYPE_RC) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_MESSAGE_SIZE) {
+		if (ep_attr_request.max_mtu_size > ep_attr_limit.max_mtu_size) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		} else {
+			ep_attr.max_mtu_size = ep_attr_request.max_mtu_size;
+		}
+	}
+
+	/* Do nothing if the DAT_EP_FIELD_EP_ATTR_MAX_RDMA_SIZE flag is   */
+	/* set. Each RDMA transport/provider may or may not have a limit  */
+	/* on the size of an RDMA DTO. For InfiniBand, this parameter is  */
+	/* validated in the implementation of the dapls_ib_qp_modify()    */
+	/* function.                                                      */
+	/*                                                                */
+	/*          if ( ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_RDMA_SIZE ) */
+	/*  {                                                         */
+	/*                                                                */
+	/*  }                                                         */
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_QOS) {
+		/* Do nothing, not defined in the spec yet */
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_RECV_COMPLETION_FLAGS) {
+		dat_status =
+		    dapl_ep_check_recv_completion_flags(ep_attr_request.
+							recv_completion_flags);
+		if (dat_status != DAT_SUCCESS)
+		{
+			goto bail;
+		} else {
+			ep_attr.recv_completion_flags =
+			    ep_attr_request.recv_completion_flags;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_REQUEST_COMPLETION_FLAGS) {
+		dat_status =
+		    dapl_ep_check_request_completion_flags(ep_attr_request.
+							   request_completion_flags);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		} else {
+			ep_attr.request_completion_flags =
+			    ep_attr_request.request_completion_flags;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_RECV_DTOS) {
+		if (ep_attr_request.max_recv_dtos > ep_attr_limit.max_recv_dtos
+		    || (ep_param->recv_evd_handle == DAT_HANDLE_NULL
+			&& (ep_attr_request.max_recv_dtos > 0))) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		} else {
+			ep_attr.max_recv_dtos = ep_attr_request.max_recv_dtos;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_DTOS) {
+		if (ep_attr_request.max_request_dtos >
+		    ep_attr_limit.max_request_dtos
+		    || (ep_param->request_evd_handle == DAT_HANDLE_NULL
+			&& (ep_attr_request.max_request_dtos > 0))) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		} else {
+			ep_attr.max_request_dtos =
+			    ep_attr_request.max_request_dtos;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_RECV_IOV) {
+		if (ep_attr_request.max_recv_iov > ep_attr_limit.max_recv_iov) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		} else {
+			ep_attr.max_recv_iov = ep_attr_request.max_recv_iov;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_IOV) {
+		if (ep_attr_request.max_request_iov >
+		    ep_attr_limit.max_request_iov) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		} else {
+			ep_attr.max_request_iov =
+			    ep_attr_request.max_request_iov;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_RDMA_READ_IOV) {
+		if (ep_attr_request.max_rdma_read_iov >
+		    ep_attr_limit.max_rdma_read_iov) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		} else {
+			ep_attr.max_rdma_read_iov =
+			    ep_attr_request.max_rdma_read_iov;
+		}
+	}
+
+	if (ep_param_mask & DAT_EP_FIELD_EP_ATTR_MAX_RDMA_WRITE_IOV) {
+		if (ep_attr_request.max_rdma_write_iov >
+		    ep_attr_limit.max_rdma_write_iov) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		} else {
+			ep_attr.max_rdma_write_iov =
+			    ep_attr_request.max_rdma_write_iov;
+		}
+	}
+
+	*ia_ptr = ia;
+	*ep_ptr = ep;
+	*ep_attr_ptr = ep_attr;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_post_rdma_read.c b/dapl/common/dapl_ep_post_rdma_read.c
new file mode 100644
index 0000000..437cc5a
--- /dev/null
+++ b/dapl/common/dapl_ep_post_rdma_read.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_post_rdma_read.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_ep_util.h"
+
+/*
+ * dapl_ep_post_rdma_read
+ *
+ * DAPL Requirements Version xxx, 6.5.12
+ *
+ * Request the xfer of all data specified by the remote_iov over the
+ * connection of ep handle Endpint into the local_iov
+ *
+ * Input:
+ * 	ep_handle
+ * 	num_segments
+ * 	local_iov
+ * 	user_cookie
+ * 	remote_iov
+ * 	completion_flags
+ *
+ * Output:
+ * 	None.
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_STATE
+ * 	DAT_LENGTH_ERROR
+ * 	DAT_PROTECTION_VIOLATION
+ * 	DAT_PRIVILEGES_VIOLATION
+ */
+DAT_RETURN DAT_API
+dapl_ep_post_rdma_read(IN DAT_EP_HANDLE ep_handle,
+		       IN DAT_COUNT num_segments,
+		       IN DAT_LMR_TRIPLET * local_iov,
+		       IN DAT_DTO_COOKIE user_cookie,
+		       IN const DAT_RMR_TRIPLET * remote_iov,
+		       IN DAT_COMPLETION_FLAGS completion_flags)
+{
+
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_post_rdma_read (%p, %d, %p, %p, %p, %x)\n",
+		     ep_handle,
+		     num_segments,
+		     local_iov,
+		     user_cookie.as_64, remote_iov, completion_flags);
+
+	dat_status = dapl_ep_post_send_req(ep_handle,
+					   num_segments,
+					   local_iov,
+					   user_cookie,
+					   remote_iov,
+					   completion_flags,
+					   DAPL_DTO_TYPE_RDMA_READ,
+					   OP_RDMA_READ);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+		     "dapl_ep_post_rdma_read () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
diff --git a/dapl/common/dapl_ep_post_rdma_read_to_rmr.c b/dapl/common/dapl_ep_post_rdma_read_to_rmr.c
new file mode 100755
index 0000000..ff84db0
--- /dev/null
+++ b/dapl/common/dapl_ep_post_rdma_read_to_rmr.c
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_post_rdma_read_rmr.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 2.0 API, Chapter 6, section 6
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_ep_util.h"
+
+/*
+ * dapl_ep_post_rdma_read_to_rmr
+ *
+ * DAPL Requirements Version xxx, 6.6.24
+ *
+ * Requests the transfer of all the data specified by the remote_buffer 
+ * over the connection of the ep_handle Endpoint into the local_iov 
+ * specified by the RMR segments.
+ *
+ * Input:
+ *	ep_handle
+ *	num_segments
+ *	local_iov
+ *	user_cookie
+ *	completion_flags
+ *	invalidate flag
+ *	RMR context  
+ *
+ * Output:
+ *	None
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_STATE
+ *	DAT_LENGTH_ERROR
+ *	DAT_PROTECTION_VIOLATION
+ *	DAT_PRIVILEGES_VIOLATION
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API dapl_ep_post_rdma_read_to_rmr(IN DAT_EP_HANDLE ep_handle,	/* ep_handle            */
+						 IN const DAT_RMR_TRIPLET * local,	/* local_iov            */
+						 IN DAT_DTO_COOKIE cookie,	/* user_cookie          */
+						 IN const DAT_RMR_TRIPLET * remote,	/* remote_iov           */
+						 IN DAT_COMPLETION_FLAGS flags)
+{				/* completion_flags     */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_post_rdma_write.c b/dapl/common/dapl_ep_post_rdma_write.c
new file mode 100644
index 0000000..b8bea97
--- /dev/null
+++ b/dapl/common/dapl_ep_post_rdma_write.c
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_post_rdma_write.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_ep_util.h"
+
+/*
+ * dapl_ep_post_rdma_write
+ *
+ * DAPL Requirements Version xxx, 6.5.13
+ *
+ * Request the xfer of all data specified by the local_iov over the
+ * connection of ep handle Endpint into the remote_iov
+ *
+ * Input:
+ * 	ep_handle
+ * 	num_segments
+ * 	local_iov
+ * 	user_cookie
+ * 	remote_iov
+ * 	compltion_flags
+ *
+ * Output:
+ * 	None.
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ *	DAT_LENGTH_ERROR
+ *	DAT_PROTECTION_VIOLATION
+ *	DAT_PRIVILEGES_VIOLATION
+ */
+DAT_RETURN DAT_API
+dapl_ep_post_rdma_write(IN DAT_EP_HANDLE ep_handle,
+			IN DAT_COUNT num_segments,
+			IN DAT_LMR_TRIPLET * local_iov,
+			IN DAT_DTO_COOKIE user_cookie,
+			IN const DAT_RMR_TRIPLET * remote_iov,
+			IN DAT_COMPLETION_FLAGS completion_flags)
+{
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_post_rdma_write (%p, %d, %p, %p, %p, %x)\n",
+		     ep_handle,
+		     num_segments,
+		     local_iov,
+		     user_cookie.as_64, remote_iov, completion_flags);
+
+	dat_status = dapl_ep_post_send_req(ep_handle,
+					   num_segments,
+					   local_iov,
+					   user_cookie,
+					   remote_iov,
+					   completion_flags,
+					   DAPL_DTO_TYPE_RDMA_WRITE,
+					   OP_RDMA_WRITE);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+		     "dapl_ep_post_rdma_write () returns 0x%x", dat_status);
+
+	return dat_status;
+}
diff --git a/dapl/common/dapl_ep_post_recv.c b/dapl/common/dapl_ep_post_recv.c
new file mode 100644
index 0000000..fe3a605
--- /dev/null
+++ b/dapl/common/dapl_ep_post_recv.c
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_post_recv.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_cookie.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_ep_post_recv
+ *
+ * DAPL Requirements Version xxx, 6.5.11
+ *
+ * Request to receive data over the connection of ep handle into
+ * local_iov
+ *
+ * Input:
+ * 	ep_handle
+ * 	num_segments
+ * 	local_iov
+ * 	user_cookie
+ * 	completion_flags
+ *
+ * Output:
+ * 	None.
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_STATE
+ * 	DAT_PROTECTION_VIOLATION
+ * 	DAT_PROVILEGES_VIOLATION
+ */
+DAT_RETURN DAT_API
+dapl_ep_post_recv(IN DAT_EP_HANDLE ep_handle,
+		  IN DAT_COUNT num_segments,
+		  IN DAT_LMR_TRIPLET * local_iov,
+		  IN DAT_DTO_COOKIE user_cookie,
+		  IN DAT_COMPLETION_FLAGS completion_flags)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_COOKIE *cookie;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_post_recv (%p, %d, %p, %p, %x)\n",
+		     ep_handle,
+		     num_segments,
+		     local_iov, user_cookie.as_64, completion_flags);
+
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Synchronization ok since this buffer is only used for receive
+	 * requests, which aren't allowed to race with each other.
+	 */
+	dat_status = dapls_dto_cookie_alloc(&ep_ptr->recv_buffer,
+					    DAPL_DTO_TYPE_RECV,
+					    user_cookie, &cookie);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail;
+	}
+
+	/*
+	 * Invoke provider specific routine to post DTO
+	 */
+	dat_status =
+	    dapls_ib_post_recv(ep_ptr, cookie, num_segments, local_iov);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapls_cookie_dealloc(&ep_ptr->recv_buffer, cookie);
+	}
+
+      bail:
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+		     "dapl_ep_post_recv () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
diff --git a/dapl/common/dapl_ep_post_send.c b/dapl/common/dapl_ep_post_send.c
new file mode 100644
index 0000000..fc1aade
--- /dev/null
+++ b/dapl/common/dapl_ep_post_send.c
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_post_send.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id: dapl_ep_post_send.c 1364 2005-10-31 18:30:14Z jlentini $
+ **********************************************************************/
+
+#include "dapl_ep_util.h"
+
+/*
+ * dapl_ep_post_send
+ *
+ * DAPL Requirements Version xxx, 6.5.10
+ *
+ * Request a transfer of all the data from the local_iov over
+ * the connection of the ep handle Endpoint to the remote side.
+ *
+ * Input:
+ *	ep_handle
+ *	num_segments
+ *	local_iov
+ *	user_cookie
+ *	completion_flags
+ *
+ * Output:
+ *	None
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ *	DAT_PROTECTION_VIOLATION
+ *	DAT_PRIVILEGES_VIOLATION
+ */
+DAT_RETURN DAT_API
+dapl_ep_post_send(IN DAT_EP_HANDLE ep_handle,
+		  IN DAT_COUNT num_segments,
+		  IN DAT_LMR_TRIPLET * local_iov,
+		  IN DAT_DTO_COOKIE user_cookie,
+		  IN DAT_COMPLETION_FLAGS completion_flags)
+{
+	DAT_RMR_TRIPLET remote_iov = { 0, 0, 0 };
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_post_send (%p, %d, %p, %p, %x)\n",
+		     ep_handle,
+		     num_segments,
+		     local_iov, user_cookie.as_64, completion_flags);
+
+	dat_status = dapl_ep_post_send_req(ep_handle,
+					   num_segments,
+					   local_iov,
+					   user_cookie,
+					   &remote_iov,
+					   completion_flags,
+					   DAPL_DTO_TYPE_SEND, OP_SEND);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+		     "dapl_ep_post_send () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
diff --git a/dapl/common/dapl_ep_post_send_invalidate.c b/dapl/common/dapl_ep_post_send_invalidate.c
new file mode 100755
index 0000000..0589b28
--- /dev/null
+++ b/dapl/common/dapl_ep_post_send_invalidate.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_post_send_invalidate.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 2.0 API, Chapter 6, section 6
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_ep_util.h"
+
+/*
+ * dapl_ep_post_send_invalidate
+ *
+ * DAPL Requirements Version xxx, 6.6.21
+ *
+ * Requests a transfer of all the data from the local_iov over the connection
+ * of the ep_handle Endpoint to the remote side and invalidates the Remote 
+ * Memory Region context.
+ *
+ * Input:
+ *	ep_handle
+ *	num_segments
+ *	local_iov
+ *	user_cookie
+ *	completion_flags
+ *	invalidate flag
+ *	RMR context  
+ *
+ * Output:
+ *	None
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_STATE
+ *	DAT_PROTECTION_VIOLATION
+ *	DAT_PRIVILEGES_VIOLATION
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API dapl_ep_post_send_with_invalidate(IN DAT_EP_HANDLE ep_handle,	/* ep_handle            */
+						     IN DAT_COUNT num_segments,	/* num_segments         */
+						     IN DAT_LMR_TRIPLET * local_iov,	/* local_iov            */
+						     IN DAT_DTO_COOKIE user_cookie,	/* user_cookie          */
+						     IN DAT_COMPLETION_FLAGS flags,	/* completion_flags     */
+						     IN DAT_BOOLEAN invalidate_flag,	/* invalidate_flag      */
+						     IN DAT_RMR_CONTEXT
+						     rmr_context)
+{				/* RMR context          */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_query.c b/dapl/common/dapl_ep_query.c
new file mode 100644
index 0000000..f5f548f
--- /dev/null
+++ b/dapl/common/dapl_ep_query.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_query.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_ep_query
+ *
+ * DAPL Requirements Version xxx, 6.5.5
+ *
+ * Provide the consumer parameters, including attributes and status of
+ * the Endpoint.
+ *
+ * Input:
+ *	ep_handle
+ *	ep_param_mask
+ *
+ * Output:
+ *	ep_param
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_ep_query(IN DAT_EP_HANDLE ep_handle,
+	      IN DAT_EP_PARAM_MASK ep_param_mask, OUT DAT_EP_PARAM * ep_param)
+{
+	DAPL_EP *ep_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ep_query (%p, %x, %p)\n",
+		     ep_handle, ep_param_mask, ep_param);
+
+	dat_status = DAT_SUCCESS;
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	if (ep_param == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	/*
+	 * Fill in according to user request
+	 *
+	 * N.B. Just slam all values into the user structure, there
+	 *      is nothing to be gained by checking for each bit.
+	 */
+	if (ep_param_mask & DAT_EP_FIELD_ALL) {
+		/* only attempt to get remote IA address if consumer requested it */
+		if (ep_param_mask & DAT_EP_FIELD_REMOTE_IA_ADDRESS_PTR) {
+			if (ep_ptr->param.ep_state == DAT_EP_STATE_CONNECTED) {
+				/* obtain the remote IP address */
+				dat_status =
+				    dapls_ib_cm_remote_addr((DAT_HANDLE)
+							    ep_handle,
+							    &ep_ptr->
+							    remote_ia_address);
+			}
+			ep_ptr->param.remote_ia_address_ptr =
+			    (DAT_IA_ADDRESS_PTR) & ep_ptr->remote_ia_address;
+		}
+		*ep_param = ep_ptr->param;
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_recv_query.c b/dapl/common/dapl_ep_recv_query.c
new file mode 100644
index 0000000..55621c4
--- /dev/null
+++ b/dapl/common/dapl_ep_recv_query.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_recv_query.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.2 API, Chapter 6, section 6.11
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ep_util.h"
+
+/*
+ * dapl_ep_recv_query
+ *
+ * uDAPL Version 1.2, 6.6.11
+ *
+ * Destroy an instance of the Endpoint
+ *
+ * Input:
+ *	ep_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_HANDLE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_ep_recv_query(IN DAT_EP_HANDLE ep_handle,
+		   OUT DAT_COUNT * nbufs_allocate,
+		   OUT DAT_COUNT * bufs_alloc_span)
+{
+	DAPL_EP *ep_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_ep_recv_query (%p, %p, %p)\n",
+		     ep_handle, nbufs_allocate, bufs_alloc_span);
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	dat_status = DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+
+      bail:
+	return dat_status;
+
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_reset.c b/dapl/common/dapl_ep_reset.c
new file mode 100644
index 0000000..c5a0506
--- /dev/null
+++ b/dapl/common/dapl_ep_reset.c
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ep_reset.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5.13
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ring_buffer_util.h"
+
+/*
+ * dapl_ep_reset
+ *
+ * DAPL Requirements Version 1.1, 6.5.13
+ *
+ * Reset the QP attached to this Endpoint, transitioning back to the
+ * INIT state
+ *
+ * Input:
+ *	ep_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ */
+DAT_RETURN DAT_API dapl_ep_reset(IN DAT_EP_HANDLE ep_handle)
+{
+	DAPL_EP *ep_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	if (ep_ptr->param.ep_state != DAT_EP_STATE_UNCONNECTED
+	    && ep_ptr->param.ep_state != DAT_EP_STATE_DISCONNECTED) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      dapls_ep_state_subtype(ep_ptr));
+		goto bail;
+	}
+
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED) {
+		dapls_ib_reinit_ep(ep_ptr);
+		ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_set_watermark.c b/dapl/common/dapl_ep_set_watermark.c
new file mode 100644
index 0000000..3bceed7
--- /dev/null
+++ b/dapl/common/dapl_ep_set_watermark.c
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_set_watermark.c
+ *
+ * PURPOSE: Endpoint management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.2 API, Chapter 6, section 6.13
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ep_util.h"
+
+/*
+ * dapl_ep_set_watermark
+ *
+ * DAPL Requirements Version 1.2, 6.6.13
+ *
+ * Sets the watermark values for an EP for generating asynchronous
+ * events.
+ *
+ * Input:
+ *	ep_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_HANDLE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_ep_set_watermark(IN DAT_EP_HANDLE ep_handle,
+		      IN DAT_COUNT soft_high_watermark,
+		      IN DAT_COUNT hard_high_watermark)
+{
+	DAPL_EP *ep_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_ep_set_watermark (%p, %d, %d)\n",
+		     ep_handle, soft_high_watermark, hard_high_watermark);
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(ep_ptr, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	dat_status = DAT_NOT_IMPLEMENTED;
+
+      bail:
+	return dat_status;
+
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_util.c b/dapl/common/dapl_ep_util.c
new file mode 100644
index 0000000..a50a6cb
--- /dev/null
+++ b/dapl/common/dapl_ep_util.c
@@ -0,0 +1,585 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_util.c
+ *
+ * PURPOSE: Manage EP Info structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_ep_util.h"
+#include "dapl_ring_buffer_util.h"
+#include "dapl_cookie.h"
+#include "dapl_adapter_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_cr_util.h"	/* for callback routine */
+
+/*
+ * Local definitions
+ */
+/*
+ * Default number of I/O operations on an end point
+ */
+#define IB_IO_DEFAULT	16
+/*
+ * Default number of scatter/gather entries available to a single
+ * post send/recv
+ */
+#define IB_IOV_DEFAULT	4
+
+/*
+ * Default number of RDMA operations in progress at a time
+ */
+#define IB_RDMA_DEFAULT	4
+
+extern void dapli_ep_default_attrs(IN DAPL_EP * ep_ptr);
+
+char *dapl_get_ep_state_str(DAT_EP_STATE state)
+{
+#ifdef DAPL_DBG
+	static char *state_str[DAT_EP_STATE_CONNECTED_MULTI_PATH + 1] = {
+		"DAT_EP_STATE_UNCONNECTED",	/* quiescent state */
+		"DAT_EP_STATE_UNCONFIGURED_UNCONNECTED",
+		"DAT_EP_STATE_RESERVED",
+		"DAT_EP_STATE_UNCONFIGURED_RESERVED",
+		"DAT_EP_STATE_PASSIVE_CONNECTION_PENDING",
+		"DAT_EP_STATE_UNCONFIGURED_PASSIVE",
+		"DAT_EP_STATE_ACTIVE_CONNECTION_PENDING",
+		"DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING",
+		"DAT_EP_STATE_UNCONFIGURED_TENTATIVE",
+		"DAT_EP_STATE_CONNECTED",
+		"DAT_EP_STATE_DISCONNECT_PENDING",
+		"DAT_EP_STATE_DISCONNECTED",
+		"DAT_EP_STATE_COMPLETION_PENDING",
+		"DAT_EP_STATE_CONNECTED_SINGLE_PATH",
+		"DAT_EP_STATE_CONNECTED_MULTI_PATH"
+	};
+	return state_str[state];
+#else
+	static char buf[12];
+	sprintf(buf, "%d", state);
+	return buf;
+#endif
+}
+
+/*
+ * dapl_ep_alloc
+ *
+ * alloc and initialize an EP INFO struct
+ *
+ * Input:
+ * 	IA INFO struct ptr
+ *
+ * Output:
+ * 	ep_ptr
+ *
+ * Returns:
+ * 	none
+ *
+ */
+DAPL_EP *dapl_ep_alloc(IN DAPL_IA * ia_ptr, IN const DAT_EP_ATTR * ep_attr)
+{
+	DAPL_EP *ep_ptr;
+
+	/* Allocate EP */
+	ep_ptr =
+	    (DAPL_EP *) dapl_os_alloc(sizeof(DAPL_EP) + sizeof(DAT_SOCK_ADDR));
+	if (ep_ptr == NULL) {
+		goto bail;
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(ep_ptr, sizeof(DAPL_EP) + sizeof(DAT_SOCK_ADDR));
+
+#ifdef DAPL_COUNTERS
+	/* Allocate counters */
+	ep_ptr->cntrs =
+	    dapl_os_alloc(sizeof(DAT_UINT64) * DCNT_EP_ALL_COUNTERS);
+	if (ep_ptr->cntrs == NULL) {
+		dapl_os_free(ep_ptr, sizeof(DAPL_EP) + sizeof(DAT_SOCK_ADDR));
+		return (NULL);
+	}
+	dapl_os_memzero(ep_ptr->cntrs,
+			sizeof(DAT_UINT64) * DCNT_EP_ALL_COUNTERS);
+#endif				/* DAPL_COUNTERS */
+
+	/*
+	 * initialize the header
+	 */
+	ep_ptr->header.provider = ia_ptr->header.provider;
+	ep_ptr->header.magic = DAPL_MAGIC_EP;
+	ep_ptr->header.handle_type = DAT_HANDLE_TYPE_EP;
+	ep_ptr->header.owner_ia = ia_ptr;
+	ep_ptr->header.user_context.as_64 = 0;
+	ep_ptr->header.user_context.as_ptr = NULL;
+
+	dapl_llist_init_entry(&ep_ptr->header.ia_list_entry);
+	dapl_os_lock_init(&ep_ptr->header.lock);
+
+	/*
+	 * Initialize the body
+	 */
+	/*
+	 * Set up default parameters if the user passed in a NULL
+	 */
+	if (ep_attr == NULL) {
+		dapli_ep_default_attrs(ep_ptr);
+	} else {
+		ep_ptr->param.ep_attr = *ep_attr;
+	}
+
+	/*
+	 * IBM OS API specific fields
+	 */
+	ep_ptr->qp_handle = IB_INVALID_HANDLE;
+	ep_ptr->qpn = 0;
+	ep_ptr->qp_state = DAPL_QP_STATE_UNATTACHED;
+	ep_ptr->cm_handle = IB_INVALID_HANDLE;
+
+	if (DAT_SUCCESS != dapls_cb_create(&ep_ptr->req_buffer,
+					   ep_ptr,
+					   ep_ptr->param.ep_attr.
+					   max_request_dtos)) {
+		dapl_ep_dealloc(ep_ptr);
+		ep_ptr = NULL;
+		goto bail;
+	}
+
+	if (DAT_SUCCESS != dapls_cb_create(&ep_ptr->recv_buffer,
+					   ep_ptr,
+					   ep_ptr->param.ep_attr.max_recv_dtos))
+	{
+		dapl_ep_dealloc(ep_ptr);
+		ep_ptr = NULL;
+		goto bail;
+	}
+
+	dapls_io_trc_alloc(ep_ptr);
+
+      bail:
+	return ep_ptr;
+}
+
+/*
+ * dapl_ep_dealloc
+ *
+ * Free the passed in EP structure.
+ *
+ * Input:
+ * 	entry point pointer
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ep_dealloc(IN DAPL_EP * ep_ptr)
+{
+	dapl_os_assert(ep_ptr->header.magic == DAPL_MAGIC_EP);
+
+	ep_ptr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+
+	dapls_cb_free(&ep_ptr->req_buffer);
+	dapls_cb_free(&ep_ptr->recv_buffer);
+
+	if (NULL != ep_ptr->cxn_timer) {
+		dapl_os_free(ep_ptr->cxn_timer, sizeof(DAPL_OS_TIMER));
+	}
+#if defined(_WIN32) || defined(_WIN64)
+	if (ep_ptr->ibal_cm_handle) {
+		dapl_os_free(ep_ptr->ibal_cm_handle,
+			     sizeof(*ep_ptr->ibal_cm_handle));
+		ep_ptr->ibal_cm_handle = NULL;
+	}
+#endif
+
+#ifdef DAPL_COUNTERS
+	dapl_os_free(ep_ptr->cntrs, sizeof(DAT_UINT64) * DCNT_EP_ALL_COUNTERS);
+#endif				/* DAPL_COUNTERS */
+
+	dapl_os_free(ep_ptr, sizeof(DAPL_EP) + sizeof(DAT_SOCK_ADDR));
+}
+
+/*
+ * dapl_ep_default_attrs
+ *
+ * Set default values in the parameter fields
+ *
+ * Input:
+ * 	entry point pointer
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapli_ep_default_attrs(IN DAPL_EP * ep_ptr)
+{
+	DAT_EP_ATTR ep_attr_limit;
+	DAT_EP_ATTR *ep_attr;
+	DAT_RETURN dat_status;
+
+	ep_attr = &ep_ptr->param.ep_attr;
+	/* Set up defaults */
+	dapl_os_memzero(ep_attr, sizeof(DAT_EP_ATTR));
+
+	/* mtu and rdma sizes fixed in IB as per IBTA 1.1, 9.4.3, 9.4.4, 9.7.7.  */
+	ep_attr->max_mtu_size = 0x80000000;
+	ep_attr->max_rdma_size = 0x80000000;
+
+	ep_attr->qos = DAT_QOS_BEST_EFFORT;
+	ep_attr->service_type = DAT_SERVICE_TYPE_RC;
+	ep_attr->max_recv_dtos = IB_IO_DEFAULT;
+	ep_attr->max_request_dtos = IB_IO_DEFAULT;
+	ep_attr->max_recv_iov = IB_IOV_DEFAULT;
+	ep_attr->max_request_iov = IB_IOV_DEFAULT;
+	ep_attr->max_rdma_read_in = IB_RDMA_DEFAULT;
+	ep_attr->max_rdma_read_out = IB_RDMA_DEFAULT;
+
+	/*
+	 * Configure the EP as a standard completion type, which will be
+	 * used by the EVDs. A threshold of 1 is the default state of an
+	 * EVD.
+	 */
+	ep_attr->request_completion_flags = DAT_COMPLETION_EVD_THRESHOLD_FLAG;
+	ep_attr->recv_completion_flags = DAT_COMPLETION_EVD_THRESHOLD_FLAG;
+	/*
+	 * Unspecified defaults:
+	 *    - ep_privileges: No RDMA capabilities
+	 *    - num_transport_specific_params: none
+	 *    - transport_specific_params: none
+	 *    - num_provider_specific_params: 0
+	 *    - provider_specific_params: 0
+	 */
+
+	dat_status = dapls_ib_query_hca(ep_ptr->header.owner_ia->hca_ptr,
+					NULL, &ep_attr_limit, NULL);
+	/* check against HCA maximums */
+	if (dat_status == DAT_SUCCESS) {
+		ep_ptr->param.ep_attr.max_mtu_size =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_mtu_size,
+			     ep_attr_limit.max_mtu_size);
+		ep_ptr->param.ep_attr.max_rdma_size =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_rdma_size,
+			     ep_attr_limit.max_rdma_size);
+		ep_ptr->param.ep_attr.max_recv_dtos =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_recv_dtos,
+			     ep_attr_limit.max_recv_dtos);
+		ep_ptr->param.ep_attr.max_request_dtos =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_request_dtos,
+			     ep_attr_limit.max_request_dtos);
+		ep_ptr->param.ep_attr.max_recv_iov =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_recv_iov,
+			     ep_attr_limit.max_recv_iov);
+		ep_ptr->param.ep_attr.max_request_iov =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_request_iov,
+			     ep_attr_limit.max_request_iov);
+		ep_ptr->param.ep_attr.max_rdma_read_in =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_rdma_read_in,
+			     ep_attr_limit.max_rdma_read_in);
+		ep_ptr->param.ep_attr.max_rdma_read_out =
+		    DAPL_MIN(ep_ptr->param.ep_attr.max_rdma_read_out,
+			     ep_attr_limit.max_rdma_read_out);
+	}
+}
+
+DAT_RETURN dapl_ep_check_recv_completion_flags(DAT_COMPLETION_FLAGS flags)
+{
+
+	/*
+	 * InfiniBand will not allow signal suppression for RECV completions,
+	 * see the 1.0.1 spec section 10.7.3.1, 10.8.6.
+	 * N.B. SIGNALLED has a different meaning in dapl than it does
+	 *      in IB; IB SIGNALLED is the same as DAPL SUPPRESS. DAPL
+	 *      SIGNALLED simply means the user will not get awakened when
+	 *      an EVD completes, even though the dapl handler is invoked.
+	 */
+
+	if (flags & DAT_COMPLETION_SUPPRESS_FLAG) {
+		return DAT_INVALID_PARAMETER;
+	}
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN dapl_ep_check_request_completion_flags(DAT_COMPLETION_FLAGS flags)
+{
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapl_ep_post_send_req(IN DAT_EP_HANDLE ep_handle,
+		      IN DAT_COUNT num_segments,
+		      IN DAT_LMR_TRIPLET * local_iov,
+		      IN DAT_DTO_COOKIE user_cookie,
+		      IN const DAT_RMR_TRIPLET * remote_iov,
+		      IN DAT_COMPLETION_FLAGS completion_flags,
+		      IN DAPL_DTO_TYPE dto_type, IN int op_type)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_COOKIE *cookie;
+	DAT_RETURN dat_status;
+
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/*
+	 * Synchronization ok since this buffer is only used for send
+	 * requests, which aren't allowed to race with each other.
+	 */
+	dat_status = dapls_dto_cookie_alloc(&ep_ptr->req_buffer,
+					    dto_type, user_cookie, &cookie);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " dapl_post_req resource ERR:"
+			 " dtos pending = %d, max_dtos %d, max_cb %d hd %d tl %d\n",
+			 dapls_cb_pending(&ep_ptr->req_buffer),
+			 ep_ptr->param.ep_attr.max_request_dtos,
+			 ep_ptr->req_buffer.pool_size,
+			 ep_ptr->req_buffer.head, ep_ptr->req_buffer.tail);
+
+		goto bail;
+	}
+
+	/*
+	 * Invoke provider specific routine to post DTO
+	 */
+	dat_status = dapls_ib_post_send(ep_ptr,
+					op_type,
+					cookie,
+					num_segments,
+					local_iov,
+					remote_iov, completion_flags);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapls_cookie_dealloc(&ep_ptr->req_buffer, cookie);
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * dapli_ep_timeout
+ *
+ * If this routine is invoked before a connection occurs, generate an
+ * event
+ */
+void dapls_ep_timeout(uintptr_t arg)
+{
+	DAPL_EP *ep_ptr;
+	ib_cm_events_t ib_cm_event;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, "--> dapls_ep_timeout! ep %lx\n", arg);
+
+	ep_ptr = (DAPL_EP *) arg;
+
+	/* reset the EP state */
+	ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+
+	/* Clean up the EP and put the underlying QP into the ERROR state.
+	 * The disconnect_clean interface requires the provided dependent 
+	 *cm event number.
+	 */
+	ib_cm_event = dapls_ib_get_cm_event(DAT_CONNECTION_EVENT_DISCONNECTED);
+	dapls_ib_disconnect_clean(ep_ptr, DAT_TRUE, ib_cm_event);
+
+	(void)dapls_evd_post_connection_event((DAPL_EVD *) ep_ptr->param.
+					      connect_evd_handle,
+					      DAT_CONNECTION_EVENT_TIMED_OUT,
+					      (DAT_HANDLE) ep_ptr, 0, 0);
+}
+
+/*
+ * dapls_ep_state_subtype
+ *
+ * Return the INVALID_STATE connection subtype associated with an
+ * INVALID_STATE on an EP. Strictly for error reporting.
+ */
+DAT_RETURN_SUBTYPE dapls_ep_state_subtype(IN DAPL_EP * ep_ptr)
+{
+	DAT_RETURN_SUBTYPE dat_status;
+
+	switch (ep_ptr->param.ep_state) {
+	case DAT_EP_STATE_UNCONNECTED:
+		{
+			dat_status = DAT_INVALID_STATE_EP_UNCONNECTED;
+			break;
+		}
+	case DAT_EP_STATE_RESERVED:
+		{
+			dat_status = DAT_INVALID_STATE_EP_RESERVED;
+			break;
+		}
+	case DAT_EP_STATE_PASSIVE_CONNECTION_PENDING:
+		{
+			dat_status = DAT_INVALID_STATE_EP_PASSCONNPENDING;
+			break;
+		}
+	case DAT_EP_STATE_ACTIVE_CONNECTION_PENDING:
+		{
+			dat_status = DAT_INVALID_STATE_EP_ACTCONNPENDING;
+			break;
+		}
+	case DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING:
+		{
+			dat_status = DAT_INVALID_STATE_EP_TENTCONNPENDING;
+			break;
+		}
+	case DAT_EP_STATE_CONNECTED:
+		{
+			dat_status = DAT_INVALID_STATE_EP_CONNECTED;
+			break;
+		}
+	case DAT_EP_STATE_DISCONNECT_PENDING:
+		{
+			dat_status = DAT_INVALID_STATE_EP_DISCPENDING;
+			break;
+		}
+	case DAT_EP_STATE_DISCONNECTED:
+		{
+			dat_status = DAT_INVALID_STATE_EP_DISCONNECTED;
+			break;
+		}
+	case DAT_EP_STATE_COMPLETION_PENDING:
+		{
+			dat_status = DAT_INVALID_STATE_EP_COMPLPENDING;
+			break;
+		}
+
+	default:
+		{
+			dat_status = 0;
+			break;
+		}
+	}
+
+	return dat_status;
+}
+
+#ifdef DAPL_DBG_IO_TRC
+/* allocate trace buffer */
+void dapls_io_trc_alloc(DAPL_EP * ep_ptr)
+{
+	DAT_RETURN dat_status;
+	int i;
+	struct io_buf_track *ibt;
+
+	ep_ptr->ibt_dumped = 0;	/* bool to control how often we print */
+	dat_status = dapls_rbuf_alloc(&ep_ptr->ibt_queue, DBG_IO_TRC_QLEN);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+	ibt =
+	    (struct io_buf_track *)dapl_os_alloc(sizeof(struct io_buf_track) *
+						 DBG_IO_TRC_QLEN);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapls_rbuf_destroy(&ep_ptr->ibt_queue);
+		goto bail;
+	}
+	ep_ptr->ibt_base = ibt;
+	dapl_os_memzero(ibt, sizeof(struct io_buf_track) * DBG_IO_TRC_QLEN);
+
+	/* add events to free event queue */
+	for (i = 0; i < DBG_IO_TRC_QLEN; i++) {
+		dapls_rbuf_add(&ep_ptr->ibt_queue, ibt++);
+	}
+      bail:
+	return;
+}
+#endif				/* DAPL_DBG_IO_TRC */
+
+/*
+ * Generate a disconnect event on abruct close for older verbs providers 
+ * that do not do it automatically.
+ */
+
+void
+dapl_ep_legacy_post_disconnect(DAPL_EP * ep_ptr,
+			       DAT_CLOSE_FLAGS disconnect_flags)
+{
+	ib_cm_events_t ib_cm_event;
+	DAPL_CR *cr_ptr;
+
+	/*
+	 * Acquire the lock and make sure we didn't get a callback
+	 * that cleaned up.
+	 */
+	dapl_os_lock(&ep_ptr->header.lock);
+	if (disconnect_flags == DAT_CLOSE_ABRUPT_FLAG &&
+	    ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECT_PENDING) {
+		/*
+		 * If this is an ABRUPT close, the provider will not generate
+		 * a disconnect message so we do it manually here. Just invoke
+		 * the CM callback as it will clean up the appropriate
+		 * data structures, reset the state, and generate the event
+		 * on the way out. Obtain the provider dependent cm_event to 
+		 * pass into the callback for a disconnect.
+		 */
+		ib_cm_event =
+		    dapls_ib_get_cm_event(DAT_CONNECTION_EVENT_DISCONNECTED);
+
+		cr_ptr = ep_ptr->cr_ptr;
+		dapl_os_unlock(&ep_ptr->header.lock);
+
+		if (cr_ptr != NULL) {
+			dapl_dbg_log(DAPL_DBG_TYPE_API | DAPL_DBG_TYPE_CM,
+				     "    dapl_ep_disconnect force callback on EP %p CM handle %x\n",
+				     ep_ptr, cr_ptr->ib_cm_handle);
+
+			dapls_cr_callback(cr_ptr->ib_cm_handle,
+					  ib_cm_event, NULL, cr_ptr->sp_ptr);
+		} else {
+			dapl_evd_connection_callback(ep_ptr->cm_handle,
+						     ib_cm_event,
+						     NULL, (void *)ep_ptr);
+		}
+	} else {
+		dapl_os_unlock(&ep_ptr->header.lock);
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ep_util.h b/dapl/common/dapl_ep_util.h
new file mode 100644
index 0000000..7ac4061
--- /dev/null
+++ b/dapl/common/dapl_ep_util.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_ep_util.h
+ *
+ * PURPOSE: Utility defs & routines for the EP data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_EP_UTIL_H_
+#define _DAPL_EP_UTIL_H_
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+/* function prototypes */
+
+extern DAPL_EP * 
+dapl_ep_alloc (
+    IN DAPL_IA			*ia,
+    IN const DAT_EP_ATTR	*ep_attr );
+
+extern void 
+dapl_ep_dealloc (
+    IN DAPL_EP			*ep_ptr );
+
+extern DAT_RETURN 
+dapl_ep_check_recv_completion_flags (
+    DAT_COMPLETION_FLAGS        flags );
+
+extern DAT_RETURN 
+dapl_ep_check_request_completion_flags (
+    DAT_COMPLETION_FLAGS        flags );
+
+extern DAT_RETURN
+dapl_ep_post_send_req (
+    IN	DAT_EP_HANDLE		ep_handle,
+    IN	DAT_COUNT		num_segments,
+    IN	DAT_LMR_TRIPLET		*local_iov,
+    IN	DAT_DTO_COOKIE		user_cookie,
+    IN	const DAT_RMR_TRIPLET	*remote_iov,
+    IN	DAT_COMPLETION_FLAGS	completion_flags,
+    IN  DAPL_DTO_TYPE 		dto_type,
+    IN  int			op_type );
+
+void dapls_ep_timeout (uintptr_t	arg );
+
+DAT_RETURN_SUBTYPE
+dapls_ep_state_subtype(
+    IN  DAPL_EP			*ep_ptr );
+
+extern void
+dapl_ep_legacy_post_disconnect(
+    DAPL_EP		*ep_ptr,
+    DAT_CLOSE_FLAGS	disconnect_flags);
+
+extern char *dapl_get_ep_state_str(DAT_EP_STATE state);
+ 
+#endif /*  _DAPL_EP_UTIL_H_ */
diff --git a/dapl/common/dapl_evd_connection_callb.c b/dapl/common/dapl_evd_connection_callb.c
new file mode 100644
index 0000000..e2fb93b
--- /dev/null
+++ b/dapl/common/dapl_evd_connection_callb.c
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_evd_connection_callback.c
+ *
+ * PURPOSE: implements connection callbacks
+ *
+ * Description: Accepts asynchronous callbacks from the Communications Manager
+ *              for EVDs that have been specified as the connection_evd.
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_timer_util.h"
+
+/*
+ * dapl_evd_connection_callback
+ *
+ * Connection callback function for ACTIVE connection requests; callbacks
+ * generated by the Connection Manager in response to issuing a
+ * connect call.
+ *
+ * Input:
+ * 	ib_cm_handle,
+ * 	ib_cm_event
+ *	private_data_ptr
+ * 	context (evd)
+ *	cr_pp
+ *
+ * Output:
+ * 	None
+ *
+ */
+
+void
+dapl_evd_connection_callback(IN dp_ib_cm_handle_t ib_cm_handle,
+			     IN const ib_cm_events_t ib_cm_event,
+			     IN const void *private_data_ptr,
+			     IN const void *context)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_EVD *evd_ptr;
+	DAPL_PRIVATE *prd_ptr;
+	DAT_EVENT_NUMBER dat_event_num;
+	DAT_RETURN dat_status;
+	int private_data_size;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM | DAPL_DBG_TYPE_CALLBACK,
+		     "--> dapl_evd_connection_callback: ctxt: %p event: %x cm_handle %p\n",
+		     context, ib_cm_event, (void *)ib_cm_handle);
+
+	/*
+	 * Determine the type of handle passed back to us in the context
+	 * and sort out key parameters.
+	 */
+	if (context == NULL
+	    || ((DAPL_HEADER *) context)->magic != DAPL_MAGIC_EP) {
+		return;
+	}
+
+	/*
+	 * Active side of the connection, context is an EP and
+	 * PSP is irrelevant.
+	 */
+	ep_ptr = (DAPL_EP *) context;
+	evd_ptr = (DAPL_EVD *) ep_ptr->param.connect_evd_handle;
+	DAPL_CNTR(evd_ptr, DCNT_EVD_CONN_CALLBACK);
+
+	prd_ptr = (DAPL_PRIVATE *) private_data_ptr;
+	private_data_size = 0;
+	/*
+	 * All operations effect the EP, so lock it once and unlock
+	 * when necessary
+	 */
+	dapl_os_lock(&ep_ptr->header.lock);
+
+	/*
+	 * If a connection timer has been set up on this EP, cancel it now
+	 */
+	if (ep_ptr->cxn_timer != NULL) {
+		dapls_timer_cancel(ep_ptr->cxn_timer);
+		dapl_os_free(ep_ptr->cxn_timer, sizeof(DAPL_OS_TIMER));
+		ep_ptr->cxn_timer = NULL;
+	}
+
+	/* Obtain the event number from the provider layer */
+	dat_event_num = dapls_ib_get_dat_event(ib_cm_event, DAT_FALSE);
+
+	switch (dat_event_num) {
+	case DAT_CONNECTION_EVENT_ESTABLISHED:
+		{
+			/* If we don't have an EP at this point we are very screwed
+			 * up
+			 */
+			if (ep_ptr->param.ep_state !=
+			    DAT_EP_STATE_ACTIVE_CONNECTION_PENDING) {
+				/* If someone pulled the plug on the connection, just
+				 * exit
+				 */
+				dapl_os_unlock(&ep_ptr->header.lock);
+				dat_status = DAT_SUCCESS;
+				break;
+			}
+			ep_ptr->param.ep_state = DAT_EP_STATE_CONNECTED;
+			ep_ptr->cm_handle = ib_cm_handle;
+			if (prd_ptr == NULL) {
+				private_data_size = 0;
+			} else {
+				private_data_size =
+				    dapls_ib_private_data_size(prd_ptr,
+							       DAPL_PDATA_CONN_REP,
+							       ep_ptr->header.
+							       owner_ia->
+							       hca_ptr);
+			}
+
+			if (private_data_size > 0) {
+				/* copy in the private data */
+				dapl_os_memcpy(ep_ptr->private.private_data,
+					       prd_ptr->private_data,
+					       DAPL_MIN(private_data_size,
+							DAPL_MAX_PRIVATE_DATA_SIZE));
+			}
+			dapl_os_unlock(&ep_ptr->header.lock);
+
+			break;
+		}
+	case DAT_CONNECTION_EVENT_PEER_REJECTED:
+		{
+			/* peer reject may include private data */
+			if (prd_ptr != NULL)
+				private_data_size =
+				    dapls_ib_private_data_size(prd_ptr,
+							       DAPL_PDATA_CONN_REJ,
+							       ep_ptr->header.
+							       owner_ia->
+							       hca_ptr);
+
+			if (private_data_size > 0)
+				dapl_os_memcpy(ep_ptr->private.private_data,
+					       prd_ptr->private_data,
+					       DAPL_MIN(private_data_size,
+							DAPL_MAX_PRIVATE_DATA_SIZE));
+
+			dapl_dbg_log(DAPL_DBG_TYPE_CM | DAPL_DBG_TYPE_CALLBACK,
+				     "dapl_evd_connection_callback PEER REJ pd=%p sz=%d\n",
+				     prd_ptr, private_data_size);
+		}
+	case DAT_CONNECTION_EVENT_DISCONNECTED:
+	case DAT_CONNECTION_EVENT_UNREACHABLE:
+	case DAT_CONNECTION_EVENT_NON_PEER_REJECTED:
+		{
+			ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+			dapls_ib_disconnect_clean(ep_ptr, DAT_TRUE,
+						  ib_cm_event);
+			dapl_os_unlock(&ep_ptr->header.lock);
+
+			break;
+		}
+	case DAT_CONNECTION_EVENT_BROKEN:
+	case DAT_CONNECTION_EVENT_TIMED_OUT:
+		{
+			ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+			dapls_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+						  ib_cm_event);
+			dapl_os_unlock(&ep_ptr->header.lock);
+
+			break;
+		}
+	case DAT_CONNECTION_REQUEST_EVENT:
+	default:
+		{
+			dapl_os_unlock(&ep_ptr->header.lock);
+			evd_ptr = NULL;
+
+			dapl_os_assert(0);	/* shouldn't happen */
+			break;
+		}
+	}
+
+	/*
+	 * Post the event
+	 * If the EP has been freed, the evd_ptr will be NULL
+	 */
+	if (evd_ptr != NULL) {
+		dat_status = dapls_evd_post_connection_event(evd_ptr, dat_event_num, (DAT_HANDLE) ep_ptr, private_data_size,	/* CONNECTED or REJECT */
+							     ep_ptr->private.
+							     private_data);
+
+		if (dat_status != DAT_SUCCESS &&
+		    dat_event_num == DAT_CONNECTION_EVENT_ESTABLISHED) {
+			/* We can't tell the user we are connected, something
+			 * is wrong locally. Just kill the connection and
+			 * reset the state to DISCONNECTED as we don't
+			 * expect a callback on an ABRUPT disconnect.
+			 */
+			dapls_ib_disconnect(ep_ptr, DAT_CLOSE_ABRUPT_FLAG);
+			dapl_os_lock(&ep_ptr->header.lock);
+			ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+			dapl_os_unlock(&ep_ptr->header.lock);
+		}
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM | DAPL_DBG_TYPE_CALLBACK,
+		     "dapl_evd_connection_callback () returns\n");
+
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_evd_cq_async_error_callb.c b/dapl/common/dapl_evd_cq_async_error_callb.c
new file mode 100644
index 0000000..258f8f2
--- /dev/null
+++ b/dapl/common/dapl_evd_cq_async_error_callb.c
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_cq_async_error_callback.c
+ *
+ * PURPOSE: implements CQ async_callbacks from verbs
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+
+/*
+ * dapl_evd_cq_async_error_callback
+ *
+ * The callback function registered with verbs for cq async errors
+ *
+ * Input:
+ * 	ib_cm_handle,
+ * 	ib_cm_event
+ * 	cause_ptr
+ * 	context (evd)
+ *
+ * Output:
+ * 	None
+ *
+ */
+
+void
+dapl_evd_cq_async_error_callback(IN ib_hca_handle_t ib_hca_handle,
+				 IN ib_cq_handle_t ib_cq_handle,
+				 IN ib_error_record_t * cause_ptr,
+				 IN void *context)
+{
+	DAPL_EVD *async_evd;
+	DAPL_EVD *evd;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION,
+		     "dapl_evd_cq_async_error_callback (%p, %p, %p, %p)\n",
+		     ib_hca_handle, ib_cq_handle, cause_ptr, context);
+
+	if (NULL == context) {
+		dapl_os_panic("NULL == context\n");
+	}
+
+	evd = (DAPL_EVD *) context;
+	async_evd = evd->header.owner_ia->async_error_evd;
+	DAPL_CNTR(evd->header.owner_ia, DCNT_IA_ASYNC_CQ_ERROR);
+
+	dat_status = dapls_evd_post_async_error_event(async_evd,
+						      DAT_ASYNC_ERROR_EVD_OVERFLOW,
+						      (DAT_IA_HANDLE)
+						      async_evd->header.
+						      owner_ia);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_os_panic("async EVD overflow\n");
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION,
+		     "dapl_evd_cq_async_error_callback () returns\n");
+}
diff --git a/dapl/common/dapl_evd_dequeue.c b/dapl/common/dapl_evd_dequeue.c
new file mode 100644
index 0000000..7632fe1
--- /dev/null
+++ b/dapl/common/dapl_evd_dequeue.c
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_dequeue.c
+ *
+ * PURPOSE: Event Management
+ *
+ * Description:  Interfaces in this file are completely described in
+ *               the uDAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ring_buffer_util.h"
+#include "dapl_evd_util.h"
+
+/*
+ * dapl_evd_dequeue
+ * 
+ * DAPL Requirements Version xxx, 6.3.2.7
+ * 
+ * Remove first element from an event dispatcher
+ * 
+ * Input:
+ * 	evd_handle
+ * 
+ * Output:
+ * 	event
+ * 
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_STATE
+ * 	DAT_QUEUE_EMPTY
+ */
+
+DAT_RETURN DAT_API dapl_evd_dequeue(IN DAT_EVD_HANDLE evd_handle,
+				    OUT DAT_EVENT * event)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_EVENT *local_event;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_evd_dequeue (%p, %p)\n", evd_handle, event);
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+
+	if (event == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+	DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE);
+
+	/*
+	 * We need to dequeue under lock, as the IB OS Access API
+	 * restricts us from having multiple threads in CQ poll, and the
+	 * DAPL 1.1 API allows multiple threads in dat_evd_dequeue()
+	 */
+	dapl_os_lock(&evd_ptr->header.lock);
+
+	/*
+	 * Make sure there are no other waiters and the evd is active.
+	 * Currently this means only the OPEN state is allowed.
+	 */
+	if (evd_ptr->evd_state != DAPL_EVD_STATE_OPEN ||
+	    evd_ptr->catastrophic_overflow) {
+		dapl_os_unlock(&evd_ptr->header.lock);
+		dat_status = DAT_ERROR(DAT_INVALID_STATE, 0);
+		goto bail;
+	}
+
+	/*
+	 * Try the EVD rbuf first; poll from the CQ only if that's empty.
+	 * This keeps events in order if dat_evd_wait() has copied events
+	 * from CQ to EVD.  
+	 */
+	local_event =
+	    (DAT_EVENT *) dapls_rbuf_remove(&evd_ptr->pending_event_queue);
+	if (local_event != NULL) {
+		*event = *local_event;
+		dat_status = dapls_rbuf_add(&evd_ptr->free_event_queue,
+					    local_event);
+		DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE_FOUND);
+
+	} else if (evd_ptr->ib_cq_handle != IB_INVALID_HANDLE) {
+		dat_status = dapls_evd_cq_poll_to_event(evd_ptr, event);
+		DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE_POLL);
+	} else {
+		dat_status = DAT_ERROR(DAT_QUEUE_EMPTY, 0);
+		DAPL_CNTR(evd_ptr, DCNT_EVD_DEQUEUE_NOT_FOUND);
+	}
+
+	dapl_os_unlock(&evd_ptr->header.lock);
+      bail:
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+		     "dapl_evd_dequeue () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
diff --git a/dapl/common/dapl_evd_dto_callb.c b/dapl/common/dapl_evd_dto_callb.c
new file mode 100755
index 0000000..2f0d106
--- /dev/null
+++ b/dapl/common/dapl_evd_dto_callb.c
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_dto_callback.c
+ *
+ * PURPOSE: implements DTO callbacks from verbs
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_cno_util.h"
+#include "dapl_cookie.h"
+#include "dapl_adapter_util.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+/*********************************************************************
+ *                                                                   *
+ * Function Definitions                                              *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * dapl_evd_dto_callback
+ *
+ * Input:
+ * 	hca_handle_in, 
+ * 	cq_handle_in, 
+ *      user_context_cq_p
+ *
+ * Output:
+ *	none
+ *
+ * This is invoked for both DTO and MW bind completions. Strictly 
+ * speaking it is an event callback rather than just a DTO callback. 
+ *
+ */
+
+void
+dapl_evd_dto_callback(IN ib_hca_handle_t hca_handle,
+		      IN ib_cq_handle_t cq_handle, IN void *user_context)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+	DAPL_EVD_STATE state;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "dapl_evd_dto_callback(%p, %p, %p)\n",
+		     hca_handle, cq_handle, user_context);
+
+	evd_ptr = (DAPL_EVD *) user_context;
+	DAPL_CNTR(evd_ptr, DCNT_EVD_DTO_CALLBACK);
+
+	dapl_os_assert(hca_handle ==
+		       evd_ptr->header.owner_ia->hca_ptr->ib_hca_handle);
+	dapl_os_assert(evd_ptr->ib_cq_handle == cq_handle);
+	dapl_os_assert(evd_ptr->header.magic == DAPL_MAGIC_EVD);
+
+	/* Read once.  */
+	state = *(volatile DAPL_EVD_STATE *)&evd_ptr->evd_state;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+		     "-- dapl_evd_dto_callback: CQ %p, state %x\n",
+		     (void *)evd_ptr->ib_cq_handle, state);
+
+	/*
+	 * This function does not dequeue from the CQ; only the consumer
+	 * can do that. Instead, it wakes up waiters if any exist.
+	 * It rearms the completion only if completions should always occur
+	 * (specifically if a CNO is associated with the EVD and the
+	 * EVD is enabled.
+	 */
+
+	if (state == DAPL_EVD_STATE_WAITED) {
+		/*
+		 * If we could, it would be best to avoid this wakeup
+		 * (and the context switch) unless the number of events/CQs
+		 * waiting for the waiter was its threshold.  We don't
+		 * currently have the ability to determine that without
+		 * dequeueing the events, and we can't do that for
+		 * synchronization reasons (racing with the waiter waking
+		 * up and dequeuing, sparked by other callbacks).
+		 */
+
+		/*
+		 * We don't need to worry about taking the lock for the
+		 * wakeup because wakeups are sticky.
+		 */
+#ifdef CQ_WAIT_OBJECT
+		if (evd_ptr->cq_wait_obj_handle)
+			dapls_ib_wait_object_wakeup(evd_ptr->
+						    cq_wait_obj_handle);
+		else
+#endif
+			dapl_os_wait_object_wakeup(&evd_ptr->wait_object);
+
+	} else if (state == DAPL_EVD_STATE_OPEN) {
+		DAPL_CNO *cno = evd_ptr->cno_ptr;
+		if (evd_ptr->evd_enabled && (evd_ptr->cno_ptr != NULL)) {
+			/*
+			 * Re-enable callback, *then* trigger.
+			 * This guarantees we won't miss any events.
+			 */
+			dat_status = dapls_ib_completion_notify(hca_handle,
+								evd_ptr,
+								IB_NOTIFY_ON_NEXT_COMP);
+
+			if (DAT_SUCCESS != dat_status) {
+				(void)dapls_evd_post_async_error_event(evd_ptr->
+								       header.
+								       owner_ia->
+								       async_error_evd,
+								       DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR,
+								       (DAT_IA_HANDLE)
+								       evd_ptr->
+								       header.
+								       owner_ia);
+			}
+
+			dapl_internal_cno_trigger(cno, evd_ptr);
+		}
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN, "dapl_evd_dto_callback () returns\n");
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_evd_free.c b/dapl/common/dapl_evd_free.c
new file mode 100755
index 0000000..43f2fee
--- /dev/null
+++ b/dapl/common/dapl_evd_free.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_evd_free.c
+ *
+ * PURPOSE: Event management
+ * Description: Interfaces in this file are completely described in
+ *        the DAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_cno_util.h"	/* for __KDAPL__ */
+
+/*
+ * dapl_evd_free
+ *
+ * DAPL Requirements Version xxx, 6.3.2.2
+ *
+ * Destroy a specific instance of the Event Dispatcher
+ *
+ * Input:
+ *     evd_handle
+ *
+ * Output:
+ *     None
+ *
+ * Returns:
+ *     DAT_SUCCESS
+ *     DAT_INVALID_HANDLE
+ *     DAT_INVALID_STATE
+ */
+DAT_RETURN DAT_API dapl_evd_free(IN DAT_EVD_HANDLE evd_handle)
+{
+	DAPL_EVD *evd_ptr;
+	DAPL_CNO *cno_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_evd_free (%p)\n", evd_handle);
+
+	dat_status = DAT_SUCCESS;
+	evd_ptr = (DAPL_EVD *) evd_handle;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+
+	DAPL_CNTR(evd_ptr->header.owner_ia, DCNT_IA_EVD_FREE);
+
+	if (dapl_os_atomic_read(&evd_ptr->evd_ref_count) != 0) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_EVD_IN_USE);
+		goto bail;
+	}
+
+	/* obtain the cno_ptr before the evd is released, which must occur
+	 * before deallocating the CNO
+	 */
+	cno_ptr = evd_ptr->cno_ptr;
+
+	dapl_ia_unlink_evd(evd_ptr->header.owner_ia, evd_ptr);
+
+	dat_status = dapls_evd_dealloc(evd_ptr);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_ia_link_evd(evd_ptr->header.owner_ia, evd_ptr);
+	}
+#if defined(__KDAPL__)
+	if (cno_ptr != NULL) {
+		if (dapl_os_atomic_read(&cno_ptr->cno_ref_count) > 0
+		    || cno_ptr->cno_waiters > 0) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_STATE,
+				      DAT_INVALID_STATE_EVD_IN_USE);
+			goto bail;
+		}
+		dapl_ia_unlink_cno(cno_ptr->header.owner_ia, cno_ptr);
+		dapl_cno_dealloc(cno_ptr);
+	}
+#else
+	if (cno_ptr != NULL) {
+		if (dapl_os_atomic_read(&cno_ptr->cno_ref_count) == 0
+		    && cno_ptr->cno_waiters > 0) {
+			/*
+			 * Last reference on the CNO, trigger a notice. See
+			 * uDAPL 1.1 spec 6.3.2.3
+			 */
+			dapl_internal_cno_trigger(cno_ptr, NULL);
+		}
+	}
+#endif				/* defined(__KDAPL__) */
+
+      bail:
+	if (dat_status)
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     "dapl_evd_free () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_evd_post_se.c b/dapl/common/dapl_evd_post_se.c
new file mode 100644
index 0000000..52736d0
--- /dev/null
+++ b/dapl/common/dapl_evd_post_se.c
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_post_se.c
+ *
+ * PURPOSE: Event Management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ *              the uDAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dapl_evd_post_se
+ *
+ * DAPL Requirements Version xxx, 6.3.2.7
+ *
+ * Post a software event to the Event Dispatcher event queue.
+ *
+ * Input:
+ * 	evd_handle
+ * 	event
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ */
+
+DAT_RETURN DAT_API dapl_evd_post_se(DAT_EVD_HANDLE evd_handle,
+				    const DAT_EVENT * event)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	/* Only post to EVDs that are specific to software events */
+	if (!(evd_ptr->evd_flags & DAT_EVD_SOFTWARE_FLAG)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+		goto bail;
+	}
+
+	if (!event) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+	if (event->event_number != DAT_SOFTWARE_EVENT) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	dat_status = dapls_evd_post_software_event(evd_ptr,
+						   DAT_SOFTWARE_EVENT,
+						   event->event_data.
+						   software_event_data.pointer);
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_evd_qp_async_error_callb.c b/dapl/common/dapl_evd_qp_async_error_callb.c
new file mode 100644
index 0000000..a9ea4ff
--- /dev/null
+++ b/dapl/common/dapl_evd_qp_async_error_callb.c
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_qp_async_error_callback.c
+ *
+ * PURPOSE: implements QP callbacks from verbs
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_evd_qp_async_error_callback
+ *
+ * The callback function registered with verbs for qp async erros
+ *
+ * Input:
+ * 	ib_cm_handle,
+ * 	ib_cm_event
+ * 	cause_ptr
+ * 	context (evd)
+ *
+ * Output:
+ * 	None
+ *
+ */
+
+void
+dapl_evd_qp_async_error_callback(IN ib_hca_handle_t ib_hca_handle,
+				 IN ib_qp_handle_t ib_qp_handle,
+				 IN ib_error_record_t * cause_ptr,
+				 IN void *context)
+{
+	/*
+	 * This is an affiliated error and hence should be able to 
+	 * supply us with exact information on the error type and QP. 
+	 *
+	 * However the Mellanox and IBM APIs for registering this callback 
+	 * are different. 
+	 *
+	 * The IBM API allows consumers to register the callback with 
+	 *
+	 * ib_int32_t 
+	 * ib_set_qp_async_error_eh_us (
+	 *          ib_hca_handle_t         hca_handle,
+	 *          ib_qp_async_handler_t   handler )
+	 *
+	 * Notice that this function does not take a context. The context is 
+	 * specified per QP in the call to ib_qp_create_us().
+	 *
+	 * In contrast the Mellanox API requires that the context be specified 
+	 * when the funciton is registered:
+	 *
+	 * VAPI_ret_t 
+	 * VAPI_set_async_event_handler (
+	 *          IN VAPI_hca_hndl_t              hca_hndl,
+	 *          IN VAPI_async_event_handler_t   handler,
+	 *          IN void*                        private_data )
+	 *
+	 * Therefore we always specify the context as the asyncronous EVD 
+	 * to be compatible with both APIs.
+	 */
+
+	DAPL_IA *ia_ptr;
+	DAPL_EP *ep_ptr;
+	DAPL_EVD *async_evd;
+	DAT_EVENT_NUMBER async_event;
+	DAT_RETURN dat_status;
+
+#ifdef _VENDOR_IBAL_
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, "%s() IB err %s\n",
+		     __FUNCTION__, ib_get_async_event_str(cause_ptr->code));
+#else
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, "%s() IB async QP err - ctx=%p\n",
+		     __FUNCTION__, context);
+#endif
+
+	ep_ptr = (DAPL_EP *) context;
+	if (!ep_ptr) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR, "%s() NULL context?\n",
+			     __FUNCTION__);
+		return;
+	}
+
+	ia_ptr = ep_ptr->header.owner_ia;
+	async_evd = (DAPL_EVD *) ia_ptr->async_error_evd;
+	DAPL_CNTR(ia_ptr, DCNT_IA_ASYNC_QP_ERROR);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION,
+		     "--> %s: ep %p qp %p (%x) state %d\n", __FUNCTION__,
+		     ep_ptr,
+		     ep_ptr->qp_handle, ep_ptr->qpn, ep_ptr->param.ep_state);
+
+	/*
+	 * Transition to ERROR if we are connected; other states need to
+	 * complete first (e.g. pending states)
+	 */
+	if (ep_ptr->param.ep_state == DAT_EP_STATE_CONNECTED) {
+		ep_ptr->param.ep_state = DAT_EP_STATE_ERROR;
+	}
+
+	dapl_os_assert(async_evd != NULL);
+
+	dat_status = dapls_ib_get_async_event(cause_ptr, &async_event);
+	if (dat_status == DAT_SUCCESS) {
+		/*
+		 * If dapls_ib_get_async_event is not successful,
+		 * an event has been generated by the provide that
+		 * we are not interested in.
+		 */
+		(void)dapls_evd_post_async_error_event(async_evd,
+						       async_event,
+						       async_evd->header.
+						       owner_ia);
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION,
+		     "%s() returns\n", __FUNCTION__);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_evd_resize.c b/dapl/common/dapl_evd_resize.c
new file mode 100644
index 0000000..762fad4
--- /dev/null
+++ b/dapl/common/dapl_evd_resize.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_resize.c
+ *
+ * PURPOSE: EVENT management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ *              the uDAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_ring_buffer_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_evd_resize
+ *
+ * DAPL Requirements Version xxx, 6.3.2.5
+ *
+ * Modify the size of the event queue of an Event Dispatcher
+ *
+ * Input:
+ * 	evd_handle
+ * 	evd_qlen
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_STATE
+ */
+
+DAT_RETURN DAT_API dapl_evd_resize(IN DAT_EVD_HANDLE evd_handle,
+				   IN DAT_COUNT evd_qlen)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_EVD *evd_ptr;
+	DAT_COUNT pend_cnt;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_evd_resize (%p, %d)\n",
+		     evd_handle, evd_qlen);
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE1);
+		goto bail;
+	}
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	ia_ptr = evd_ptr->header.owner_ia;
+
+	if (evd_qlen == evd_ptr->qlen) {
+		dat_status = DAT_SUCCESS;
+		goto bail;
+	}
+
+	if (evd_qlen > ia_ptr->hca_ptr->ia_attr.max_evd_qlen) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	dapl_os_lock(&evd_ptr->header.lock);
+
+	/* Don't try to resize if we are actively waiting */
+	if (evd_ptr->evd_state == DAPL_EVD_STATE_WAITED) {
+		dapl_os_unlock(&evd_ptr->header.lock);
+		dat_status = DAT_ERROR(DAT_INVALID_STATE, 0);
+		goto bail;
+	}
+
+	pend_cnt = dapls_rbuf_count(&evd_ptr->pending_event_queue);
+	if (pend_cnt > evd_qlen) {
+		dapl_os_unlock(&evd_ptr->header.lock);
+		dat_status = DAT_ERROR(DAT_INVALID_STATE, 0);
+		goto bail;
+	}
+
+	dat_status = dapls_ib_cq_resize(evd_ptr->header.owner_ia,
+					evd_ptr, &evd_qlen);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_os_unlock(&evd_ptr->header.lock);
+		goto bail;
+	}
+
+	dat_status = dapls_evd_event_realloc(evd_ptr, evd_qlen);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_os_unlock(&evd_ptr->header.lock);
+		goto bail;
+	}
+
+	dapl_os_unlock(&evd_ptr->header.lock);
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_evd_un_async_error_callb.c b/dapl/common/dapl_evd_un_async_error_callb.c
new file mode 100644
index 0000000..8b3f1bb
--- /dev/null
+++ b/dapl/common/dapl_evd_un_async_error_callb.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_un_async_error_callback.c
+ *
+ * PURPOSE: implements Unaffiliated callbacks from verbs
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_evd_un_async_error_callback
+ *
+ * The callback function registered with verbs for unaffiliated async errors
+ *
+ * Input:
+ * 	ib_cm_handle,
+ * 	ib_cm_event
+ * 	cause_ptr
+ * 	context (evd)
+ *
+ * Output:
+ * 	None
+ *
+ */
+
+void
+dapl_evd_un_async_error_callback(IN ib_hca_handle_t ib_hca_handle,
+				 IN ib_error_record_t * cause_ptr,
+				 IN void *context)
+{
+	DAPL_EVD *async_evd;
+	DAT_EVENT_NUMBER async_event;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION,
+		     "dapl_evd_un_async_error_callback (%p, %p, %p)\n",
+		     ib_hca_handle, cause_ptr, context);
+
+	if (NULL == context) {
+		dapl_os_panic("NULL == context\n");
+		return;
+	}
+
+	async_evd = (DAPL_EVD *) context;
+	DAPL_CNTR(async_evd->header.owner_ia, DCNT_IA_ASYNC_ERROR);
+
+	dat_status = dapls_ib_get_async_event(cause_ptr, &async_event);
+
+	if (dat_status == DAT_SUCCESS) {
+		/*
+		 * If dapls_ib_get_async_event is not successful,
+		 * an event has been generated by the provider that
+		 * we are not interested in. E.g. LINK_UP.
+		 */
+		dapls_evd_post_async_error_event(async_evd,
+						 async_event,
+						 async_evd->header.owner_ia);
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION,
+		     "dapl_evd_un_async_error_callback () returns\n");
+}
diff --git a/dapl/common/dapl_evd_util.c b/dapl/common/dapl_evd_util.c
new file mode 100644
index 0000000..2cfd693
--- /dev/null
+++ b/dapl/common/dapl_evd_util.c
@@ -0,0 +1,1535 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_evd_util.c
+ *
+ * PURPOSE: Manage EVD Info structure
+ *
+ * $Id: dapl_evd_util.c 1410 2006-07-19 17:12:02Z ardavis $
+ **********************************************************************/
+
+#include "dapl_evd_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_cno_util.h"
+#include "dapl_ring_buffer_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_cookie.h"
+#include "dapl.h"
+#include "dapl_cr_util.h"
+#include "dapl_sp_util.h"
+#include "dapl_ep_util.h"
+
+STATIC _INLINE_ void dapli_evd_eh_print_cqe(IN ib_work_completion_t * cqe);
+
+DAT_RETURN dapli_evd_event_alloc(IN DAPL_EVD * evd_ptr, IN DAT_COUNT qlen);
+
+char *dapl_event_str(IN DAT_EVENT_NUMBER event_num)
+{
+#if defined(DAPL_DBG)
+	struct dat_event_str {
+		char *str;
+		DAT_EVENT_NUMBER num;
+	};
+	static struct dat_event_str events[] = {
+		{"DAT_DTO_COMPLETION_EVENT", DAT_DTO_COMPLETION_EVENT},
+		{"DAT_RMR_BIND_COMPLETION_EVENT",
+		 DAT_RMR_BIND_COMPLETION_EVENT},
+		{"DAT_CONNECTION_REQUEST_EVENT", DAT_CONNECTION_REQUEST_EVENT},
+		{"DAT_CONNECTION_EVENT_ESTABLISHED",
+		 DAT_CONNECTION_EVENT_ESTABLISHED},
+		{"DAT_CONNECTION_EVENT_PEER_REJECTED",
+		 DAT_CONNECTION_EVENT_PEER_REJECTED},
+		{"DAT_CONNECTION_EVENT_NON_PEER_REJECTED",
+		 DAT_CONNECTION_EVENT_NON_PEER_REJECTED},
+		{"DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR",
+		 DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR},
+		{"DAT_CONNECTION_EVENT_DISCONNECTED",
+		 DAT_CONNECTION_EVENT_DISCONNECTED},
+		{"DAT_CONNECTION_EVENT_BROKEN", DAT_CONNECTION_EVENT_BROKEN},
+		{"DAT_CONNECTION_EVENT_TIMED_OUT",
+		 DAT_CONNECTION_EVENT_TIMED_OUT},
+		{"DAT_CONNECTION_EVENT_UNREACHABLE",
+		 DAT_CONNECTION_EVENT_UNREACHABLE},
+		{"DAT_ASYNC_ERROR_EVD_OVERFLOW", DAT_ASYNC_ERROR_EVD_OVERFLOW},
+		{"DAT_ASYNC_ERROR_IA_CATASTROPHIC",
+		 DAT_ASYNC_ERROR_IA_CATASTROPHIC},
+		{"DAT_ASYNC_ERROR_EP_BROKEN", DAT_ASYNC_ERROR_EP_BROKEN},
+		{"DAT_ASYNC_ERROR_TIMED_OUT", DAT_ASYNC_ERROR_TIMED_OUT},
+		{"DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR",
+		 DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR},
+		{"DAT_HA_DOWN_TO_1", DAT_HA_DOWN_TO_1},
+		{"DAT_HA_UP_TO_MULTI_PATH", DAT_HA_UP_TO_MULTI_PATH},
+		{"DAT_SOFTWARE_EVENT", DAT_SOFTWARE_EVENT},
+#ifdef DAT_EXTENSIONS
+		{"DAT_EXTENSION_EVENT", DAT_EXTENSION_EVENT},
+		{"DAT_IB_EXTENSION_RANGE_BASE", DAT_IB_EXTENSION_RANGE_BASE},
+		{"DAT_IB_UD_CONNECTION_REQUEST_EVENT",
+		 DAT_IB_EXTENSION_RANGE_BASE + 1},
+		{"DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED",
+		 DAT_IB_EXTENSION_RANGE_BASE + 2},
+		{"DAT_IW_EXTENSION_RANGE_BASE", DAT_IW_EXTENSION_RANGE_BASE},
+#endif				/* DAT_EXTENSIONS */
+		{NULL, 0},
+	};
+	int i;
+
+	for (i = 0; events[i].str; i++) {
+		if (events[i].num == event_num)
+			return events[i].str;
+	}
+	return "Unknown DAT event?";
+#else
+	static char str[16];
+	sprintf(str, "%x", event_num);
+	return str;
+#endif
+}
+
+/*
+ * dapls_evd_internal_create
+ *
+ * actually create the evd.  this is called after all parameter checking
+ * has been performed in dapl_ep_create.  it is also called from dapl_ia_open
+ * to create the default async evd.
+ *
+ * Input:
+ * 	ia_ptr
+ *	cno_ptr
+ *	qlen
+ *	evd_flags
+ *
+ * Output:
+ * 	evd_ptr_ptr
+ *
+ * Returns:
+ * 	none
+ *
+ */
+
+DAT_RETURN
+dapls_evd_internal_create(DAPL_IA * ia_ptr,
+			  DAPL_CNO * cno_ptr,
+			  DAT_COUNT min_qlen,
+			  DAT_EVD_FLAGS evd_flags, DAPL_EVD ** evd_ptr_ptr)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_COUNT cq_len;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+	*evd_ptr_ptr = NULL;
+	cq_len = min_qlen;
+
+	evd_ptr = dapls_evd_alloc(ia_ptr, cno_ptr, evd_flags, min_qlen);
+	if (!evd_ptr) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	/*
+	 * If we are dealing with event streams besides a CQ event stream,
+	 * be conservative and set producer side locking.  Otherwise, no.
+	 */
+	evd_ptr->evd_producer_locking_needed =
+	    ((evd_flags & ~(DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG)) != 0);
+
+	/* Before we setup any callbacks, transition state to OPEN.  */
+	evd_ptr->evd_state = DAPL_EVD_STATE_OPEN;
+
+	if (evd_flags & DAT_EVD_ASYNC_FLAG) {
+		/*
+		 * There is no cq associate with async evd. Set it to invalid
+		 */
+		evd_ptr->ib_cq_handle = IB_INVALID_HANDLE;
+
+	} else if (0 != (evd_flags & ~(DAT_EVD_SOFTWARE_FLAG
+				       | DAT_EVD_CONNECTION_FLAG
+				       | DAT_EVD_CR_FLAG))) {
+#if defined(_VENDOR_IBAL_)
+		/* 
+		 * The creation of CQ required a PD (PZ) associated with it and
+		 * we do not have a PD here; therefore, the work-around is that we
+		 * will postpone the creation of the cq till the creation of QP which
+		 * this cq will associate with.
+		 */
+		evd_ptr->ib_cq_handle = IB_INVALID_HANDLE;
+#else
+		dat_status = dapls_ib_cq_alloc(ia_ptr, evd_ptr, &cq_len);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+
+		/* Now reset the cq_len in the attributes, it may have changed */
+		evd_ptr->qlen = cq_len;
+
+		dat_status =
+		    dapls_ib_setup_async_callback(ia_ptr,
+						  DAPL_ASYNC_CQ_COMPLETION,
+						  evd_ptr,
+						  (ib_async_handler_t)
+						  dapl_evd_dto_callback,
+						  evd_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+
+		dat_status = dapls_set_cq_notify(ia_ptr, evd_ptr);
+
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+#endif				/* _VENDOR_IBAL_ */
+	}
+
+	/* We now have an accurate count of events, so allocate them into
+	 * the EVD
+	 */
+	dat_status = dapli_evd_event_alloc(evd_ptr, cq_len);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+
+	dapl_ia_link_evd(ia_ptr, evd_ptr);
+	*evd_ptr_ptr = evd_ptr;
+
+      bail:
+	if (dat_status != DAT_SUCCESS) {
+		if (evd_ptr) {
+			dapls_evd_dealloc(evd_ptr);
+		}
+	}
+
+	return dat_status;
+}
+
+/*
+ * dapls_evd_alloc
+ *
+ * alloc and initialize an EVD struct
+ *
+ * Input:
+ * 	ia
+ *
+ * Output:
+ * 	evd_ptr
+ *
+ * Returns:
+ * 	none
+ *
+ */
+DAPL_EVD *dapls_evd_alloc(IN DAPL_IA * ia_ptr,
+			  IN DAPL_CNO * cno_ptr,
+			  IN DAT_EVD_FLAGS evd_flags, IN DAT_COUNT qlen)
+{
+	DAPL_EVD *evd_ptr;
+
+	/* Allocate EVD */
+	evd_ptr = (DAPL_EVD *) dapl_os_alloc(sizeof(DAPL_EVD));
+	if (!evd_ptr) {
+		goto bail;
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(evd_ptr, sizeof(DAPL_EVD));
+
+#ifdef DAPL_COUNTERS
+	/* Allocate counters */
+	evd_ptr->cntrs =
+	    dapl_os_alloc(sizeof(DAT_UINT64) * DCNT_EVD_ALL_COUNTERS);
+	if (evd_ptr->cntrs == NULL) {
+		dapl_os_free(evd_ptr, sizeof(DAPL_EVD));
+		return (NULL);
+	}
+	dapl_os_memzero(evd_ptr->cntrs,
+			sizeof(DAT_UINT64) * DCNT_EVD_ALL_COUNTERS);
+#endif				/* DAPL_COUNTERS */
+
+	/*
+	 * initialize the header
+	 */
+	evd_ptr->header.provider = ia_ptr->header.provider;
+	evd_ptr->header.magic = DAPL_MAGIC_EVD;
+	evd_ptr->header.handle_type = DAT_HANDLE_TYPE_EVD;
+	evd_ptr->header.owner_ia = ia_ptr;
+	evd_ptr->header.user_context.as_64 = 0;
+	evd_ptr->header.user_context.as_ptr = NULL;
+	dapl_llist_init_entry(&evd_ptr->header.ia_list_entry);
+	dapl_os_lock_init(&evd_ptr->header.lock);
+
+	/*
+	 * Initialize the body
+	 */
+	evd_ptr->evd_state = DAPL_EVD_STATE_INITIAL;
+	evd_ptr->evd_flags = evd_flags;
+	evd_ptr->evd_enabled = DAT_TRUE;
+	evd_ptr->evd_waitable = DAT_TRUE;
+	evd_ptr->evd_producer_locking_needed = 1;	/* Conservative value.  */
+	evd_ptr->ib_cq_handle = IB_INVALID_HANDLE;
+	dapl_os_atomic_set(&evd_ptr->evd_ref_count, 0);
+	evd_ptr->catastrophic_overflow = DAT_FALSE;
+	evd_ptr->qlen = qlen;
+	evd_ptr->completion_type = DAPL_EVD_STATE_THRESHOLD;	/* FIXME: should be DAPL_EVD_STATE_INIT */
+	dapl_os_wait_object_init(&evd_ptr->wait_object);
+
+#ifdef CQ_WAIT_OBJECT
+	/* Create CQ wait object; no CNO and data stream type */
+	if ((cno_ptr == NULL) &&
+	    ((evd_flags & ~(DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG)) == 0)) {
+		dapls_ib_wait_object_create(evd_ptr,
+					    &evd_ptr->cq_wait_obj_handle);
+		if (evd_ptr->cq_wait_obj_handle == NULL) {
+			dapl_os_free(evd_ptr, sizeof(DAPL_EVD));
+			evd_ptr = NULL;
+			goto bail;
+		}
+	}
+#endif
+
+	evd_ptr->cno_active_count = 0;
+	if (cno_ptr != NULL) {
+		/* Take a reference count on the CNO */
+		dapl_os_atomic_inc(&cno_ptr->cno_ref_count);
+	}
+	evd_ptr->cno_ptr = cno_ptr;
+
+      bail:
+	return evd_ptr;
+}
+
+/*
+ * dapls_evd_event_alloc
+ *
+ * alloc events into an EVD.
+ *
+ * Input:
+ * 	evd_ptr
+ *	qlen
+ *
+ * Output:
+ * 	NONE
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	ERROR
+ *
+ */
+DAT_RETURN dapli_evd_event_alloc(IN DAPL_EVD * evd_ptr, IN DAT_COUNT qlen)
+{
+	DAT_EVENT *event_ptr;
+	DAT_COUNT i;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	/* Allocate EVENTs */
+	event_ptr =
+	    (DAT_EVENT *) dapl_os_alloc(evd_ptr->qlen * sizeof(DAT_EVENT));
+	if (event_ptr == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+	evd_ptr->events = event_ptr;
+
+	/* allocate free event queue */
+	dat_status = dapls_rbuf_alloc(&evd_ptr->free_event_queue, qlen);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+
+	/* allocate pending event queue */
+	dat_status = dapls_rbuf_alloc(&evd_ptr->pending_event_queue, qlen);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+
+	/* add events to free event queue */
+	for (i = 0; i < evd_ptr->qlen; i++) {
+		dapls_rbuf_add(&evd_ptr->free_event_queue, (void *)event_ptr);
+		event_ptr++;
+	}
+
+	evd_ptr->cq_notified = DAT_FALSE;
+	evd_ptr->cq_notified_when = 0;
+	evd_ptr->threshold = 0;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * dapls_evd_event_realloc
+ *
+ * realloc events into an EVD.
+ *
+ * Input:
+ * 	evd_ptr
+ *	qlen
+ *
+ * Output:
+ * 	NONE
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	ERROR
+ *
+ */
+DAT_RETURN dapls_evd_event_realloc(IN DAPL_EVD * evd_ptr, IN DAT_COUNT qlen)
+{
+	DAT_EVENT *events;
+	DAT_COUNT old_qlen;
+	DAT_COUNT i;
+	intptr_t diff;
+	DAT_RETURN dat_status;
+
+	/* Allocate EVENTs */
+	events = (DAT_EVENT *) dapl_os_realloc(evd_ptr->events,
+					       qlen * sizeof(DAT_EVENT));
+	if (NULL == events) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	diff = events - evd_ptr->events;
+	evd_ptr->events = events;
+
+	old_qlen = evd_ptr->qlen;
+	evd_ptr->qlen = qlen;
+
+	/* reallocate free event queue */
+	dat_status = dapls_rbuf_realloc(&evd_ptr->free_event_queue, qlen);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+	dapls_rbuf_adjust(&evd_ptr->free_event_queue, diff);
+
+	/* reallocate pending event queue */
+	dat_status = dapls_rbuf_realloc(&evd_ptr->pending_event_queue, qlen);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+	dapls_rbuf_adjust(&evd_ptr->pending_event_queue, diff);
+
+	/*
+	 * add new events to free event queue. 
+	 */
+	for (i = old_qlen; i < qlen; i++) {
+		dapls_rbuf_add(&evd_ptr->free_event_queue, (void *)&events[i]);
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * dapls_evd_dealloc
+ *
+ * Free the passed in EVD structure. If an error occurs, this function
+ * will clean up all of the internal data structures and report the
+ * error.
+ *
+ * Input:
+ * 	evd_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	status
+ *
+ */
+DAT_RETURN dapls_evd_dealloc(IN DAPL_EVD * evd_ptr)
+{
+	DAT_RETURN dat_status;
+	DAPL_IA *ia_ptr;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_os_assert(evd_ptr->header.magic == DAPL_MAGIC_EVD);
+	dapl_os_assert(dapl_os_atomic_read(&evd_ptr->evd_ref_count) == 0);
+
+	/*
+	 * Destroy the CQ first, to keep any more callbacks from coming
+	 * up from it.
+	 */
+	if (evd_ptr->ib_cq_handle != IB_INVALID_HANDLE) {
+		ia_ptr = evd_ptr->header.owner_ia;
+
+		dat_status = dapls_ib_cq_free(ia_ptr, evd_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+	}
+
+	/*
+	 * We should now be safe to invalidate the EVD; reset the
+	 * magic to prevent reuse.
+	 */
+	evd_ptr->header.magic = DAPL_MAGIC_INVALID;
+
+	/* Release reference on the CNO if it exists */
+	if (evd_ptr->cno_ptr != NULL) {
+		dapl_os_atomic_dec(&evd_ptr->cno_ptr->cno_ref_count);
+		evd_ptr->cno_ptr = NULL;
+	}
+
+	/* If the ring buffer allocation failed, then the dapls_rbuf_destroy   */
+	/* function will detect that the ring buffer's internal data (ex. base */
+	/* pointer) are invalid and will handle the situation appropriately    */
+	dapls_rbuf_destroy(&evd_ptr->free_event_queue);
+	dapls_rbuf_destroy(&evd_ptr->pending_event_queue);
+
+	if (evd_ptr->events) {
+		dapl_os_free(evd_ptr->events,
+			     evd_ptr->qlen * sizeof(DAT_EVENT));
+	}
+
+	dapl_os_wait_object_destroy(&evd_ptr->wait_object);
+
+#ifdef CQ_WAIT_OBJECT
+	if (evd_ptr->cq_wait_obj_handle) {
+		dapls_ib_wait_object_destroy(evd_ptr->cq_wait_obj_handle);
+	}
+#endif
+
+#ifdef DAPL_COUNTERS
+	dapl_os_free(evd_ptr->cntrs,
+		     sizeof(DAT_UINT64) * DCNT_EVD_ALL_COUNTERS);
+#endif				/* DAPL_COUNTERS */
+
+	dapl_os_free(evd_ptr, sizeof(DAPL_EVD));
+
+      bail:
+	return dat_status;
+}
+
+STATIC _INLINE_ char *DAPL_GET_DTO_OP_STR(int op)
+{
+	static char *dto_ops[] = {
+		"OP_SEND",
+		"OP_RECEIVE",
+		"OP_RDMA_WRITE",
+		"OP_RDMA_READ"
+	};
+	return ((op < 0 || op > 3) ? "Invalid DTO OP?" : dto_ops[op]);
+}
+
+#if !defined(DAPL_GET_CQE_OP_STR)
+#define DAPL_GET_CQE_OP_STR(e) "Unknown CEQ OP String?"
+#endif
+#if !defined(DAPL_GET_CQE_VENDOR_ERR)
+#define DAPL_GET_CQE_VENDOR_ERR(e) 0
+#endif
+
+/*
+ * dapli_evd_eh_print_cqe
+ *
+ * Input:
+ *	cqe_ptr
+ *
+ * Output:
+ *	none
+ *
+ * Prints out a CQE for debug purposes
+ *
+ */
+
+void dapli_evd_eh_print_cqe(IN ib_work_completion_t * cqe_ptr)
+{
+#ifdef DAPL_DBG
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n");
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "\t dapl_evd_dto_callback : CQE \n");
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "\t\t work_req_id %lli\n", DAPL_GET_CQE_WRID(cqe_ptr));
+	if (DAPL_GET_CQE_STATUS(cqe_ptr) == 0) {
+		dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+			     "\t\t op_type: %s\n",
+			     DAPL_GET_CQE_OP_STR(cqe_ptr));
+		dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+			     "\t\t bytes_num %d\n",
+			     DAPL_GET_CQE_BYTESNUM(cqe_ptr));
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "\t\t status %d vendor_err 0x%x\n",
+		     DAPL_GET_CQE_STATUS(cqe_ptr),
+		     DAPL_GET_CQE_VENDOR_ERR(cqe_ptr));
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n");
+#endif
+	return;
+}
+
+/*
+ * Event posting code follows.
+ */
+
+/*
+ * These next two functions (dapli_evd_get_event and dapli_evd_post_event)
+ * are a pair.  They are always called together, from one of the functions
+ * at the end of this file (dapl_evd_post_*_event).
+ *
+ * Note that if producer side locking is enabled, the first one takes the
+ * EVD lock and the second releases it.
+ */
+
+/* dapli_evd_get_event
+ *
+ * Get an event struct from the evd.  The caller should fill in the event
+ * and call dapl_evd_post_event.
+ *
+ * If there are no events available, an overflow event is generated to the
+ * async EVD handler.
+ *
+ * If this EVD required producer locking, a successful return implies
+ * that the lock is held.
+ *
+ * Input:
+ * 	evd_ptr
+ *
+ * Output:
+ *	event
+ *
+ */
+
+static DAT_EVENT *dapli_evd_get_event(DAPL_EVD * evd_ptr)
+{
+	DAT_EVENT *event;
+
+	if (evd_ptr->evd_producer_locking_needed) {
+		dapl_os_lock(&evd_ptr->header.lock);
+	}
+
+	event = (DAT_EVENT *) dapls_rbuf_remove(&evd_ptr->free_event_queue);
+
+	/* Release the lock if it was taken and the call failed.  */
+	if (!event && evd_ptr->evd_producer_locking_needed) {
+		dapl_os_unlock(&evd_ptr->header.lock);
+	}
+
+	return event;
+}
+
+/* dapli_evd_post_event
+ *
+ * Post the <event> to the evd.  If possible, invoke the evd's CNO.
+ * Otherwise post the event on the pending queue.
+ *
+ * If producer side locking is required, the EVD lock must be held upon
+ * entry to this function.
+ *
+ * Input:
+ * 	evd_ptr
+ * 	event
+ *
+ * Output:
+ *	none
+ *
+ */
+
+static void
+dapli_evd_post_event(IN DAPL_EVD * evd_ptr, IN const DAT_EVENT * event_ptr)
+{
+	DAT_RETURN dat_status;
+	DAPL_CNO *cno_to_trigger = NULL;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EVD, "%s: Called with event %s\n",
+		     __FUNCTION__, dapl_event_str(event_ptr->event_number));
+
+	dat_status = dapls_rbuf_add(&evd_ptr->pending_event_queue,
+				    (void *)event_ptr);
+	dapl_os_assert(dat_status == DAT_SUCCESS);
+
+	dapl_os_assert(evd_ptr->evd_state == DAPL_EVD_STATE_WAITED
+		       || evd_ptr->evd_state == DAPL_EVD_STATE_OPEN);
+
+	if (evd_ptr->evd_state == DAPL_EVD_STATE_OPEN) {
+		/* No waiter.  Arrange to trigger a CNO if it exists.  */
+
+		if (evd_ptr->evd_enabled) {
+			cno_to_trigger = evd_ptr->cno_ptr;
+		}
+		if (evd_ptr->evd_producer_locking_needed) {
+			dapl_os_unlock(&evd_ptr->header.lock);
+		}
+	} else {
+		/*
+		 * We're in DAPL_EVD_STATE_WAITED.  Take the lock if
+		 * we don't have it, recheck, and signal.
+		 */
+		if (!evd_ptr->evd_producer_locking_needed) {
+			dapl_os_lock(&evd_ptr->header.lock);
+		}
+
+		if (evd_ptr->evd_state == DAPL_EVD_STATE_WAITED
+		    && (dapls_rbuf_count(&evd_ptr->pending_event_queue)
+			>= evd_ptr->threshold)) {
+			dapl_os_unlock(&evd_ptr->header.lock);
+
+#ifdef CQ_WAIT_OBJECT
+			if (evd_ptr->cq_wait_obj_handle)
+				dapls_ib_wait_object_wakeup(evd_ptr->
+							    cq_wait_obj_handle);
+			else
+#endif
+				dapl_os_wait_object_wakeup(&evd_ptr->
+							   wait_object);
+		} else {
+			dapl_os_unlock(&evd_ptr->header.lock);
+		}
+	}
+
+	if (cno_to_trigger != NULL) {
+		dapl_internal_cno_trigger(cno_to_trigger, evd_ptr);
+	}
+}
+
+/* dapli_evd_post_event_nosignal
+ *
+ * Post the <event> to the evd.  Do not do any wakeup processing.
+ * This function should only be called if it is known that there are
+ * no waiters that it is appropriate to wakeup on this EVD.  An example
+ * of such a situation is during internal dat_evd_wait() processing.
+ *
+ * If producer side locking is required, the EVD lock must be held upon
+ * entry to this function.
+ *
+ * Input:
+ * 	evd_ptr
+ * 	event
+ *
+ * Output:
+ *	none
+ *
+ */
+
+static void
+dapli_evd_post_event_nosignal(IN DAPL_EVD * evd_ptr,
+			      IN const DAT_EVENT * event_ptr)
+{
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EVD, "%s: Called with event %s\n",
+		     __FUNCTION__, dapl_event_str(event_ptr->event_number));
+
+	dat_status = dapls_rbuf_add(&evd_ptr->pending_event_queue,
+				    (void *)event_ptr);
+	dapl_os_assert(dat_status == DAT_SUCCESS);
+
+	dapl_os_assert(evd_ptr->evd_state == DAPL_EVD_STATE_WAITED
+		       || evd_ptr->evd_state == DAPL_EVD_STATE_OPEN);
+
+	if (evd_ptr->evd_producer_locking_needed) {
+		dapl_os_unlock(&evd_ptr->header.lock);
+	}
+}
+
+/* dapli_evd_format_overflow_event
+ *
+ * format an overflow event for posting
+ *
+ * Input:
+ * 	evd_ptr
+ * 	event_ptr
+ *
+ * Output:
+ *	none
+ *
+ */
+static void
+dapli_evd_format_overflow_event(IN DAPL_EVD * evd_ptr,
+				OUT DAT_EVENT * event_ptr)
+{
+	DAPL_IA *ia_ptr;
+
+	ia_ptr = evd_ptr->header.owner_ia;
+
+	event_ptr->evd_handle = (DAT_EVD_HANDLE) evd_ptr;
+	event_ptr->event_number = DAT_ASYNC_ERROR_EVD_OVERFLOW;
+	event_ptr->event_data.asynch_error_event_data.dat_handle =
+	    (DAT_HANDLE) ia_ptr;
+}
+
+/* dapli_evd_post_overflow_event
+ *
+ * post an overflow event
+ *
+ * Input:
+ * 	async_evd_ptr
+ * 	evd_ptr
+ *
+ * Output:
+ *	none
+ *
+ */
+static void
+dapli_evd_post_overflow_event(IN DAPL_EVD * async_evd_ptr,
+			      IN DAPL_EVD * overflow_evd_ptr)
+{
+	DAT_EVENT *overflow_event;
+
+	/* The overflow_evd_ptr mght be the same as evd.
+	 * In that case we've got a catastrophic overflow.
+	 */
+	dapl_log(DAPL_DBG_TYPE_WARN,
+		 " WARNING: overflow event on EVD %p/n", overflow_evd_ptr);
+
+	if (async_evd_ptr == overflow_evd_ptr) {
+		async_evd_ptr->catastrophic_overflow = DAT_TRUE;
+		async_evd_ptr->evd_state = DAPL_EVD_STATE_DEAD;
+		return;
+	}
+
+	overflow_event = dapli_evd_get_event(overflow_evd_ptr);
+	if (!overflow_event) {
+		/* this is not good */
+		overflow_evd_ptr->catastrophic_overflow = DAT_TRUE;
+		overflow_evd_ptr->evd_state = DAPL_EVD_STATE_DEAD;
+		return;
+	}
+	dapli_evd_format_overflow_event(overflow_evd_ptr, overflow_event);
+	dapli_evd_post_event(overflow_evd_ptr, overflow_event);
+
+	return;
+}
+
+static DAT_EVENT *dapli_evd_get_and_init_event(IN DAPL_EVD * evd_ptr,
+					       IN DAT_EVENT_NUMBER event_number)
+{
+	DAT_EVENT *event_ptr;
+
+	event_ptr = dapli_evd_get_event(evd_ptr);
+	if (NULL == event_ptr) {
+		dapli_evd_post_overflow_event(evd_ptr->header.owner_ia->
+					      async_error_evd, evd_ptr);
+	} else {
+		event_ptr->evd_handle = (DAT_EVD_HANDLE) evd_ptr;
+		event_ptr->event_number = event_number;
+	}
+
+	return event_ptr;
+}
+
+DAT_RETURN
+dapls_evd_post_cr_arrival_event(IN DAPL_EVD * evd_ptr,
+				IN DAT_EVENT_NUMBER event_number,
+				IN DAT_SP_HANDLE sp_handle,
+				DAT_IA_ADDRESS_PTR ia_address_ptr,
+				DAT_CONN_QUAL conn_qual,
+				DAT_CR_HANDLE cr_handle)
+{
+	DAT_EVENT *event_ptr;
+	event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
+	/*
+	 * Note event lock may be held on successful return
+	 * to be released by dapli_evd_post_event(), if provider side locking
+	 * is needed.
+	 */
+
+	if (event_ptr == NULL) {
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+	}
+
+	event_ptr->event_data.cr_arrival_event_data.sp_handle = sp_handle;
+	event_ptr->event_data.cr_arrival_event_data.local_ia_address_ptr
+	    = ia_address_ptr;
+	event_ptr->event_data.cr_arrival_event_data.conn_qual = conn_qual;
+	event_ptr->event_data.cr_arrival_event_data.cr_handle = cr_handle;
+
+	dapli_evd_post_event(evd_ptr, event_ptr);
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_evd_post_connection_event(IN DAPL_EVD * evd_ptr,
+				IN DAT_EVENT_NUMBER event_number,
+				IN DAT_EP_HANDLE ep_handle,
+				IN DAT_COUNT private_data_size,
+				IN DAT_PVOID private_data)
+{
+	DAT_EVENT *event_ptr;
+	event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
+	/*
+	 * Note event lock may be held on successful return
+	 * to be released by dapli_evd_post_event(), if provider side locking
+	 * is needed.
+	 */
+
+	if (event_ptr == NULL) {
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+	}
+
+	event_ptr->event_data.connect_event_data.ep_handle = ep_handle;
+	event_ptr->event_data.connect_event_data.private_data_size
+	    = private_data_size;
+	event_ptr->event_data.connect_event_data.private_data = private_data;
+
+	dapli_evd_post_event(evd_ptr, event_ptr);
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_evd_post_async_error_event(IN DAPL_EVD * evd_ptr,
+				 IN DAT_EVENT_NUMBER event_number,
+				 IN DAT_IA_HANDLE ia_handle)
+{
+	DAT_EVENT *event_ptr;
+	event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
+	/*
+	 * Note event lock may be held on successful return
+	 * to be released by dapli_evd_post_event(), if provider side locking
+	 * is needed.
+	 */
+	dapl_log(DAPL_DBG_TYPE_WARN,
+		 " WARNING: async event - %s evd=%p/n",
+		 dapl_event_str(event_number), evd_ptr);
+
+	if (event_ptr == NULL) {
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+	}
+
+	event_ptr->event_data.asynch_error_event_data.dat_handle =
+	    (DAT_HANDLE) ia_handle;
+
+	dapli_evd_post_event(evd_ptr, event_ptr);
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_evd_post_software_event(IN DAPL_EVD * evd_ptr,
+			      IN DAT_EVENT_NUMBER event_number,
+			      IN DAT_PVOID pointer)
+{
+	DAT_EVENT *event_ptr;
+	event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
+	/*
+	 * Note event lock may be held on successful return
+	 * to be released by dapli_evd_post_event(), if provider side locking
+	 * is needed.
+	 */
+
+	if (event_ptr == NULL) {
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+	}
+
+	event_ptr->event_data.software_event_data.pointer = pointer;
+
+	dapli_evd_post_event(evd_ptr, event_ptr);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_evd_post_generic_event
+ *
+ * Post a generic event type. Not used by all providers
+ *
+ * Input:
+ *	evd_ptr
+ * 	event_number
+ *	data
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *
+ */
+DAT_RETURN
+dapls_evd_post_generic_event(IN DAPL_EVD * evd_ptr,
+			     IN DAT_EVENT_NUMBER event_number,
+			     IN DAT_EVENT_DATA * data)
+{
+	DAT_EVENT *event_ptr;
+
+	event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
+	/*
+	 * Note event lock may be held on successful return
+	 * to be released by dapli_evd_post_event(), if provider side locking
+	 * is needed.
+	 */
+
+	if (event_ptr == NULL) {
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+	}
+
+	event_ptr->event_data = *data;
+
+	dapli_evd_post_event(evd_ptr, event_ptr);
+
+	return DAT_SUCCESS;
+}
+
+#ifdef DAT_EXTENSIONS
+DAT_RETURN
+dapls_evd_post_cr_event_ext(IN DAPL_SP * sp_ptr,
+			    IN DAT_EVENT_NUMBER event_number,
+			    IN dp_ib_cm_handle_t ib_cm_handle,
+			    IN DAT_COUNT p_size,
+			    IN DAT_PVOID p_data, IN DAT_PVOID ext_data)
+{
+	DAPL_CR *cr_ptr;
+	DAPL_EP *ep_ptr;
+	DAT_EVENT *event_ptr;
+	DAT_SP_HANDLE sp_handle;
+
+	dapl_os_lock(&sp_ptr->header.lock);
+	if (sp_ptr->listening == DAT_FALSE) {
+		dapl_os_unlock(&sp_ptr->header.lock);
+		dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			     "---> post_cr_event_ext: conn event on down SP\n");
+		(void)dapls_ib_reject_connection(ib_cm_handle,
+						 DAT_CONNECTION_EVENT_UNREACHABLE,
+						 0, NULL);
+		return DAT_CONN_QUAL_UNAVAILABLE;
+	}
+
+	/*
+	 * RSP connections only allow a single connection. Close
+	 * it down NOW so we reject any further connections.
+	 */
+	if (sp_ptr->header.handle_type == DAT_HANDLE_TYPE_RSP)
+		sp_ptr->listening = DAT_FALSE;
+
+	dapl_os_unlock(&sp_ptr->header.lock);
+
+	/* allocate new connect request */
+	cr_ptr = dapls_cr_alloc(sp_ptr->header.owner_ia);
+	if (cr_ptr == NULL)
+		return DAT_INSUFFICIENT_RESOURCES;
+
+	/* Set up the CR */
+	cr_ptr->sp_ptr = sp_ptr;	/* maintain sp_ptr in case of reject */
+	cr_ptr->param.remote_port_qual = 0;
+	cr_ptr->ib_cm_handle = ib_cm_handle;
+	cr_ptr->param.remote_ia_address_ptr =
+	    (DAT_IA_ADDRESS_PTR) & cr_ptr->remote_ia_address;
+
+	/*
+	 * Copy the remote address and private data out of the private_data
+	 */
+	cr_ptr->param.private_data = cr_ptr->private_data;
+	cr_ptr->param.private_data_size = p_size;
+	if (p_size)
+		dapl_os_memcpy(cr_ptr->private_data, p_data, p_size);
+
+	/* EP will be NULL unless RSP service point */
+	ep_ptr = (DAPL_EP *) sp_ptr->ep_handle;
+
+	if (sp_ptr->psp_flags == DAT_PSP_PROVIDER_FLAG) {
+		DAPL_IA *ia_ptr;
+		/*
+		 * Never true for RSP connections
+		 *
+		 * Create an EP for the user. If we can't allocate an
+		 * EP we are out of resources and need to tell the
+		 * requestor that we cant help them.
+		 */
+		ia_ptr = sp_ptr->header.owner_ia;
+		ep_ptr = dapl_ep_alloc(ia_ptr, NULL);
+		if (ep_ptr == NULL) {
+			dapls_cr_free(cr_ptr);
+			/* Invoking function will call dapls_ib_cm_reject() */
+			return DAT_INSUFFICIENT_RESOURCES;
+		}
+		ep_ptr->param.ia_handle = ia_ptr;
+		ep_ptr->param.local_ia_address_ptr =
+		    (DAT_IA_ADDRESS_PTR) & ia_ptr->hca_ptr->hca_address;
+
+		/* Link the EP onto the IA */
+		dapl_ia_link_ep(ia_ptr, ep_ptr);
+	}
+
+	cr_ptr->param.local_ep_handle = ep_ptr;
+
+	if (ep_ptr != NULL) {
+		/* Assign valid EP fields: RSP and PSP_PROVIDER_FLAG only */
+		if (sp_ptr->psp_flags == DAT_PSP_PROVIDER_FLAG) {
+			ep_ptr->param.ep_state =
+			    DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING;
+		} else {
+			/* RSP */
+			dapl_os_assert(sp_ptr->header.handle_type ==
+				       DAT_HANDLE_TYPE_RSP);
+			ep_ptr->param.ep_state =
+			    DAT_EP_STATE_PASSIVE_CONNECTION_PENDING;
+		}
+		ep_ptr->cm_handle = ib_cm_handle;
+	}
+
+	/* link the CR onto the SP so we can pick it up later */
+	dapl_sp_link_cr(sp_ptr, cr_ptr);
+
+	/* assign sp_ptr to union to avoid typecast errors from some compilers */
+	sp_handle.psp_handle = (DAT_PSP_HANDLE) sp_ptr;
+
+	/* Post the event.  */
+
+	/*
+	 * Note event lock may be held on successful return
+	 * to be released by dapli_evd_post_event(), if provider side locking
+	 * is needed.
+	 */
+	event_ptr = dapli_evd_get_and_init_event(sp_ptr->evd_handle,
+						 event_number);
+	if (event_ptr == NULL)
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+
+	event_ptr->event_data.cr_arrival_event_data.sp_handle = sp_handle;
+	event_ptr->event_data.cr_arrival_event_data.local_ia_address_ptr =
+	    (DAT_IA_ADDRESS_PTR) & sp_ptr->header.owner_ia->hca_ptr->
+	    hca_address;
+	event_ptr->event_data.cr_arrival_event_data.conn_qual =
+	    sp_ptr->conn_qual;
+	event_ptr->event_data.cr_arrival_event_data.cr_handle =
+	    (DAT_HANDLE) cr_ptr;
+
+	dapl_os_memcpy(&event_ptr->event_extension_data[0], ext_data, 64);
+
+	dapli_evd_post_event(sp_ptr->evd_handle, event_ptr);
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_evd_post_connection_event_ext(IN DAPL_EVD * evd_ptr,
+				    IN DAT_EVENT_NUMBER event_number,
+				    IN DAT_EP_HANDLE ep_handle,
+				    IN DAT_COUNT private_data_size,
+				    IN DAT_PVOID private_data,
+				    IN DAT_PVOID ext_data)
+{
+	DAT_EVENT *event_ptr;
+	event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
+	/*
+	 * Note event lock may be held on successful return
+	 * to be released by dapli_evd_post_event(), if provider side locking
+	 * is needed.
+	 */
+	if (event_ptr == NULL)
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				 DAT_RESOURCE_MEMORY);
+
+	event_ptr->event_data.connect_event_data.ep_handle = ep_handle;
+	event_ptr->event_data.connect_event_data.private_data_size
+	    = private_data_size;
+	event_ptr->event_data.connect_event_data.private_data = private_data;
+
+	dapl_os_memcpy(&event_ptr->event_extension_data[0], ext_data, 64);
+
+	dapli_evd_post_event(evd_ptr, event_ptr);
+
+	return DAT_SUCCESS;
+}
+#endif
+
+/*
+ * dapli_evd_cqe_to_event
+ *
+ * Convert a CQE into an event structure.
+ *
+ * Input:
+ *	evd_ptr
+ * 	cqe_ptr
+ *
+ * Output:
+ * 	event_ptr
+ *
+ * Returns:
+ * 	none
+ *
+ */
+static void
+dapli_evd_cqe_to_event(IN DAPL_EVD * evd_ptr,
+		       IN void *cqe_ptr, OUT DAT_EVENT * event_ptr)
+{
+	DAPL_EP *ep_ptr;
+	DAPL_COOKIE *cookie;
+	DAT_DTO_COMPLETION_STATUS dto_status;
+	DAPL_COOKIE_BUFFER *buffer;
+
+	/*
+	 * All that can be relied on if the status is bad is the status
+	 * and WRID.
+	 */
+	dto_status = dapls_ib_get_dto_status(cqe_ptr);
+
+	cookie = (DAPL_COOKIE *) (uintptr_t) DAPL_GET_CQE_WRID(cqe_ptr);
+	dapl_os_assert((NULL != cookie));
+
+	ep_ptr = cookie->ep;
+	dapl_os_assert((NULL != ep_ptr));
+	if (ep_ptr->header.magic != DAPL_MAGIC_EP) {
+		/* ep may have been freed, just return */
+		return;
+	}
+
+	dapls_io_trc_update_completion(ep_ptr, cookie, dto_status);
+
+	event_ptr->evd_handle = (DAT_EVD_HANDLE) evd_ptr;
+
+	switch (cookie->type) {
+	case DAPL_COOKIE_TYPE_DTO:
+		{
+#ifdef DAT_EXTENSIONS
+			/* Extended via request post or message receive */
+			if ((cookie->val.dto.type == DAPL_DTO_TYPE_EXTENSION) ||
+			    (cookie->val.dto.type == DAPL_DTO_TYPE_RECV &&
+			     DAPL_GET_CQE_OPTYPE(cqe_ptr) != OP_RECEIVE)) {
+				dapls_cqe_to_event_extension(ep_ptr, cookie,
+							     cqe_ptr,
+							     event_ptr);
+				if (cookie->val.dto.type == DAPL_DTO_TYPE_RECV)
+					dapls_cookie_dealloc(&ep_ptr->
+							     recv_buffer,
+							     cookie);
+				else
+					dapls_cookie_dealloc(&ep_ptr->
+							     req_buffer,
+							     cookie);
+				break;
+			}
+#endif
+
+			if (DAPL_DTO_TYPE_RECV == cookie->val.dto.type)
+				buffer = &ep_ptr->recv_buffer;
+			else
+				buffer = &ep_ptr->req_buffer;
+
+			event_ptr->event_number = DAT_DTO_COMPLETION_EVENT;
+			event_ptr->event_data.dto_completion_event_data.
+			    ep_handle = cookie->ep;
+			event_ptr->event_data.dto_completion_event_data.
+			    user_cookie = cookie->val.dto.cookie;
+			event_ptr->event_data.dto_completion_event_data.status =
+			    dto_status;
+
+			if (cookie->val.dto.type == DAPL_DTO_TYPE_SEND ||
+			    cookie->val.dto.type == DAPL_DTO_TYPE_RDMA_WRITE) {
+				/* Get size from DTO; CQE value may be off.  */
+				event_ptr->event_data.dto_completion_event_data.
+				    transfered_length = cookie->val.dto.size;
+			} else {
+				event_ptr->event_data.dto_completion_event_data.
+				    transfered_length =
+				    DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+			}
+
+			dapls_cookie_dealloc(buffer, cookie);
+			break;
+		}
+
+	case DAPL_COOKIE_TYPE_RMR:
+		{
+			event_ptr->event_number = DAT_RMR_BIND_COMPLETION_EVENT;
+
+			event_ptr->event_data.rmr_completion_event_data.
+			    rmr_handle = cookie->val.rmr.rmr;
+			event_ptr->event_data.rmr_completion_event_data.
+			    user_cookie = cookie->val.rmr.cookie;
+			if (dto_status == DAT_DTO_SUCCESS) {
+				event_ptr->event_data.rmr_completion_event_data.
+				    status = DAT_RMR_BIND_SUCCESS;
+				dapl_os_assert((DAPL_GET_CQE_OPTYPE(cqe_ptr)) ==
+					       OP_BIND_MW);
+			} else {
+				dapl_dbg_log(DAPL_DBG_TYPE_DTO_COMP_ERR,
+					     " MW bind completion ERROR: %d: op %#x ep: %p\n",
+					     dto_status,
+					     DAPL_GET_CQE_OPTYPE(cqe_ptr),
+					     ep_ptr);
+				event_ptr->event_data.rmr_completion_event_data.
+				    status = DAT_RMR_OPERATION_FAILED;
+				dapl_os_atomic_dec(&cookie->val.rmr.rmr->lmr->
+						   lmr_ref_count);
+			}
+
+			dapls_cookie_dealloc(&ep_ptr->req_buffer, cookie);
+			break;
+		}
+	default:
+		{
+			dapl_os_assert(!"Invalid Operation type");
+			break;
+		}
+	}			/* end switch */
+
+	/*
+	 * Most error DTO ops result in disconnecting the EP. See
+	 * IBTA Vol 1.1, Chapter 10,Table 68, for expected effect on
+	 * state.
+	 */
+	if ((dto_status != DAT_DTO_SUCCESS) &&
+	    (dto_status != DAT_DTO_ERR_FLUSHED)) {
+		DAPL_EVD *evd_ptr;
+
+		/*
+		 * If we are connected, generate disconnect and generate an
+		 * event. We may be racing with other disconnect ops, so we
+		 * need to check. We may also be racing CM connection events,
+		 * requiring us to check for connection pending states too.
+		 */
+		dapl_os_lock(&ep_ptr->header.lock);
+		if (ep_ptr->param.ep_state == DAT_EP_STATE_CONNECTED ||
+		    ep_ptr->param.ep_state ==
+		    DAT_EP_STATE_ACTIVE_CONNECTION_PENDING
+		    || ep_ptr->param.ep_state ==
+		    DAT_EP_STATE_PASSIVE_CONNECTION_PENDING
+		    || ep_ptr->param.ep_state ==
+		    DAT_EP_STATE_COMPLETION_PENDING)
+		{
+			ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+			dapl_os_unlock(&ep_ptr->header.lock);
+			dapls_io_trc_dump(ep_ptr, cqe_ptr, dto_status);
+
+			/* Let the other side know we have disconnected */
+			(void)dapls_ib_disconnect(ep_ptr,
+						  DAT_CLOSE_ABRUPT_FLAG);
+
+			/* ... and clean up the local side */
+			evd_ptr = (DAPL_EVD *) ep_ptr->param.connect_evd_handle;
+			if (evd_ptr != NULL) {
+				dapls_evd_post_connection_event(evd_ptr,
+								DAT_CONNECTION_EVENT_BROKEN,
+								(DAT_HANDLE)
+								ep_ptr, 0, 0);
+			}
+		} else {
+			dapl_os_unlock(&ep_ptr->header.lock);
+		}
+
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 "DTO completion ERR: status %d, op %s, vendor_err 0x%x - %s\n",
+			 DAPL_GET_CQE_STATUS(cqe_ptr),
+			 DAPL_GET_DTO_OP_STR(cookie->val.dto.type),
+			 DAPL_GET_CQE_VENDOR_ERR(cqe_ptr),
+			 inet_ntoa(((struct sockaddr_in *)&ep_ptr->
+				    remote_ia_address)->sin_addr));
+	}
+}
+
+/*
+ * dapls_evd_copy_cq
+ *
+ * Copy all entries on a CQ associated with the EVD onto that EVD
+ * Up to caller to handle races, if any.  Note that no EVD waiters will
+ * be awoken by this copy.
+ *
+ * Input:
+ *	evd_ptr
+ *
+ * Output:
+ * 	None
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapls_evd_copy_cq(DAPL_EVD * evd_ptr)
+{
+	ib_work_completion_t cur_cqe;
+	DAT_RETURN dat_status;
+	DAT_EVENT *event;
+
+	if (evd_ptr->ib_cq_handle == IB_INVALID_HANDLE) {
+		/* Nothing to do if no CQ.  */
+		return;
+	}
+
+	while (1) {
+		dat_status =
+		    dapls_ib_completion_poll(evd_ptr->header.owner_ia->hca_ptr,
+					     evd_ptr, &cur_cqe);
+
+		if (dat_status != DAT_SUCCESS) {
+			break;
+		}
+
+		/* For debugging.  */
+		dapli_evd_eh_print_cqe(&cur_cqe);
+
+		/*
+		 * Can use DAT_DTO_COMPLETION_EVENT because dapli_evd_cqe_to_event
+		 * will overwrite.
+		 */
+
+		event =
+		    dapli_evd_get_and_init_event(evd_ptr,
+						 DAT_DTO_COMPLETION_EVENT);
+		if (event == NULL) {
+			/* We've already attempted the overflow post; return.  */
+			return;
+		}
+
+		dapli_evd_cqe_to_event(evd_ptr, &cur_cqe, event);
+
+		dapli_evd_post_event_nosignal(evd_ptr, event);
+	}
+
+	if (DAT_GET_TYPE(dat_status) != DAT_QUEUE_EMPTY) {
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     "dapls_evd_copy_cq: dapls_ib_completion_poll returned 0x%x\n",
+			     dat_status);
+		dapl_os_assert(!"Bad return from dapls_ib_completion_poll");
+	}
+}
+
+/*
+ * dapls_evd_cq_poll_to_event
+ *
+ * Attempt to dequeue a single CQE from a CQ and turn it into
+ * an event.
+ *
+ * Input:
+ *	evd_ptr
+ *
+ * Output:
+ * 	event
+ *
+ * Returns:
+ * 	Status of operation
+ *
+ */
+DAT_RETURN
+dapls_evd_cq_poll_to_event(IN DAPL_EVD * evd_ptr, OUT DAT_EVENT * event)
+{
+	DAT_RETURN dat_status;
+	ib_work_completion_t cur_cqe;
+
+	dat_status = dapls_ib_completion_poll(evd_ptr->header.owner_ia->hca_ptr,
+					      evd_ptr, &cur_cqe);
+	if (dat_status == DAT_SUCCESS) {
+		/* For debugging.  */
+		dapli_evd_eh_print_cqe(&cur_cqe);
+
+		dapli_evd_cqe_to_event(evd_ptr, &cur_cqe, event);
+	}
+
+	return dat_status;
+}
+
+#ifdef DAPL_DBG_IO_TRC
+/*
+ * Update I/O completions in the I/O trace buffer. I/O is posted to
+ * the buffer, then we find it here using the cookie and mark it
+ * completed with the completion status
+ */
+void
+dapls_io_trc_update_completion(DAPL_EP * ep_ptr,
+			       DAPL_COOKIE * cookie,
+			       DAT_DTO_COMPLETION_STATUS dto_status)
+{
+	int i;
+	static unsigned int c_cnt = 1;
+
+	for (i = 0; i < DBG_IO_TRC_QLEN; i++) {
+		if (ep_ptr->ibt_base[i].cookie == cookie) {
+			ep_ptr->ibt_base[i].status = dto_status;
+			ep_ptr->ibt_base[i].done = c_cnt++;
+		}
+	}
+}
+
+/*
+ * Dump the I/O trace buffers
+ */
+void
+dapls_io_trc_dump(DAPL_EP * ep_ptr,
+		  void *cqe_ptr, DAT_DTO_COMPLETION_STATUS dto_status)
+{
+	struct io_buf_track *ibt;
+	int i;
+	int cnt;
+
+	dapl_os_printf("DISCONNECTING: dto_status     = %x\n", dto_status);
+	dapl_os_printf("               OpType        = %x\n",
+		       DAPL_GET_CQE_OPTYPE(cqe_ptr));
+	dapl_os_printf("               Bytes         = %x\n",
+		       DAPL_GET_CQE_BYTESNUM(cqe_ptr));
+	dapl_os_printf("               WRID (cookie) = %llx\n",
+		       DAPL_GET_CQE_WRID(cqe_ptr));
+
+	if (ep_ptr->ibt_dumped == 0) {
+
+		dapl_os_printf("EP %p (qpn %d) I/O trace buffer\n",
+			       ep_ptr, ep_ptr->qpn);
+
+		ep_ptr->ibt_dumped = 1;
+		ibt =
+		    (struct io_buf_track *)dapls_rbuf_remove(&ep_ptr->
+							     ibt_queue);
+		cnt = DBG_IO_TRC_QLEN;
+		while (ibt != NULL && cnt > 0) {
+			dapl_os_printf
+			    ("%2d. %3s (%2d, %d) OP: %x cookie %p wqe %p rmv_target_addr %llx rmv_rmr_context %x\n",
+			     cnt, ibt->done == 0 ? "WRK" : "DON", ibt->status,
+			     ibt->done, ibt->op_type, ibt->cookie, ibt->wqe,
+			     ibt->remote_iov.target_address,
+			     ibt->remote_iov.rmr_context);
+			for (i = 0; i < 3; i++) {
+				if (ibt->iov[i].segment_length != 0) {
+					dapl_os_printf
+					    ("     (%4llx, %8x, %8llx)\n",
+					     ibt->iov[i].segment_length,
+					     ibt->iov[i].lmr_context,
+					     ibt->iov[i].virtual_address);
+				}
+			}
+			ibt =
+			    (struct io_buf_track *)dapls_rbuf_remove(&ep_ptr->
+								     ibt_queue);
+			cnt--;
+		}
+	}
+}
+#endif				/* DAPL_DBG_IO_TRC */
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_evd_util.h b/dapl/common/dapl_evd_util.h
new file mode 100644
index 0000000..2304435
--- /dev/null
+++ b/dapl/common/dapl_evd_util.h
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_evd_util.h
+ *
+ * PURPOSE: Utility defs & routines for the EVD data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_EVD_UTIL_H_
+#define _DAPL_EVD_UTIL_H_
+
+#include "dapl.h"
+
+DAT_RETURN
+dapls_evd_internal_create (
+    IN DAPL_IA		*ia_ptr, 
+    IN DAPL_CNO		*cno_ptr,
+    IN DAT_COUNT	min_qlen,
+    IN DAT_EVD_FLAGS	evd_flags,
+    OUT DAPL_EVD	**evd_ptr_ptr) ;
+
+DAPL_EVD *
+dapls_evd_alloc ( 
+    IN DAPL_IA		*ia_ptr,
+    IN DAPL_CNO		*cno_ptr,
+    IN DAT_EVD_FLAGS	evd_flags,
+    IN DAT_COUNT	qlen) ;
+
+DAT_RETURN
+dapls_evd_dealloc ( 
+    IN DAPL_EVD 	*evd_ptr) ;
+
+DAT_RETURN dapls_evd_event_realloc (
+    IN DAPL_EVD		*evd_ptr,
+    IN DAT_COUNT	qlen);
+
+/*
+ * Each of these functions will retrieve a free event from
+ * the specified EVD, fill in the elements of that event, and
+ * post the event back to the EVD.  If there is no EVD available,
+ * an overflow event will be posted to the async EVD associated
+ * with the EVD.
+ *
+ * DAT_INSUFFICIENT_RESOURCES will be returned on overflow,
+ * DAT_SUCCESS otherwise.
+ */
+
+DAT_RETURN
+dapls_evd_post_cr_arrival_event (
+    IN DAPL_EVD				*evd_ptr,
+    IN DAT_EVENT_NUMBER			event_number,
+    IN DAT_SP_HANDLE			sp_handle,
+    DAT_IA_ADDRESS_PTR			ia_address_ptr,
+    DAT_CONN_QUAL			conn_qual,
+    DAT_CR_HANDLE			cr_handle);
+    
+DAT_RETURN
+dapls_evd_post_connection_event (
+    IN DAPL_EVD				*evd_ptr,
+    IN DAT_EVENT_NUMBER			event_number,
+    IN DAT_EP_HANDLE               	ep_handle,
+    IN DAT_COUNT                   	private_data_size,
+    IN DAT_PVOID                   	private_data);
+
+DAT_RETURN
+dapls_evd_post_async_error_event (
+    IN DAPL_EVD				*evd_ptr,
+    IN DAT_EVENT_NUMBER			event_number,
+    IN DAT_IA_HANDLE			ia_handle);
+
+DAT_RETURN
+dapls_evd_post_software_event (
+    IN DAPL_EVD				*evd_ptr,
+    IN DAT_EVENT_NUMBER			event_number,
+    IN DAT_PVOID			pointer);
+
+DAT_RETURN
+dapls_evd_post_generic_event (
+    IN DAPL_EVD				*evd_ptr,
+    IN DAT_EVENT_NUMBER			event_number,
+    IN DAT_EVENT_DATA			*data);
+
+#ifdef DAT_EXTENSIONS
+DAT_RETURN
+dapls_evd_post_cr_event_ext (
+    IN DAPL_SP				*sp_ptr,
+    IN DAT_EVENT_NUMBER			event_number,
+    IN dp_ib_cm_handle_t		ib_cm_handle,
+    IN DAT_COUNT			p_size,
+    IN DAT_PVOID			p_data,
+    IN DAT_PVOID			ext_data);
+
+DAT_RETURN
+dapls_evd_post_connection_event_ext (
+    IN DAPL_EVD				*evd_ptr,
+    IN DAT_EVENT_NUMBER			event_number,
+    IN DAT_EP_HANDLE               	ep_handle,
+    IN DAT_COUNT                   	private_data_size,
+    IN DAT_PVOID                   	private_data,
+    IN DAT_PVOID			ext_data);
+#endif
+
+/*************************************
+ * dapl internal callbacks functions *
+ *************************************/
+
+/* connection verb callback */
+extern void dapl_evd_connection_callback (
+    IN	dp_ib_cm_handle_t	ib_cm_handle,
+    IN	const ib_cm_events_t	ib_cm_events,
+    IN	const void 		*instant_data_p,
+    IN	const void *		context );
+
+/* dto verb callback */
+extern void dapl_evd_dto_callback (
+    IN  ib_hca_handle_t 	ib_hca_handle, 
+    IN  ib_cq_handle_t 		ib_cq_handle, 
+    IN  void* 			context);
+
+/* async verb callbacks */
+extern void dapl_evd_un_async_error_callback (
+    IN	ib_hca_handle_t		ib_hca_handle,
+    IN	ib_error_record_t *	cause_ptr,
+    IN	void *			context);
+
+extern void dapl_evd_cq_async_error_callback (
+    IN	ib_hca_handle_t 	ib_hca_handle,
+    IN	ib_cq_handle_t		ib_cq_handle,
+    IN	ib_error_record_t *	cause_ptr,
+    IN	void *			context);
+
+extern void dapl_evd_qp_async_error_callback (
+    IN	ib_hca_handle_t 	ib_hca_handle,
+    IN	ib_qp_handle_t		ib_qp_handle,
+    IN	ib_error_record_t *	cause_ptr,
+    IN	void *			context);
+
+extern void dapls_evd_copy_cq (
+    DAPL_EVD 			*evd_ptr);
+
+extern DAT_RETURN dapls_evd_cq_poll_to_event (
+    IN DAPL_EVD 		*evd_ptr,
+    OUT DAT_EVENT		*event);
+
+#endif
diff --git a/dapl/common/dapl_get_consumer_context.c b/dapl/common/dapl_get_consumer_context.c
new file mode 100644
index 0000000..fe78036
--- /dev/null
+++ b/dapl/common/dapl_get_consumer_context.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_get_consumer_context.c
+ *
+ * PURPOSE: Interface Adapter management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_get_consumer_context
+ *
+ * DAPL Requirements Version xxx, 6.2.2.2
+ *
+ * Gets the consumer context from the specified dat_object
+ *
+ * Input:
+ *	dat_handle
+ *
+ * Output:
+ *	context
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_get_consumer_context(IN DAT_HANDLE dat_handle, OUT DAT_CONTEXT * context)
+{
+	DAT_RETURN dat_status;
+	DAPL_HEADER *header;
+
+	dat_status = DAT_SUCCESS;
+
+	header = (DAPL_HEADER *) dat_handle;
+	if (((header) == NULL) ||
+	    DAPL_BAD_PTR(header) ||
+	    (header->magic != DAPL_MAGIC_IA &&
+	     header->magic != DAPL_MAGIC_EVD &&
+	     header->magic != DAPL_MAGIC_EP &&
+	     header->magic != DAPL_MAGIC_LMR &&
+	     header->magic != DAPL_MAGIC_RMR &&
+	     header->magic != DAPL_MAGIC_PZ &&
+	     header->magic != DAPL_MAGIC_PSP &&
+	     header->magic != DAPL_MAGIC_RSP &&
+	     header->magic != DAPL_MAGIC_CR)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	if (context == NULL || DAPL_BAD_PTR(header)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	*context = header->user_context;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_get_handle_type.c b/dapl/common/dapl_get_handle_type.c
new file mode 100644
index 0000000..ac48760
--- /dev/null
+++ b/dapl/common/dapl_get_handle_type.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_get_handle_type.c
+ *
+ * PURPOSE: Interface Adapter management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_get_handle_type
+ *
+ * DAPL Requirements Version xxx, 6.2.2.6
+ *
+ * Gets the handle type for the given dat_handle
+ *
+ * Input:
+ * 	dat_handle
+ *
+ * Output:
+ * 	handle_type
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ */
+
+DAT_RETURN DAT_API
+dapl_get_handle_type(IN DAT_HANDLE dat_handle,
+		     OUT DAT_HANDLE_TYPE * handle_type)
+{
+	DAT_RETURN dat_status;
+	DAPL_HEADER *header;
+
+	dat_status = DAT_SUCCESS;
+
+	header = (DAPL_HEADER *) dat_handle;
+	if (((header) == NULL) ||
+	    DAPL_BAD_PTR(header) ||
+	    (header->magic != DAPL_MAGIC_IA &&
+	     header->magic != DAPL_MAGIC_EVD &&
+	     header->magic != DAPL_MAGIC_EP &&
+	     header->magic != DAPL_MAGIC_LMR &&
+	     header->magic != DAPL_MAGIC_RMR &&
+	     header->magic != DAPL_MAGIC_PZ &&
+	     header->magic != DAPL_MAGIC_PSP &&
+	     header->magic != DAPL_MAGIC_RSP &&
+	     header->magic != DAPL_MAGIC_CR)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	*handle_type = header->handle_type;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_hash.c b/dapl/common/dapl_hash.c
new file mode 100644
index 0000000..0811d7c
--- /dev/null
+++ b/dapl/common/dapl_hash.c
@@ -0,0 +1,478 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_hash.c
+ *
+ * PURPOSE: Hash Table
+ * Description: 
+ *
+ * Provides a generic hash table with chaining.
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_hash.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Structures                                                        *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * A hash table element
+ */
+typedef struct DAPL_HASH_ELEM {
+	struct DAPL_HASH_ELEM *next_element;
+	DAPL_HASH_KEY key;
+	void *datum;
+} DAPL_HASH_ELEM;
+
+/*
+ * The hash table
+ */
+struct dapl_hash_table {
+	unsigned long num_entries;
+	unsigned long tbl_size;
+	DAPL_HASH_ELEM *table;
+	DAPL_OS_LOCK lock;
+	/*
+	 * statistics - we tally on insert operations, counting
+	 * the number of entries in the whole hash table, as
+	 * well as the length of chains we walk to insert.  This
+	 * ignores empty buckets, giving us data on overall table
+	 * occupancy, as well as max/average chain length for
+	 * the buckets used.  If our hash function results in
+	 * hot buckets, this will show it.
+	 */
+	uint64_t hash_tbl_inserts;	/* total inserts ops    */
+	uint64_t hash_tbl_max;	/* max in entire table  */
+	uint64_t hash_tbl_total;	/* total in table       */
+	uint64_t hash_chn_max;	/* longest chain        */
+	uint64_t hash_chn_total;	/* total non-0 lenghts  */
+};
+
+/*********************************************************************
+ *                                                                   *
+ * Defines                                                           *
+ *                                                                   *
+ *********************************************************************/
+
+/* datum value in empty table slots  (use 0UL or ~0UL as appropriate) */
+#define NO_DATUM_VALUE          ((void *) 0UL)
+#define NO_DATUM(value)         ((value) == NO_DATUM_VALUE)
+
+/* Lookup macro (which falls back to function to rehash) */
+#define DAPL_HASHLOOKUP( p_table, in_key, out_datum, bucket_head) \
+    do { \
+        DAPL_HASH_KEY save_key = in_key; \
+        DAPL_HASH_ELEM *element = \
+            &((p_table)->table)[DAPL_DOHASH(in_key,(p_table)->tbl_size)]; \
+        in_key = save_key; \
+        if (NO_DATUM(element->datum)) { \
+            (bucket_head) = (void *)0; \
+        } else if (element->key == (DAPL_HASH_KEY) (in_key)) { \
+            (out_datum) = element->datum; \
+            (bucket_head) = (void *)element; \
+        } else if (element->next_element) { \
+            dapli_hash_rehash(element, \
+                            (in_key), \
+                            (void **)&(out_datum), \
+                            (DAPL_HASH_ELEM **)&(bucket_head)); \
+        } else { \
+            (bucket_head) = (void *)0; \
+        }\
+    } while (0)
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Functions                                                *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * Rehash the key (used by add and lookup functions)
+ * 
+ * Inputs:  element	element to rehash key
+ *	    key, datum	datum for key head
+ *	    head	head for list
+ */
+static void
+dapli_hash_rehash(DAPL_HASH_ELEM * element,
+		  DAPL_HASH_KEY key, void **datum, DAPL_HASH_ELEM ** head)
+{
+	/*
+	 * assume we looked at the contents of element already,
+	 * and start with the next element.
+	 */
+	dapl_os_assert(element->next_element);
+	dapl_os_assert(!NO_DATUM(element->datum));
+
+	*head = element;
+	while (1) {
+		element = element->next_element;
+		if (!element) {
+			break;
+		}
+		if (element->key == key) {
+			*datum = element->datum;
+			return;
+		}
+	}
+	*head = 0;
+}
+
+/*
+ * Add a new key to the hash table
+ * 
+ * Inputs:
+ *          table, key and datum to be added
+ *          allow_dup   - DAT_TRUE if dups are allowed
+ * Outputs: 
+ *          report_dup  - should you care to know
+ * Returns:
+ *          DAT_TRUE on success     
+ */
+static DAT_BOOLEAN
+dapli_hash_add(DAPL_HASH_TABLEP p_table,
+	       DAPL_HASH_KEY key,
+	       void *datum, DAT_BOOLEAN allow_dup, DAT_BOOLEAN * report_dup)
+{
+	void *olddatum;
+	DAPL_HASH_KEY hashValue, save_key = key;
+	DAPL_HASH_ELEM *found;
+	DAT_BOOLEAN status = DAT_FALSE;
+	unsigned int chain_len = 0;
+
+	if (report_dup) {
+		(*report_dup) = DAT_FALSE;
+	}
+
+	if (NO_DATUM(datum)) {
+		/*
+		 * Reserved value used for datum
+		 */
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dapli_hash_add () called with magic NO_DATA value (%p) "
+			     "used as datum!\n", datum);
+		return DAT_FALSE;
+	}
+
+	DAPL_HASHLOOKUP(p_table, key, olddatum, found);
+	if (found) {
+		/*
+		 * key exists already
+		 */
+		if (report_dup) {
+			*report_dup = DAT_TRUE;
+		}
+
+		if (!allow_dup) {
+			dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+				     "dapli_hash_add () called with duplicate key ("
+				     F64x ")\n", key);
+			return DAT_FALSE;
+		}
+	}
+
+	hashValue = DAPL_DOHASH(key, p_table->tbl_size);
+	key = save_key;
+	if (NO_DATUM(p_table->table[hashValue].datum)) {
+		/*
+		 * Empty head - just fill it in
+		 */
+		p_table->table[hashValue].key = key;
+		p_table->table[hashValue].datum = datum;
+		p_table->table[hashValue].next_element = 0;
+		p_table->num_entries++;
+		status = DAT_TRUE;
+	} else {
+		DAPL_HASH_ELEM *newelement = (DAPL_HASH_ELEM *)
+		    dapl_os_alloc(sizeof(DAPL_HASH_ELEM));
+		/*
+		 * Add an element to the end of the chain
+		 */
+		if (newelement) {
+			DAPL_HASH_ELEM *lastelement;
+			newelement->key = key;
+			newelement->datum = datum;
+			newelement->next_element = 0;
+			for (lastelement = &p_table->table[hashValue];
+			     lastelement->next_element;
+			     lastelement = lastelement->next_element) {
+				/* Walk to the end of the chain */
+				chain_len++;
+			}
+			lastelement->next_element = newelement;
+			p_table->num_entries++;
+			status = DAT_TRUE;
+		} else {
+			/* allocation failed - should not happen */
+			status = DAT_FALSE;
+		}
+	}
+
+	/*
+	 * Tally up our counters. chain_len is one less than current chain
+	 * length.
+	 */
+	chain_len++;
+	p_table->hash_tbl_inserts++;
+	p_table->hash_tbl_total += p_table->num_entries;
+	p_table->hash_chn_total += chain_len;
+	if (p_table->num_entries > p_table->hash_tbl_max) {
+		p_table->hash_tbl_max = p_table->num_entries;
+	}
+	if (chain_len > p_table->hash_chn_max) {
+		p_table->hash_chn_max = chain_len;
+	}
+
+	return status;
+}
+
+/*
+ * Remove element from hash bucket
+ * 
+ * Inputs:
+ *          element, key        to be deleted
+ * Returns:
+ *          DAT_TRUE on success
+ */
+static DAT_BOOLEAN
+dapl_hash_delete_element(DAPL_HASH_ELEM * element,
+			 DAPL_HASH_KEY key, DAPL_HASH_DATA * p_datum)
+{
+	DAPL_HASH_ELEM *curelement;
+	DAPL_HASH_ELEM *lastelement;
+
+	lastelement = NULL;
+	for (curelement = element;
+	     curelement;
+	     lastelement = curelement, curelement = curelement->next_element) {
+		if (curelement->key == key) {
+			if (p_datum) {
+				*p_datum = curelement->datum;
+			}
+			if (lastelement) {
+				/*
+				 * curelement was malloc'd; free it
+				 */
+				lastelement->next_element =
+				    curelement->next_element;
+				dapl_os_free((void *)curelement,
+					     sizeof(DAPL_HASH_ELEM));
+			} else {
+				/*
+				 * curelement is static list head
+				 */
+				DAPL_HASH_ELEM *n = curelement->next_element;
+				if (n) {
+					/*
+					 * If there is a next element, copy its contents into the
+					 * head and free the original next element.
+					 */
+					curelement->key = n->key;
+					curelement->datum = n->datum;
+					curelement->next_element =
+					    n->next_element;
+					dapl_os_free((void *)n,
+						     sizeof(DAPL_HASH_ELEM));
+				} else {
+					curelement->datum = NO_DATUM_VALUE;
+				}
+			}
+			break;
+		}
+	}
+
+	return (curelement != NULL ? DAT_TRUE : DAT_FALSE);
+}
+
+/*********************************************************************
+ *                                                                   *
+ * External Functions                                                *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * Create a new hash table with at least 'table_size' hash buckets.
+ */
+DAT_RETURN
+dapls_hash_create(IN DAT_COUNT table_size, OUT DAPL_HASH_TABLE ** pp_table)
+{
+	DAPL_HASH_TABLE *p_table;
+	DAT_COUNT table_length = table_size * sizeof(DAPL_HASH_ELEM);
+	DAT_RETURN dat_status;
+	DAT_COUNT i;
+
+	dapl_os_assert(pp_table);
+	dat_status = DAT_SUCCESS;
+
+	/* Allocate hash table */
+	p_table = dapl_os_alloc(sizeof(DAPL_HASH_TABLE));
+	if (NULL == p_table) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	/* Init hash table, allocate and init and buckets */
+	dapl_os_memzero(p_table, sizeof(DAPL_HASH_TABLE));
+	p_table->tbl_size = table_size;
+	p_table->table = (DAPL_HASH_ELEM *) dapl_os_alloc(table_length);
+	if (NULL == p_table->table) {
+		dapl_os_free(p_table, sizeof(DAPL_HASH_TABLE));
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dapl_os_lock_init(&p_table->lock);
+	for (i = 0; i < table_size; i++) {
+		p_table->table[i].datum = NO_DATUM_VALUE;
+		p_table->table[i].key = 0;
+		p_table->table[i].next_element = 0;
+	}
+
+	*pp_table = p_table;
+
+      bail:
+	return DAT_SUCCESS;
+}
+
+/*
+ * Destroy a hash table
+ */
+DAT_RETURN dapls_hash_free(IN DAPL_HASH_TABLE * p_table)
+{
+	dapl_os_assert(p_table && p_table->table);
+
+	dapl_os_lock_destroy(&p_table->lock);
+	dapl_os_free(p_table->table,
+		     sizeof(DAPL_HASH_ELEM) * p_table->tbl_size);
+	dapl_os_free(p_table, sizeof(DAPL_HASH_TABLE));
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * Returns the number of elements stored in the table
+ */
+
+DAT_RETURN dapls_hash_size(IN DAPL_HASH_TABLE * p_table, OUT DAT_COUNT * p_size)
+{
+	dapl_os_assert(p_table && p_size);
+
+	*p_size = p_table->num_entries;
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * Inserts the specified data into the table with the given key.
+ * Duplicates are not expected, and return in error, having done nothing.
+ */
+
+DAT_RETURN
+dapls_hash_insert(IN DAPL_HASH_TABLE * p_table,
+		  IN DAPL_HASH_KEY key, IN DAPL_HASH_DATA data)
+{
+	DAT_RETURN dat_status;
+
+	dapl_os_assert(p_table);
+	dat_status = DAT_SUCCESS;
+
+	dapl_os_lock(&p_table->lock);
+	if (!dapli_hash_add(p_table, key, data, DAT_FALSE, NULL)) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+	}
+	dapl_os_unlock(&p_table->lock);
+
+	return dat_status;
+}
+
+/*
+ * Searches for the given key.  If found, 
+ * DAT_SUCCESS is returned and the associated 
+ * data is returned in the DAPL_HASH_DATA 
+ * pointer if that pointer is not NULL.
+ */
+DAT_RETURN
+dapls_hash_search(IN DAPL_HASH_TABLE * p_table,
+		  IN DAPL_HASH_KEY key, OUT DAPL_HASH_DATA * p_data)
+{
+	DAT_RETURN dat_status;
+	void *olddatum;
+	DAPL_HASH_ELEM *found;
+
+	dapl_os_assert(p_table);
+	dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, 0);
+
+	dapl_os_lock(&p_table->lock);
+	DAPL_HASHLOOKUP(p_table, key, olddatum, found);
+	dapl_os_unlock(&p_table->lock);
+
+	if (found) {
+		if (p_data) {
+			*p_data = olddatum;
+		}
+		dat_status = DAT_SUCCESS;
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN
+dapls_hash_remove(IN DAPL_HASH_TABLE * p_table,
+		  IN DAPL_HASH_KEY key, OUT DAPL_HASH_DATA * p_data)
+{
+	DAT_RETURN dat_status;
+	DAPL_HASH_KEY hashValue, save_key = key;
+
+	dapl_os_assert(p_table);
+	dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, 0);
+
+	if (p_table->num_entries == 0) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dapls_hash_remove () called on empty hash table!\n");
+		return dat_status;
+	}
+
+	hashValue = DAPL_DOHASH(key, p_table->tbl_size);
+	key = save_key;
+	dapl_os_lock(&p_table->lock);
+	if (dapl_hash_delete_element(&p_table->table[hashValue], key, p_data)) {
+		p_table->num_entries--;
+		dat_status = DAT_SUCCESS;
+	}
+	dapl_os_unlock(&p_table->lock);
+
+	return dat_status;
+}
diff --git a/dapl/common/dapl_hash.h b/dapl/common/dapl_hash.h
new file mode 100644
index 0000000..8242bf0
--- /dev/null
+++ b/dapl/common/dapl_hash.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dapl_hash.h
+ *
+ * PURPOSE: Utility defs & routines for the hash data structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _DAPL_HASH_H_
+#define _DAPL_HASH_H_
+
+#include "dapl.h"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Defines                                                           *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * Hash table size.
+ *
+ * Default is small; use the larger sample values for hash tables
+ * known to be heavily used.  The sample values chosen are the
+ * largest primes below 2^8, 2^9, and 2^10.
+ */
+#define DAPL_DEF_HASHSIZE               251
+#define DAPL_MED_HASHSIZE               509
+#define DAPL_LRG_HASHSIZE               1021
+
+#define DAPL_HASH_TABLE_DEFAULT_CAPACITY DAPL_DEF_HASHSIZE
+
+/* The hash function */
+#if defined(__KDAPL__)
+#define DAPL_DOHASH(key,hashsize) dapl_os_mod64(key,hashsize)
+#else
+#define DAPL_DOHASH(key,hashsize)   ((uint64_t)((key) % (hashsize)))
+#endif	/* defined(__KDAPL__) */
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAT_RETURN
+dapls_hash_create(
+    IN DAT_COUNT capacity,
+    OUT DAPL_HASH_TABLE **pp_table);
+
+extern DAT_RETURN
+dapls_hash_free(
+    IN DAPL_HASH_TABLE *p_table);
+
+extern DAT_RETURN
+dapls_hash_size(
+    IN DAPL_HASH_TABLE *p_table,
+    OUT DAT_COUNT *p_size);
+
+extern DAT_RETURN
+dapls_hash_insert(
+    IN DAPL_HASH_TABLE *p_table, 
+    IN DAPL_HASH_KEY key,
+    IN DAPL_HASH_DATA data);
+
+extern DAT_RETURN
+dapls_hash_search(
+    IN DAPL_HASH_TABLE *p_table,
+    IN DAPL_HASH_KEY key,
+    OUT DAPL_HASH_DATA *p_data);
+
+extern DAT_RETURN
+dapls_hash_remove(
+    IN DAPL_HASH_TABLE *p_table,
+    IN DAPL_HASH_KEY key,
+    OUT DAPL_HASH_DATA *p_data);
+
+
+#endif /* _DAPL_HASH_H_ */
diff --git a/dapl/common/dapl_hca_util.c b/dapl/common/dapl_hca_util.c
new file mode 100644
index 0000000..b8f068c
--- /dev/null
+++ b/dapl/common/dapl_hca_util.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_hca_util.c
+ *
+ * PURPOSE: Manage HCA structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_provider.h"
+#include "dapl_hca_util.h"
+#include "dapl_hash.h"
+
+/*
+ * dapl_hca_alloc
+ *
+ * alloc and initialize an HCA struct
+ *
+ * Input:
+ * 	name
+ *      port
+ *
+ * Output:
+ * 	hca_ptr
+ *
+ * Returns:
+ * 	none
+ *
+ */
+DAPL_HCA *dapl_hca_alloc(char *name, char *port)
+{
+	DAPL_HCA *hca_ptr;
+
+	hca_ptr = dapl_os_alloc(sizeof(DAPL_HCA));
+	if (NULL == hca_ptr) {
+		goto bail;
+	}
+
+	dapl_os_memzero(hca_ptr, sizeof(DAPL_HCA));
+
+	if (DAT_SUCCESS !=
+	    dapls_hash_create(DAPL_HASH_TABLE_DEFAULT_CAPACITY,
+			      &hca_ptr->lmr_hash_table)) {
+		goto bail;
+	}
+
+	dapl_os_lock_init(&hca_ptr->lock);
+	dapl_llist_init_head(&hca_ptr->ia_list_head);
+
+	hca_ptr->name = dapl_os_strdup(name);
+	if (NULL == hca_ptr->name) {
+		goto bail;
+	}
+
+	hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
+	hca_ptr->port_num = dapl_os_strtol(port, NULL, 0);
+
+	return (hca_ptr);
+
+      bail:
+	if (NULL != hca_ptr) {
+		if (NULL != hca_ptr->lmr_hash_table) {
+			dapls_hash_free(hca_ptr->lmr_hash_table);
+		}
+
+		dapl_os_free(hca_ptr, sizeof(DAPL_HCA));
+	}
+
+	return NULL;
+}
+
+/*
+ * dapl_hca_free
+ *
+ * free an IA INFO struct
+ *
+ * Input:
+ * 	hca_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_hca_free(DAPL_HCA * hca_ptr)
+{
+	(void)dapls_hash_free(hca_ptr->lmr_hash_table);
+	dapl_os_free(hca_ptr->name, dapl_os_strlen(hca_ptr->name) + 1);
+	dapl_os_free(hca_ptr, sizeof(DAPL_HCA));
+}
+
+/*
+ * dapl_hca_link_ia
+ *
+ * Add an ia to the HCA structure
+ *
+ * Input:
+ *	hca_ptr
+ *	ia_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_hca_link_ia(IN DAPL_HCA * hca_ptr, IN DAPL_IA * ia_ptr)
+{
+	dapl_os_lock(&hca_ptr->lock);
+	dapl_llist_add_head(&hca_ptr->ia_list_head,
+			    &ia_ptr->hca_ia_list_entry, ia_ptr);
+	dapl_os_unlock(&hca_ptr->lock);
+}
+
+/*
+ * dapl_hca_unlink_ia
+ *
+ * Remove an ia from the hca info structure
+ *
+ * Input:
+ *	hca_ptr
+ *	ia_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_hca_unlink_ia(IN DAPL_HCA * hca_ptr, IN DAPL_IA * ia_ptr)
+{
+	dapl_os_lock(&hca_ptr->lock);
+	/*
+	 * If an error occurred when we were opening the IA it
+	 * will not be linked on the list; don't unlink an unlinked
+	 * list!
+	 */
+	if (!dapl_llist_is_empty(&hca_ptr->ia_list_head)) {
+		dapl_llist_remove_entry(&hca_ptr->ia_list_head,
+					&ia_ptr->hca_ia_list_entry);
+	}
+	dapl_os_unlock(&hca_ptr->lock);
+}
diff --git a/dapl/common/dapl_hca_util.h b/dapl/common/dapl_hca_util.h
new file mode 100644
index 0000000..fd006ed
--- /dev/null
+++ b/dapl/common/dapl_hca_util.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dapl_hca_util.h
+ *
+ * PURPOSE: Utility defs & routines for the HCA data structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _DAPL_HCA_UTIL_H_
+#define _DAPL_HCA_UTIL_H_
+
+#include "dapl.h"
+
+DAPL_HCA *
+dapl_hca_alloc ( char 	*name,
+                 char 	*port ) ;
+
+void
+dapl_hca_free ( DAPL_HCA	*hca_ptr ) ;
+
+void
+dapl_hca_link_ia (
+	IN DAPL_HCA 	*hca_ptr,
+	IN DAPL_IA	*ia_info ) ;
+
+void
+dapl_hca_unlink_ia (
+	IN DAPL_HCA 	*hca_ptr,
+	IN DAPL_IA	*ia_info ) ;
+
+
+#endif
diff --git a/dapl/common/dapl_ia_close.c b/dapl/common/dapl_ia_close.c
new file mode 100644
index 0000000..75c7bca
--- /dev/null
+++ b/dapl/common/dapl_ia_close.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ia_close.c
+ *
+ * PURPOSE: Interface Adapter management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dapl_ia_close
+ *
+ * DAPL Requirements Version xxx, 6.2.1.2
+ *
+ * Close a provider, clean up resources, etc.
+ *
+ * Input:
+ *	ia_handle
+ *
+ * Output:
+ *	none
+ *
+ * Return Values:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_ia_close(IN DAT_IA_HANDLE ia_handle, IN DAT_CLOSE_FLAGS ia_flags)
+{
+	DAPL_IA *ia_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ia_close (%p, %d)\n", ia_handle, ia_flags);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	if (DAT_CLOSE_ABRUPT_FLAG == ia_flags) {
+		dat_status = dapl_ia_abrupt_close(ia_ptr);
+	} else if (DAT_CLOSE_GRACEFUL_FLAG == ia_flags) {
+		dat_status = dapl_ia_graceful_close(ia_ptr);
+	} else {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_ia_ha.c b/dapl/common/dapl_ia_ha.c
new file mode 100755
index 0000000..b09edbd
--- /dev/null
+++ b/dapl/common/dapl_ia_ha.c
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ia_ha.c
+ *
+ * PURPOSE: Interface Adapter High Availability - optional feature
+ * Description: Described in DAPL 2.0 API, Chapter 5, section 9
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_provider.h"
+#include "dapl_evd_util.h"
+#include "dapl_hca_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_ia_ha
+ *
+ * DAPL Requirements Version xxx, 5.9
+ *
+ * Queries for provider HA support
+ *
+ * Input:
+ *	ia_handle
+ *	provider name
+ *
+ * Output:
+ *	answer
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+
+DAT_RETURN DAT_API dapl_ia_ha(IN DAT_IA_HANDLE ia_handle,	/* ia_handle */
+			      IN const DAT_NAME_PTR provider,	/* provider  */
+			      OUT DAT_BOOLEAN * answer)
+{				/* answer    */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ia_open.c b/dapl/common/dapl_ia_open.c
new file mode 100644
index 0000000..edead04
--- /dev/null
+++ b/dapl/common/dapl_ia_open.c
@@ -0,0 +1,462 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ia_open.c
+ *
+ * PURPOSE: Interface Adapter management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_provider.h"
+#include "dapl_evd_util.h"
+#include "dapl_hca_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * LOCAL PROTOTYPES
+ */
+#ifdef IBHOSTS_NAMING
+void dapli_assign_hca_ip_address(DAPL_HCA * hca_ptr, char *device_name);
+#endif				/* IBHOSTS_NAMING */
+
+void dapli_hca_cleanup(DAPL_HCA * hca_ptr, DAT_BOOLEAN dec_ref);
+
+/*
+ * dapl_ia_open
+ *
+ * DAPL Requirements Version xxx, 6.2.1.1
+ *
+ * Open a provider and return a handle. The handle enables the user
+ * to invoke operations on this provider.
+ *
+ * The dat_ia_open  call is actually part of the DAT registration module.
+ * That function maps the DAT_NAME parameter of dat_ia_open to a DAT_PROVIDER,
+ * and calls this function.
+ *
+ * Input:
+ *	provider
+ *	async_evd_qlen
+ *	async_evd_handle_ptr
+ *
+ * Output:
+ *	async_evd_handle
+ *	ia_handle
+ *
+ * Return Values:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_PROVIDER_NOT_FOUND	(returned by dat registry if necessary)
+ */
+DAT_RETURN DAT_API
+dapl_ia_open(IN const DAT_NAME_PTR name,
+	     IN DAT_COUNT async_evd_qlen,
+	     INOUT DAT_EVD_HANDLE * async_evd_handle_ptr,
+	     OUT DAT_IA_HANDLE * ia_handle_ptr)
+{
+	DAT_RETURN dat_status;
+	DAT_PROVIDER *provider;
+	DAPL_HCA *hca_ptr;
+	DAPL_IA *ia_ptr;
+	DAPL_EVD *evd_ptr;
+
+	dat_status = DAT_SUCCESS;
+	hca_ptr = NULL;
+	ia_ptr = NULL;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ia_open (%s, %d, %p, %p)\n",
+		     name, async_evd_qlen, async_evd_handle_ptr, ia_handle_ptr);
+
+	dat_status = dapl_provider_list_search(name, &provider);
+	if (DAT_SUCCESS != dat_status) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+		goto bail;
+	}
+
+	/* ia_handle_ptr and async_evd_handle_ptr cannot be NULL */
+	if (ia_handle_ptr == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+	if (async_evd_handle_ptr == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	/* initialize the caller's OUT param */
+	*ia_handle_ptr = DAT_HANDLE_NULL;
+
+	/* get the hca_ptr */
+	hca_ptr = (DAPL_HCA *) provider->extension;
+
+	/*
+	 * Open the HCA if it has not been done before.
+	 */
+	dapl_os_lock(&hca_ptr->lock);
+	if (hca_ptr->ib_hca_handle == IB_INVALID_HANDLE) {
+		/* register with the HW */
+		dat_status = dapls_ib_open_hca(hca_ptr->name, hca_ptr);
+
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+				     "dapls_ib_open_hca failed %x\n",
+				     dat_status);
+			dapl_os_unlock(&hca_ptr->lock);
+			goto bail;
+		}
+
+		/*
+		 * Obtain the IP address associated with this name and HCA.
+		 */
+#ifdef IBHOSTS_NAMING
+		dapli_assign_hca_ip_address(hca_ptr, name);
+#endif				/* IBHOSTS_NAMING */
+
+		/*
+		 * Obtain IA attributes from the HCA to limit certain
+		 * operations.
+		 * If using DAPL_ATS naming, ib_query_hca will also set the ip
+		 * address.
+		 */
+		dat_status = dapls_ib_query_hca(hca_ptr,
+						&hca_ptr->ia_attr,
+						NULL, &hca_ptr->hca_address);
+		if (dat_status != DAT_SUCCESS) {
+			dapli_hca_cleanup(hca_ptr, DAT_FALSE);
+			dapl_os_unlock(&hca_ptr->lock);
+			goto bail;
+		}
+	}
+
+	/* Take a reference on the hca_handle */
+	dapl_os_atomic_inc(&hca_ptr->handle_ref_count);
+	dapl_os_unlock(&hca_ptr->lock);
+
+	/* Allocate and initialize ia structure */
+	ia_ptr = dapl_ia_alloc(provider, hca_ptr);
+	if (!ia_ptr) {
+		dapl_os_lock(&hca_ptr->lock);
+		dapli_hca_cleanup(hca_ptr, DAT_TRUE);
+		dapl_os_unlock(&hca_ptr->lock);
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	/* we need an async EVD for this IA
+	 * use the one passed in (if non-NULL) or create one
+	 */
+
+	evd_ptr = (DAPL_EVD *) * async_evd_handle_ptr;
+	if (evd_ptr) {
+		if (DAPL_BAD_HANDLE(evd_ptr, DAPL_MAGIC_EVD) ||
+		    !(evd_ptr->evd_flags & DAT_EVD_ASYNC_FLAG)) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_HANDLE,
+				      DAT_INVALID_HANDLE_EVD_ASYNC);
+			goto bail;
+		}
+
+		/* InfiniBand allows only 1 asychronous event handler per HCA */
+		/* (see InfiniBand Spec, release 1.1, vol I, section 11.5.2,  */
+		/*  page 559).                                                */
+		/*                                                            */
+		/* We only need to make sure that this EVD's CQ belongs to    */
+		/* the same HCA as is being opened.                           */
+
+		if (evd_ptr->header.owner_ia->hca_ptr->ib_hca_handle !=
+		    hca_ptr->ib_hca_handle) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_HANDLE,
+				      DAT_INVALID_HANDLE_EVD_ASYNC);
+			goto bail;
+		}
+
+		ia_ptr->cleanup_async_error_evd = DAT_FALSE;
+		ia_ptr->async_error_evd = evd_ptr;
+	} else {
+		/* Verify we have >0 length, and let the provider check the size */
+		if (async_evd_qlen <= 0) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+			goto bail;
+		}
+		dat_status = dapls_evd_internal_create(ia_ptr, NULL,	/* CNO ptr */
+						       async_evd_qlen,
+						       DAT_EVD_ASYNC_FLAG,
+						       &evd_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+
+		dapl_os_atomic_inc(&evd_ptr->evd_ref_count);
+
+		dapl_os_lock(&hca_ptr->lock);
+		if (hca_ptr->async_evd != (DAPL_EVD *) 0) {
+#if 0
+			/*
+			 * The async EVD for this HCA has already been assigned.
+			 * It's an error to try and assign another one.
+			 *
+			 * However, we need to somehow allow multiple IAs
+			 * off of the same HCA.  The right way to do this
+			 * is by dispatching events off the HCA to the appropriate
+			 * IA, but we aren't there yet.  So for now we create
+			 * the EVD but don't connect it to anything.
+			 */
+			dapl_os_atomic_dec(&evd_ptr->evd_ref_count);
+			dapl_evd_free(evd_ptr);
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+			goto bail;
+#endif
+			dapl_os_unlock(&hca_ptr->lock);
+		} else {
+			hca_ptr->async_evd = evd_ptr;
+			dapl_os_unlock(&hca_ptr->lock);
+
+			/* Register the handlers associated with the async EVD.  */
+			dat_status = dapls_ia_setup_callbacks(ia_ptr, evd_ptr);
+			if (dat_status != DAT_SUCCESS) {
+				/* Assign the EVD so it gets cleaned up */
+				ia_ptr->cleanup_async_error_evd = DAT_TRUE;
+				ia_ptr->async_error_evd = evd_ptr;
+				goto bail;
+			}
+		}
+
+		ia_ptr->cleanup_async_error_evd = DAT_TRUE;
+		ia_ptr->async_error_evd = evd_ptr;
+	}
+
+	dat_status = DAT_SUCCESS;
+	*ia_handle_ptr = ia_ptr;
+	*async_evd_handle_ptr = evd_ptr;
+
+      bail:
+	if (dat_status != DAT_SUCCESS) {
+		if (ia_ptr) {
+			/* This will release the async EVD if needed.  */
+			dapl_ia_close(ia_ptr, DAT_CLOSE_ABRUPT_FLAG);
+		}
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+		     "dapl_ia_open () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
+
+/*
+ * dapli_hca_cleanup
+ *
+ * Clean up partially allocated HCA stuff. Strictly to make cleanup
+ * simple.
+ */
+void dapli_hca_cleanup(DAPL_HCA * hca_ptr, DAT_BOOLEAN dec_ref)
+{
+	dapls_ib_close_hca(hca_ptr);
+	hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
+	if (dec_ref == DAT_TRUE) {
+		dapl_os_atomic_dec(&hca_ptr->handle_ref_count);
+	}
+}
+
+#ifdef IBHOSTS_NAMING
+
+char *dapli_get_adapter_num(char *device_name);
+
+void dapli_setup_dummy_addr(IN DAPL_HCA * hca_ptr, IN char *hca_name);
+/*
+ * dapli_assign_hca_ip_address
+ *
+ * Obtain the IP address of the passed in name, which represents a
+ * port on the hca. There are three methods here to obtain the
+ * appropriate IP address, each with their own shortcoming:
+ * 1) IPOIB_NAMING. Requires the implementation of the IPoIB
+ *    interface defined in include/dapl/ipoib_names.h. This is
+ *    not the recommended interface as IPoIB is limited at
+ *    the point we need to obtain an IP address on the
+ *    passive side of a connection. The code supporting this
+ *    implementation has been removed.
+ *
+ * 2) IBHOSTS. An entry exists in DNS and in the /etc/dapl/ibhosts
+ *    file. The immediate drawback here is that we must dictate
+ *    how to name the interface, which is a stated DAPL non-goal.
+ *    In the broader perspective, this method requires us to xmit
+ *    the IP address in the private data of a connection, which has
+ *    other fun problems. This is the default method and is known to
+ *    work, but it has problems.
+ *
+ * 3) Obtain the IP address from the driver, which has registered
+ *    the address with the SA for retrieval.
+ *
+ *
+ * Input:
+ *	hca_ptr			Pointer to HCA structure
+ *	device_name		Name of device as reported by the provider
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	char * to string number
+ */
+void dapli_assign_hca_ip_address(DAPL_HCA * hca_ptr, char *device_name)
+{
+	char *adapter_num;
+#define NAMELEN	128
+	struct addrinfo *addr;
+	char hostname[NAMELEN];
+	char *str;
+	int rc;
+
+	/*
+	 * Obtain the IP address of the adapter. This is a simple
+	 * scheme that creates a name that must appear available to
+	 * DNS, e.g. it must be in the local site DNS or in the local
+	 * /etc/hosts file, etc.
+	 *
+	 *  <hostname>-ib<index>
+	 *
+	 * This scheme obviously doesn't work with adapters from
+	 * multiple vendors, but will suffice in common installations.
+	 */
+
+	rc = gethostname(hostname, NAMELEN);
+
+	/* guarantee NUL termination if hostname gets truncated */
+	hostname[NAMELEN - 1] = '\0';
+
+	/*
+	 * Strip off domain info if it exists (e.g. mynode.mydomain.com)
+	 */
+	for (str = hostname; *str && *str != '.';) {
+		str++;
+	}
+	if (*str == '.') {
+		*str = '\0';
+	}
+	strcat(hostname, "-ib");
+	adapter_num = dapli_get_adapter_num(device_name);
+	strcat(hostname, adapter_num);
+
+	rc = dapls_osd_getaddrinfo(hostname, &addr);
+
+	if (rc != 0) {
+		/* Not registered in DNS, provide a dummy value */
+		dapli_setup_dummy_addr(hca_ptr, hostname);
+	} else {
+		hca_ptr->hca_address = *((DAT_SOCK_ADDR6 *) addr->ai_addr);
+		dapls_osd_freeaddrinfo(addr);
+	}
+}
+
+/*
+ * dapli_stup_dummy_addr
+ *
+ * Set up a dummy local address for the HCA. Things are not going
+ * to work too well if this happens.
+ * We call this routine if:
+ *  - remote host adapter name is not in DNS
+ *  - IPoIB implementation is not correctly set up
+ *  - Similar nonsense.
+ *
+ * Input:
+ *      hca_ptr
+ *	rhost_name		Name of remote adapter
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ */
+void dapli_setup_dummy_addr(IN DAPL_HCA * hca_ptr, IN char *rhost_name)
+{
+	struct sockaddr_in *si;
+
+	/* Not registered in DNS, provide a dummy value */
+	dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+		     "WARNING: <%s> not registered in DNS, using dummy IP value\n",
+		     rhost_name);
+	si = (struct sockaddr_in *)&hca_ptr->hca_address;
+	hca_ptr->hca_address.sin6_family = AF_INET;
+	si->sin_addr.s_addr = 0x01020304;
+}
+
+/*
+ * dapls_get_adapter_num
+ *
+ * Given a device name, return a string of the device number
+ *
+ * Input:
+ *	device_name		Name of device as reported by the provider
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	char * to string number
+ */
+char *dapli_get_adapter_num(char *device_name)
+{
+	static char *zero = "0";
+	char *p;
+
+	/*
+	 * Optimisticaly simple algorithm: the device number appears at
+	 * the end of the device name string. Device that do not end
+	 * in a number are by default "0".
+	 */
+
+	for (p = device_name; *p; p++) {
+		if (isdigit(*p)) {
+			return p;
+		}
+	}
+
+	return zero;
+}
+#endif				/* IBHOSTS_NAMING */
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ia_query.c b/dapl/common/dapl_ia_query.c
new file mode 100755
index 0000000..6fcc4a2
--- /dev/null
+++ b/dapl/common/dapl_ia_query.c
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ia_query.c
+ *
+ * PURPOSE: Interface Adapter management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_vendor.h"
+
+/*
+ * dapl_ia_query
+ *
+ * DAPL Requirements Version xxx, 6.2.1.3
+ *
+ * Provide the consumer with Interface Adapter and Provider parameters.
+ *
+ * Input:
+ *	ia_handle
+ *	ia_mask
+ *	provider_mask
+ *
+ * Output:
+ *	async_evd_handle
+ *	ia_parameters
+ *	provider_parameters
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_ia_query(IN DAT_IA_HANDLE ia_handle,
+	      OUT DAT_EVD_HANDLE * async_evd_handle,
+	      IN DAT_IA_ATTR_MASK ia_attr_mask,
+	      OUT DAT_IA_ATTR * ia_attr,
+	      IN DAT_PROVIDER_ATTR_MASK provider_attr_mask,
+	      OUT DAT_PROVIDER_ATTR * provider_attr)
+{
+	DAPL_IA *ia_ptr;
+	DAT_RETURN dat_status;
+	struct evd_merge_type {
+		DAT_BOOLEAN array[6][6];
+	} *evd_merge;
+	DAT_BOOLEAN val;
+	int i;
+	int j;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_ia_query (%p, %p, 0x%llx, %p, 0x%x, %p)\n",
+		     ia_handle,
+		     async_evd_handle,
+		     ia_attr_mask, ia_attr, provider_attr_mask, provider_attr);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	if (NULL != async_evd_handle) {
+		*async_evd_handle = ia_ptr->async_error_evd;
+	}
+
+	if (ia_attr_mask & DAT_IA_FIELD_ALL) {
+		if (NULL == ia_attr) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+			goto bail;
+		}
+
+		/*
+		 * Obtain parameters from the HCA.  Protect against multiple
+		 * IAs beating on the HCA at the same time.
+		 */
+		dat_status =
+		    dapls_ib_query_hca(ia_ptr->hca_ptr, ia_attr, NULL, NULL);
+		if (dat_status != DAT_SUCCESS) {
+			goto bail;
+		}
+	}
+
+	if (ia_attr_mask & ~DAT_IA_FIELD_ALL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	if (provider_attr_mask & DAT_PROVIDER_FIELD_ALL) {
+		if (NULL == provider_attr) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG6);
+			goto bail;
+		}
+
+		strncpy(provider_attr->provider_name,
+			ia_ptr->header.provider->device_name,
+			DAT_NAME_MAX_LENGTH);
+		provider_attr->provider_version_major = VN_PROVIDER_MAJOR;
+		provider_attr->provider_version_minor = VN_PROVIDER_MINOR;
+		provider_attr->dapl_version_major = DAT_VERSION_MAJOR;
+		provider_attr->dapl_version_minor = DAT_VERSION_MINOR;
+		provider_attr->lmr_mem_types_supported =
+		    DAT_MEM_TYPE_VIRTUAL | DAT_MEM_TYPE_LMR;
+#if VN_MEM_SHARED_VIRTUAL_SUPPORT > 0 && !defined(__KDAPL__)
+		provider_attr->lmr_mem_types_supported |=
+		    DAT_MEM_TYPE_SHARED_VIRTUAL;
+#endif
+		provider_attr->iov_ownership_on_return = DAT_IOV_CONSUMER;
+		provider_attr->dat_qos_supported = DAT_QOS_BEST_EFFORT;
+		provider_attr->completion_flags_supported =
+		    DAT_COMPLETION_DEFAULT_FLAG;
+		provider_attr->is_thread_safe = DAT_FALSE;
+		/*
+		 * N.B. The second part of the following equation will evaluate
+		 *      to 0 unless IBHOSTS_NAMING is enabled.
+		 */
+		provider_attr->max_private_data_size =
+		    dapls_ib_private_data_size(NULL, DAPL_PDATA_CONN_REQ,
+					       ia_ptr->hca_ptr) -
+		    (sizeof(DAPL_PRIVATE) - DAPL_MAX_PRIVATE_DATA_SIZE);
+		provider_attr->supports_multipath = DAT_FALSE;
+		provider_attr->ep_creator = DAT_PSP_CREATES_EP_NEVER;
+		provider_attr->optimal_buffer_alignment = DAT_OPTIMAL_ALIGNMENT;
+		/* The value of pz_support may vary by transport */
+		provider_attr->num_provider_specific_attr = 0;
+		provider_attr->provider_specific_attr = NULL;
+#if !defined(__KDAPL__)
+		provider_attr->pz_support = DAT_PZ_UNIQUE;
+#endif				/* !KDAPL */
+
+		/*
+		 *  Query for provider specific attributes
+		 */
+		dapls_query_provider_specific_attr(ia_ptr, provider_attr);
+
+		/*
+		 * Set up evd_stream_merging_supported options. Note there is
+		 * one bit per allowable combination, using the ordinal
+		 * position of the DAT_EVD_FLAGS as positions in the
+		 * array. e.g.
+		 * [0][0] is DAT_EVD_SOFTWARE_FLAG | DAT_EVD_SOFTWARE_FLAG,
+		 * [0][1] is DAT_EVD_SOFTWARE_FLAG | DAT_EVD_CR_FLAG, and
+		 * [2][4] is DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG
+		 *
+		 * Most combinations are true, so initialize the array that way.
+		 * Then finish by resetting the bad combinations.
+		 *
+		 * DAT_EVD_ASYNC_FLAG is not supported. InfiniBand only allows
+		 * a single asynchronous event handle per HCA, and the first
+		 * dat_ia_open forces the creation of the only one that can be
+		 * used. We disallow the user from creating an ASYNC EVD here.
+		 */
+
+		evd_merge =
+		    (struct evd_merge_type *)&provider_attr->
+		    evd_stream_merging_supported[0][0];
+		val = DAT_TRUE;
+		for (i = 0; i < 6; i++) {
+			if (i > 4) {
+				/* ASYNC EVD is 5, so entire row will be 0 */
+				val = DAT_FALSE;
+			}
+			for (j = 0; j < 5; j++) {
+				evd_merge->array[i][j] = val;
+			}
+			/* Set the ASYNC_EVD column to FALSE */
+			evd_merge->array[i][5] = DAT_FALSE;
+		}
+
+#ifndef DAPL_MERGE_CM_DTO
+		/*
+		 * If an implementation supports CM and DTO completions on
+		 * the same EVD then DAPL_MERGE_CM_DTO should be set to
+		 * skip the following code
+		 */
+		/* DAT_EVD_DTO_FLAG | DAT_EVD_CONNECTION_FLAG */
+		evd_merge->array[2][3] = DAT_FALSE;
+		/* DAT_EVD_CONNECTION_FLAG | DAT_EVD_DTO_FLAG */
+		evd_merge->array[3][2] = DAT_FALSE;
+#endif				/* DAPL_MERGE_CM_DTO */
+	}
+
+      bail:
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     "dapl_ia_query () returns 0x%x\n", dat_status);
+	}
+
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ia_util.c b/dapl/common/dapl_ia_util.c
new file mode 100755
index 0000000..2208c23
--- /dev/null
+++ b/dapl/common/dapl_ia_util.c
@@ -0,0 +1,1140 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ia_util.c
+ *
+ * PURPOSE: Manage IA Info structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_hca_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_sp_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_cno_util.h"
+#include "dapl_cr_util.h"
+#include "dapl_adapter_util.h"
+
+/* Internal prototype */
+void dapli_ia_release_hca(DAPL_HCA * hca_ptr);
+
+/*
+ * dapl_ia_alloc
+ *
+ * alloc and initialize an IA INFO struct
+ *
+ * Input:
+ * 	none
+ *
+ * Output:
+ * 	ia_ptr
+ *
+ * Returns:
+ * 	none
+ *
+ */
+DAPL_IA *dapl_ia_alloc(DAT_PROVIDER * provider, DAPL_HCA * hca_ptr)
+{
+	DAPL_IA *ia_ptr;
+
+	/* Allocate IA */
+	ia_ptr = (DAPL_IA *) dapl_os_alloc(sizeof(DAPL_IA));
+	if (ia_ptr == NULL) {
+		return (NULL);
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(ia_ptr, sizeof(DAPL_IA));
+
+#ifdef DAPL_COUNTERS
+	/* Allocate counters */
+	ia_ptr->cntrs =
+	    dapl_os_alloc(sizeof(DAT_UINT64) * DCNT_IA_ALL_COUNTERS);
+	if (ia_ptr->cntrs == NULL) {
+		dapl_os_free(ia_ptr, sizeof(DAPL_IA));
+		return (NULL);
+	}
+	dapl_os_memzero(ia_ptr->cntrs,
+			sizeof(DAT_UINT64) * DCNT_IA_ALL_COUNTERS);
+#endif				/* DAPL_COUNTERS */
+
+	/*
+	 * initialize the header
+	 */
+	ia_ptr->header.provider = provider;
+	ia_ptr->header.magic = DAPL_MAGIC_IA;
+	ia_ptr->header.handle_type = DAT_HANDLE_TYPE_IA;
+	ia_ptr->header.owner_ia = ia_ptr;
+	ia_ptr->header.user_context.as_64 = 0;
+	ia_ptr->header.user_context.as_ptr = NULL;
+	dapl_llist_init_entry(&ia_ptr->header.ia_list_entry);
+	dapl_os_lock_init(&ia_ptr->header.lock);
+
+	/*
+	 * initialize the body
+	 */
+	ia_ptr->hca_ptr = hca_ptr;
+	ia_ptr->async_error_evd = NULL;
+	ia_ptr->cleanup_async_error_evd = DAT_FALSE;
+	dapl_llist_init_entry(&ia_ptr->hca_ia_list_entry);
+	dapl_llist_init_head(&ia_ptr->ep_list_head);
+	dapl_llist_init_head(&ia_ptr->lmr_list_head);
+	dapl_llist_init_head(&ia_ptr->rmr_list_head);
+	dapl_llist_init_head(&ia_ptr->pz_list_head);
+	dapl_llist_init_head(&ia_ptr->evd_list_head);
+	dapl_llist_init_head(&ia_ptr->cno_list_head);
+	dapl_llist_init_head(&ia_ptr->rsp_list_head);
+	dapl_llist_init_head(&ia_ptr->psp_list_head);
+
+	dapl_hca_link_ia(hca_ptr, ia_ptr);
+
+	return (ia_ptr);
+}
+
+/*
+ * dapl_ia_abrupt_close
+ *
+ * Performs an abrupt close of the IA
+ *
+ * Input:
+ * 	ia_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	status
+ *
+ */
+
+DAT_RETURN dapl_ia_abrupt_close(IN DAPL_IA * ia_ptr)
+{
+	DAT_RETURN dat_status;
+	DAPL_EP *ep_ptr, *next_ep_ptr;
+	DAPL_LMR *lmr_ptr, *next_lmr_ptr;
+	DAPL_RMR *rmr_ptr, *next_rmr_ptr;
+	DAPL_PZ *pz_ptr, *next_pz_ptr;
+	DAPL_EVD *evd_ptr, *next_evd_ptr;
+	DAPL_CNO *cno_ptr, *next_cno_ptr;
+	DAPL_SP *sp_ptr, *next_sp_ptr;	/* for PSP and RSP queues */
+	DAPL_CR *cr_ptr, *next_cr_ptr;
+	DAPL_HCA *hca_ptr;
+
+	dat_status = DAT_SUCCESS;
+
+	/*
+	 * clear all the data structures associated with the IA.
+	 * this must be done in order (rmr,rsp) before (ep lmr psp) before
+	 * (pz evd)
+	 *
+	 * Note that in all the following we can leave the loop either
+	 * when we run out of entries, or when we get back to the head
+	 * if we end up skipping an entry.
+	 */
+
+	rmr_ptr = (dapl_llist_is_empty(&ia_ptr->rmr_list_head)
+		   ? NULL : dapl_llist_peek_head(&ia_ptr->rmr_list_head));
+	while (rmr_ptr != NULL) {
+		next_rmr_ptr = dapl_llist_next_entry(&ia_ptr->rmr_list_head,
+						     &rmr_ptr->header.
+						     ia_list_entry);
+		dat_status = dapl_rmr_free(rmr_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): rmr_free(%p) returns %x\n",
+				     rmr_ptr, dat_status);
+		}
+		rmr_ptr = next_rmr_ptr;
+	}
+
+	sp_ptr = (dapl_llist_is_empty(&ia_ptr->rsp_list_head)
+		  ? NULL : dapl_llist_peek_head(&ia_ptr->rsp_list_head));
+	while (sp_ptr != NULL) {
+		next_sp_ptr = dapl_llist_next_entry(&ia_ptr->rsp_list_head,
+						    &sp_ptr->header.
+						    ia_list_entry);
+		dat_status = dapl_rsp_free(sp_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): rsp_free(%p) returns %x\n",
+				     sp_ptr, dat_status);
+		}
+		sp_ptr = next_sp_ptr;
+	}
+
+	ep_ptr = (dapl_llist_is_empty(&ia_ptr->ep_list_head)
+		  ? NULL : dapl_llist_peek_head(&ia_ptr->ep_list_head));
+	while (ep_ptr != NULL) {
+		next_ep_ptr = dapl_llist_next_entry(&ia_ptr->ep_list_head,
+						    &ep_ptr->header.
+						    ia_list_entry);
+		/*
+		 * Issue a disconnect if the EP needs it
+		 */
+		if (ep_ptr->param.ep_state == DAT_EP_STATE_CONNECTED ||
+		    ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED ||
+		    ep_ptr->param.ep_state ==
+		    DAT_EP_STATE_ACTIVE_CONNECTION_PENDING
+		    || ep_ptr->param.ep_state == DAT_EP_STATE_COMPLETION_PENDING
+		    || ep_ptr->param.ep_state ==
+		    DAT_EP_STATE_DISCONNECT_PENDING) {
+			dat_status =
+			    dapl_ep_disconnect(ep_ptr, DAT_CLOSE_ABRUPT_FLAG);
+			if (dat_status != DAT_SUCCESS) {
+				dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+					     "ia_close(ABRUPT): ep_disconnect(%p) returns %x\n",
+					     ep_ptr, dat_status);
+			}
+		}
+		/* force the EP into error state to force flush all posted DTOs. */
+		{
+			DAT_EP_ATTR ep_attr;
+			DAT_NAMED_ATTR ep_state;
+
+			dapl_os_memzero(&ep_attr, sizeof(DAT_EP_ATTR));
+			ep_state.name = (char *)IB_QP_STATE;
+			ep_state.value = (char *)DAPL_QP_STATE_ERROR;
+			ep_attr.ep_provider_specific_count = 1;
+			ep_attr.ep_provider_specific = &ep_state;
+
+			(void)dapls_ib_qp_modify(ia_ptr, ep_ptr, &ep_attr);
+		}
+
+		dat_status = dapl_ep_free(ep_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): ep_free(%p) returns %x\n",
+				     ep_ptr, dat_status);
+		}
+		ep_ptr = next_ep_ptr;
+	}
+
+	lmr_ptr = (dapl_llist_is_empty(&ia_ptr->lmr_list_head)
+		   ? NULL : dapl_llist_peek_head(&ia_ptr->lmr_list_head));
+	while (lmr_ptr != NULL) {
+		next_lmr_ptr = dapl_llist_next_entry(&ia_ptr->lmr_list_head,
+						     &lmr_ptr->header.
+						     ia_list_entry);
+		dat_status = dapl_lmr_free(lmr_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): lmr_free(%p) returns %x\n",
+				     lmr_ptr, dat_status);
+		}
+		lmr_ptr = next_lmr_ptr;
+	}
+
+	sp_ptr = (dapl_llist_is_empty(&ia_ptr->psp_list_head)
+		  ? NULL : dapl_llist_peek_head(&ia_ptr->psp_list_head));
+	while (sp_ptr != NULL) {
+		/*
+		 * Shut down the PSP so we get no further callbacks. There
+		 * should be no competing threads after this.
+		 */
+		dat_status = dapls_ib_remove_conn_listener(ia_ptr, sp_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): psp cannot remove listener, returns %x\n",
+				     dat_status);
+		}
+
+		next_sp_ptr = dapl_llist_next_entry(&ia_ptr->psp_list_head,
+						    &sp_ptr->header.
+						    ia_list_entry);
+
+		/* Remove CR's from this PSP and clean them up */
+		cr_ptr = dapl_llist_is_empty(&sp_ptr->cr_list_head) ? NULL :
+		    dapl_llist_peek_head(&sp_ptr->cr_list_head);
+		while (cr_ptr != NULL) {
+			next_cr_ptr =
+			    dapl_llist_next_entry(&sp_ptr->cr_list_head,
+						  &cr_ptr->header.
+						  ia_list_entry);
+			/* Remove the CR from the queue & cleanup */
+			dapl_os_lock(&sp_ptr->header.lock);
+			dapl_sp_remove_cr(sp_ptr, cr_ptr);
+			dapl_os_unlock(&sp_ptr->header.lock);
+
+			dapls_cr_free(cr_ptr);
+			cr_ptr = next_cr_ptr;
+		}
+
+		dat_status = dapl_psp_free(sp_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): psp_free(%p) returns %x\n",
+				     sp_ptr, dat_status);
+		}
+
+		sp_ptr = next_sp_ptr;
+	}
+
+	pz_ptr = (dapl_llist_is_empty(&ia_ptr->pz_list_head)
+		  ? NULL : dapl_llist_peek_head(&ia_ptr->pz_list_head));
+	while (pz_ptr != NULL) {
+		next_pz_ptr = dapl_llist_next_entry(&ia_ptr->pz_list_head,
+						    &pz_ptr->header.
+						    ia_list_entry);
+		dat_status = dapl_pz_free(pz_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): pz_free(%p) returns %x\n",
+				     pz_ptr, dat_status);
+		}
+		pz_ptr = next_pz_ptr;
+	}
+
+	/*
+	 * EVDs are tricky; we want to release all except for the async
+	 * EVD.  That EVD needs to stick around until after we close the
+	 * HCA, to accept any async events that occur.  So we cycle through
+	 * the list with dapl_llist_next_entry instead of dapl_llist_is_empty.
+	 */
+	evd_ptr = (dapl_llist_is_empty(&ia_ptr->evd_list_head)
+		   ? NULL : dapl_llist_peek_head(&ia_ptr->evd_list_head));
+	while (evd_ptr != NULL) {
+		next_evd_ptr = dapl_llist_next_entry(&ia_ptr->evd_list_head,
+						     &evd_ptr->header.
+						     ia_list_entry);
+		if (evd_ptr == ia_ptr->async_error_evd) {
+#if !defined(__KDAPL__)
+			/* Don't delete the EVD, but break any CNO connections.  */
+			dapl_evd_disable(evd_ptr);
+			dapl_evd_modify_cno(evd_ptr, DAT_HANDLE_NULL);
+#endif				/* __KDAPL__ */
+		} else {
+			/* it isn't the async EVD; delete it.  */
+			dat_status = dapl_evd_free(evd_ptr);
+			if (dat_status != DAT_SUCCESS) {
+				dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+					     "ia_close(ABRUPT): evd_free(%p) returns %x\n",
+					     evd_ptr, dat_status);
+			}
+		}
+		evd_ptr = next_evd_ptr;
+	}
+
+	cno_ptr = (dapl_llist_is_empty(&ia_ptr->cno_list_head)
+		   ? NULL : dapl_llist_peek_head(&ia_ptr->cno_list_head));
+	while (cno_ptr != NULL) {
+		next_cno_ptr = dapl_llist_next_entry(&ia_ptr->cno_list_head,
+						     &cno_ptr->header.
+						     ia_list_entry);
+#if !defined(__KDAPL__)
+		if (cno_ptr->cno_waiters > 0) {
+			/* Notify the waiter the IA is going away: see uDAPL 1.1 spec,
+			 * 6.3.2.3
+			 */
+			dapl_internal_cno_trigger(cno_ptr, NULL);
+		}
+		/* clean up the CNO */
+		dat_status = dapl_cno_free(cno_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): cno_free(%p) returns %x\n",
+				     cno_ptr, dat_status);
+		}
+#endif				/* __KDAPL__ */
+		cno_ptr = next_cno_ptr;
+	}
+
+	hca_ptr = ia_ptr->hca_ptr;
+
+	/*
+	 * Free the async EVD, shutting down callbacks from the HCA.
+	 */
+	if (ia_ptr->async_error_evd &&
+	    (DAT_TRUE == ia_ptr->cleanup_async_error_evd)) {
+		dat_status = dapls_ia_teardown_callbacks(ia_ptr);
+
+		dapl_os_atomic_dec(&ia_ptr->async_error_evd->evd_ref_count);
+		dat_status = dapl_evd_free(ia_ptr->async_error_evd);
+
+		if (DAT_SUCCESS != dat_status) {
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "ia_close(ABRUPT): evd_free(%p) returns %x\n",
+				     ia_ptr->async_error_evd, dat_status);
+		}
+
+		ia_ptr->async_error_evd = NULL;
+	}
+
+	/*
+	 * Release our reference on the hca_handle. If we are the last
+	 * one, close it
+	 */
+	dapli_ia_release_hca(hca_ptr);
+
+	dapls_ia_free(ia_ptr);
+
+	return DAT_SUCCESS;	/* Abrupt close can't fail.  */
+}
+
+/*
+ * dapl_ia_graceful_close
+ *
+ * Performs an graceful close of the IA
+ *
+ * Input:
+ * 	ia_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	status
+ *
+ */
+
+DAT_RETURN dapl_ia_graceful_close(IN DAPL_IA * ia_ptr)
+{
+	DAT_RETURN dat_status;
+	DAT_RETURN cur_dat_status;
+	DAPL_EVD *evd_ptr;
+	DAPL_LLIST_ENTRY *entry;
+	DAPL_HCA *hca_ptr;
+
+	dat_status = DAT_SUCCESS;
+
+	if (!dapl_llist_is_empty(&ia_ptr->rmr_list_head) ||
+	    !dapl_llist_is_empty(&ia_ptr->rsp_list_head) ||
+	    !dapl_llist_is_empty(&ia_ptr->ep_list_head) ||
+	    !dapl_llist_is_empty(&ia_ptr->lmr_list_head) ||
+	    !dapl_llist_is_empty(&ia_ptr->psp_list_head) ||
+	    !dapl_llist_is_empty(&ia_ptr->pz_list_head)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_IA_IN_USE);
+		goto bail;
+	}
+
+	/* if the async evd does not need to be cleaned up */
+	/* (ie. it was not created by dapl_ia_open)        */
+	/*  then the evd list should be empty              */
+	if (DAT_FALSE == ia_ptr->cleanup_async_error_evd) {
+		if (!dapl_llist_is_empty(&ia_ptr->evd_list_head)) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_STATE,
+				      DAT_INVALID_STATE_IA_IN_USE);
+			goto bail;
+		}
+	}
+	/* else the async evd should be the only evd in    */
+	/* the list.                                        */
+	else {
+		evd_ptr = (dapl_llist_is_empty(&ia_ptr->evd_list_head)
+			   ? NULL : dapl_llist_peek_head(&ia_ptr->
+							 evd_list_head));
+
+		if (evd_ptr != NULL &&
+		    !(evd_ptr->evd_flags & DAT_EVD_ASYNC_FLAG)) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_STATE,
+				      DAT_INVALID_STATE_IA_IN_USE);
+			goto bail;
+		}
+
+		entry = ia_ptr->evd_list_head;
+
+		/* if the async evd is not the only element in the list */
+		if (entry->blink != entry->flink) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_STATE,
+				      DAT_INVALID_STATE_IA_IN_USE);
+			goto bail;
+		}
+
+		/*
+		 * If the async evd has a non-unary ref count (i.e. it's in
+		 * use by someone besides us.
+		 */
+		if (dapl_os_atomic_read(&evd_ptr->evd_ref_count) != 1) {
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_STATE,
+				      DAT_INVALID_STATE_IA_IN_USE);
+			goto bail;
+		}
+	}
+
+	/*
+	 * We've validated the call; now we can start the teardown.
+	 * Because we're in the IA close routine, we're safe from races with DAPL
+	 * consumers on this IA (operate/destroy races are disallowed in
+	 * DAPL).
+	 */
+	hca_ptr = ia_ptr->hca_ptr;
+
+	/* Tear down the async EVD if needed, first shutting down callbacks.  */
+	if (ia_ptr->async_error_evd &&
+	    (DAT_TRUE == ia_ptr->cleanup_async_error_evd)) {
+		cur_dat_status = dapls_ia_teardown_callbacks(ia_ptr);
+		if (DAT_SUCCESS != cur_dat_status) {
+			dat_status = cur_dat_status;
+		}
+		dapl_os_atomic_dec(&ia_ptr->async_error_evd->evd_ref_count);
+		cur_dat_status = dapl_evd_free(ia_ptr->async_error_evd);
+		if (DAT_SUCCESS != cur_dat_status) {
+			dat_status = cur_dat_status;
+		}
+
+		ia_ptr->async_error_evd = NULL;
+	}
+
+	dapli_ia_release_hca(hca_ptr);
+
+	dapls_ia_free(ia_ptr);
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Release a reference on the HCA handle. If it is 0, close the
+ * handle. Manipulate under lock to prevent races with threads trying to
+ * open the HCA.
+ */
+void dapli_ia_release_hca(DAPL_HCA * hca_ptr)
+{
+	dapl_os_lock(&hca_ptr->lock);
+	dapl_os_atomic_dec(&hca_ptr->handle_ref_count);
+	if (dapl_os_atomic_read(&hca_ptr->handle_ref_count) == 0) {
+		dapls_ib_close_hca(hca_ptr);
+		hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
+		hca_ptr->async_evd = NULL;
+	}
+	dapl_os_unlock(&hca_ptr->lock);
+}
+
+/*
+ * dapls_ia_free
+ *
+ * free an IA INFO struct
+ *
+ * Input:
+ * 	ia_ptr
+ *
+ * Output:
+ * 	one
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapls_ia_free(DAPL_IA * ia_ptr)
+{
+	dapl_os_assert(ia_ptr->header.magic == DAPL_MAGIC_IA);
+
+	dapl_os_assert(ia_ptr->async_error_evd == NULL);
+	dapl_os_assert(dapl_llist_is_empty(&ia_ptr->lmr_list_head));
+	dapl_os_assert(dapl_llist_is_empty(&ia_ptr->rmr_list_head));
+	dapl_os_assert(dapl_llist_is_empty(&ia_ptr->ep_list_head));
+	dapl_os_assert(dapl_llist_is_empty(&ia_ptr->evd_list_head));
+	dapl_os_assert(dapl_llist_is_empty(&ia_ptr->cno_list_head));
+	dapl_os_assert(dapl_llist_is_empty(&ia_ptr->psp_list_head));
+	dapl_os_assert(dapl_llist_is_empty(&ia_ptr->rsp_list_head));
+
+	/*
+	 * deinitialize the header
+	 */
+	dapl_hca_unlink_ia(ia_ptr->hca_ptr, ia_ptr);
+	ia_ptr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+	dapl_os_lock_destroy(&ia_ptr->header.lock);
+
+#ifdef DAPL_COUNTERS
+	dapl_os_free(ia_ptr->cntrs, sizeof(DAT_UINT64) * DCNT_IA_ALL_COUNTERS);
+#endif				/* DAPL_COUNTERS */
+
+	dapl_os_free(ia_ptr, sizeof(DAPL_IA));
+}
+
+/*
+ * dapl_ia_link_ep
+ *
+ * Add an ep to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	ep_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_ep(IN DAPL_IA * ia_ptr, IN DAPL_EP * ep_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->ep_list_head,
+			    &ep_ptr->header.ia_list_entry, ep_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_unlink_ep
+ *
+ * Remove an ep from the ia info structure
+ *
+ * Input:
+ *	ia_ptr
+ *	ep_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_unlink_ep(IN DAPL_IA * ia_ptr, IN DAPL_EP * ep_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(&ia_ptr->ep_list_head,
+				&ep_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_link_srq
+ *
+ * Add an srq to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	srq_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_srq(IN DAPL_IA * ia_ptr, IN DAPL_SRQ * srq_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->srq_list_head,
+			    &srq_ptr->header.ia_list_entry, srq_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_unlink_srq
+ *
+ * Remove an srq from the ia info structure
+ *
+ * Input:
+ *	ia_ptr
+ *	srq_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_unlink_srq(IN DAPL_IA * ia_ptr, IN DAPL_SRQ * srq_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(&ia_ptr->srq_list_head,
+				&srq_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_link_lmr
+ *
+ * Add an lmr to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	lmr_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_lmr(IN DAPL_IA * ia_ptr, IN DAPL_LMR * lmr_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->lmr_list_head,
+			    &lmr_ptr->header.ia_list_entry, lmr_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_unlink_lmr
+ *
+ * Remove an lmr from the ia info structure
+ *
+ * Input:
+ *	ia_ptr
+ *	lmr_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_unlink_lmr(IN DAPL_IA * ia_ptr, IN DAPL_LMR * lmr_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(&ia_ptr->lmr_list_head,
+				&lmr_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_link_rmr
+ *
+ * Add an rmr to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	rmr_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_rmr(IN DAPL_IA * ia_ptr, IN DAPL_RMR * rmr_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->rmr_list_head,
+			    &rmr_ptr->header.ia_list_entry, rmr_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_unlink_rmr
+ *
+ * Remove an rmr from the ia info structure
+ *
+ * Input:
+ *	ia_ptr
+ *	rmr_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_unlink_rmr(IN DAPL_IA * ia_ptr, IN DAPL_RMR * rmr_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(&ia_ptr->rmr_list_head,
+				&rmr_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_link_pz
+ *
+ * Add an pz to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	pz_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_pz(IN DAPL_IA * ia_ptr, IN DAPL_PZ * pz_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->pz_list_head,
+			    &pz_ptr->header.ia_list_entry, pz_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_unlink_pz
+ *
+ * Remove an pz from the ia info structure
+ *
+ * Input:
+ *	ia_ptr
+ *	pz_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_unlink_pz(IN DAPL_IA * ia_ptr, IN DAPL_PZ * pz_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(&ia_ptr->pz_list_head,
+				&pz_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_link_evd
+ *
+ * Add an evd to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	evd_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_evd(IN DAPL_IA * ia_ptr, IN DAPL_EVD * evd_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->evd_list_head,
+			    &evd_ptr->header.ia_list_entry, evd_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_unlink_evd
+ *
+ * Remove an evd from the ia info structure
+ *
+ * Input:
+ *	ia_ptr
+ *	evd_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_unlink_evd(IN DAPL_IA * ia_ptr, IN DAPL_EVD * evd_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(&ia_ptr->evd_list_head,
+				&evd_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_link_cno
+ *
+ * Add an cno to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	cno_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_cno(IN DAPL_IA * ia_ptr, IN DAPL_CNO * cno_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->cno_list_head,
+			    &cno_ptr->header.ia_list_entry, cno_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_unlink_cno
+ *
+ * Remove an cno from the ia info structure
+ *
+ * Input:
+ *	ia_ptr
+ *	cno_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_unlink_cno(IN DAPL_IA * ia_ptr, IN DAPL_CNO * cno_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(&ia_ptr->cno_list_head,
+				&cno_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapl_ia_link_psp
+ *
+ * Add an psp to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	sp_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_psp(IN DAPL_IA * ia_ptr, IN DAPL_SP * sp_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->psp_list_head,
+			    &sp_ptr->header.ia_list_entry, sp_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * daps_ia_unlink_sp
+ *
+ * Remove an sp from the appropriate ia rsp or psp queue
+ *
+ * Input:
+ *	ia_ptr
+ *	sp_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapls_ia_unlink_sp(IN DAPL_IA * ia_ptr, IN DAPL_SP * sp_ptr)
+{
+	DAPL_LLIST_HEAD *list_head;
+
+	if (sp_ptr->header.handle_type == DAT_HANDLE_TYPE_PSP) {
+		list_head = &ia_ptr->psp_list_head;
+	} else {
+		dapl_os_assert(sp_ptr->header.handle_type ==
+			       DAT_HANDLE_TYPE_RSP);
+		list_head = &ia_ptr->rsp_list_head;
+	}
+
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_remove_entry(list_head, &sp_ptr->header.ia_list_entry);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+/*
+ * dapls_ia_sp_search
+ *
+ * Find an RSP or PSP on the IA list with a matching conn_qual value
+ *
+ * Input:
+ *	ia_ptr
+ *	sp_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+DAPL_SP *dapls_ia_sp_search(IN DAPL_IA * ia_ptr,
+			    IN DAT_CONN_QUAL conn_qual, IN DAT_BOOLEAN is_psp)
+{
+	DAPL_SP *sp_ptr;
+	DAPL_LLIST_HEAD *list_head;
+
+	if (is_psp) {
+		list_head = &ia_ptr->psp_list_head;
+	} else {
+		list_head = &ia_ptr->rsp_list_head;
+	}
+
+	dapl_os_lock(&ia_ptr->header.lock);
+
+	sp_ptr = (dapl_llist_is_empty(list_head) ? NULL :
+		  dapl_llist_peek_head(list_head));
+
+	while (sp_ptr != NULL) {
+		if (sp_ptr->conn_qual == conn_qual) {
+			break;
+		}
+		sp_ptr = dapl_llist_next_entry(list_head,
+					       &sp_ptr->header.ia_list_entry);
+	}
+
+	dapl_os_unlock(&ia_ptr->header.lock);
+
+	return sp_ptr;
+}
+
+/*
+ * dapl_ia_link_rsp
+ *
+ * Add an rsp to the IA structure
+ *
+ * Input:
+ *	ia_ptr
+ *	sp_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_ia_link_rsp(IN DAPL_IA * ia_ptr, IN DAPL_SP * sp_ptr)
+{
+	dapl_os_lock(&ia_ptr->header.lock);
+	dapl_llist_add_head(&ia_ptr->rsp_list_head,
+			    &sp_ptr->header.ia_list_entry, sp_ptr);
+	dapl_os_unlock(&ia_ptr->header.lock);
+}
+
+DAT_RETURN
+dapls_ia_setup_callbacks(IN DAPL_IA * ia_ptr, IN DAPL_EVD * async_evd_ptr)
+{
+	DAT_RETURN dat_status = DAT_SUCCESS;
+
+	/* unaffiliated handler */
+	dat_status =
+	    dapls_ib_setup_async_callback(ia_ptr,
+					  DAPL_ASYNC_UNAFILIATED,
+					  NULL,
+					  (ib_async_handler_t)
+					  dapl_evd_un_async_error_callback,
+					  async_evd_ptr);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "ib_set_un_async_error_eh failed %d\n",
+			     dat_status);
+		goto bail;
+	}
+
+	/* affiliated cq handler */
+	dat_status = dapls_ib_setup_async_callback(ia_ptr,
+						   DAPL_ASYNC_CQ_ERROR,
+						   NULL,
+						   (ib_async_handler_t)
+						   dapl_evd_cq_async_error_callback,
+						   async_evd_ptr);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "ib_set_cq_async_error_eh failed %d\n",
+			     dat_status);
+		goto bail;
+	}
+
+	/* affiliated qp handler */
+	dat_status = dapls_ib_setup_async_callback(ia_ptr,
+						   DAPL_ASYNC_QP_ERROR,
+						   NULL,
+						   (ib_async_handler_t)
+						   dapl_evd_qp_async_error_callback,
+						   ia_ptr);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "ib_set_qp_async_error_eh failed %d\n",
+			     dat_status);
+		goto bail;
+	}
+
+      bail:
+	return dat_status;
+}
+
+DAT_RETURN dapls_ia_teardown_callbacks(IN DAPL_IA * ia_ptr)
+{
+	DAT_RETURN dat_status = DAT_SUCCESS;
+
+	/* unaffiliated handler */
+	dat_status =
+	    dapls_ib_setup_async_callback(ia_ptr,
+					  DAPL_ASYNC_UNAFILIATED,
+					  NULL, (ib_async_handler_t) 0, NULL);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "ib_set_un_async_error_eh failed %d\n",
+			     dat_status);
+		goto bail;
+	}
+
+	/* affiliated cq handler */
+	dat_status = dapls_ib_setup_async_callback(ia_ptr,
+						   DAPL_ASYNC_CQ_ERROR,
+						   NULL,
+						   (ib_async_handler_t) 0,
+						   NULL);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "ib_set_cq_async_error_eh failed %d\n",
+			     dat_status);
+		goto bail;
+	}
+
+	/* affiliated qp handler */
+	dat_status = dapls_ib_setup_async_callback(ia_ptr,
+						   DAPL_ASYNC_QP_ERROR,
+						   NULL,
+						   (ib_async_handler_t) 0,
+						   NULL);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "ib_set_qp_async_error_eh failed %d\n",
+			     dat_status);
+		goto bail;
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_ia_util.h b/dapl/common/dapl_ia_util.h
new file mode 100644
index 0000000..6290cf8
--- /dev/null
+++ b/dapl/common/dapl_ia_util.h
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dapl_ia_util.h
+ *
+ * PURPOSE: Utility defs & routines for the IA data structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _DAPL_IA_UTIL_H_
+#define _DAPL_IA_UTIL_H_
+
+#include "dapl.h"
+
+DAPL_IA *
+dapl_ia_alloc ( 
+	DAT_PROVIDER	*provider,
+	DAPL_HCA	*hca_ptr) ;
+
+DAT_RETURN 
+dapl_ia_abrupt_close (
+	IN DAPL_IA 	*ia_ptr ) ;
+
+DAT_RETURN 
+dapl_ia_graceful_close (
+    	IN DAPL_IA 	*ia_ptr ) ;
+
+void
+dapls_ia_free ( DAPL_IA *ia_ptr ) ;
+
+void
+dapl_ia_link_ep (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_EP	*ep_info ) ;
+
+void
+dapl_ia_unlink_ep (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_EP	*ep_info ) ;
+
+void
+dapl_ia_link_srq (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_SRQ	*srq_ptr ) ;
+
+void
+dapl_ia_unlink_srq (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_SRQ	*srq_ptr ) ;
+
+void
+dapl_ia_link_lmr (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_LMR	*lmr_info ) ;
+
+void
+dapl_ia_unlink_lmr (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_LMR	*lmr_info ) ;
+
+void
+dapl_ia_link_rmr (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_RMR	*rmr_info ) ;
+
+void
+dapl_ia_unlink_rmr (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_RMR	*rmr_info ) ;
+
+void
+dapl_ia_link_pz (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_PZ	*pz_info ) ;
+
+void
+dapl_ia_unlink_pz (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_PZ	*pz_info ) ;
+
+void
+dapl_ia_link_evd (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_EVD	*evd_info ) ;
+
+void
+dapl_ia_unlink_evd (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_EVD	*evd_info ) ;
+
+void
+dapl_ia_link_cno (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_CNO	*cno_info ) ;
+
+void
+dapl_ia_unlink_cno (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_CNO	*cno_info ) ;
+
+void
+dapl_ia_link_psp (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_SP	*sp_info ) ;
+
+void
+dapls_ia_unlink_sp (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_SP	*sp_info ) ;
+
+void
+dapl_ia_link_rsp (
+	IN DAPL_IA 	*ia_ptr,
+	IN DAPL_SP	*sp_info ) ;
+
+DAPL_SP *
+dapls_ia_sp_search (
+	IN	DAPL_IA		   *ia_ptr,
+	IN	DAT_CONN_QUAL	   conn_qual,
+	IN	DAT_BOOLEAN	   is_psp ) ;
+
+DAT_RETURN
+dapls_ia_setup_callbacks (
+    IN	DAPL_IA		*ia_ptr,
+    IN	DAPL_EVD	*async_evd_ptr );
+
+DAT_RETURN
+dapls_ia_teardown_callbacks (
+    IN	DAPL_IA		*ia_ptr );
+
+#endif
diff --git a/dapl/common/dapl_init.h b/dapl/common/dapl_init.h
new file mode 100644
index 0000000..0c98541
--- /dev/null
+++ b/dapl/common/dapl_init.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_init.h
+ *
+ * PURPOSE: Prototypes for library-interface init and fini functions
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+
+#ifndef _DAPL_INIT_H_
+#define _DAPL_INIT_H_
+
+extern void DAT_API
+DAT_PROVIDER_INIT_FUNC_NAME (
+    IN const DAT_PROVIDER_INFO *,
+    IN const char * );                      /* instance data */
+
+extern void DAT_API
+DAT_PROVIDER_FINI_FUNC_NAME (
+    IN const DAT_PROVIDER_INFO * );
+
+extern void
+dapl_init ( void ) ;
+
+extern void
+dapl_fini ( void ) ;
+
+#endif
diff --git a/dapl/common/dapl_llist.c b/dapl/common/dapl_llist.c
new file mode 100644
index 0000000..436444e
--- /dev/null
+++ b/dapl/common/dapl_llist.c
@@ -0,0 +1,343 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_llist.c
+ *
+ * PURPOSE: Manage doubly linked lists within the DAPL Reference Implementation
+ *
+ *	A link list head points to the first member of a linked list, but
+ *	is itself not a member of the list.
+ *
+ *          +---------------------------------------------+
+ *          |      entry         entry         entry      |
+ *  HEAD -> |    +-------+     +-------+     +-------+    |
+ *          +--> | flink | --> | flink | --> | flink | >--+
+ *	         | data  |     | data  |     | data  |
+ *	    +--< | blink | <-- | blink | <-- | blink | <--|
+ *          |    +-------+     +-------+     +-------+    |
+ *          |                                             |
+ *          +---------------------------------------------+
+ *
+ * Note:  Each of the remove functions takes an assertion failure if
+ *        an element cannot be removed from the list.
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_llist_init_head()
+ *
+ * Purpose: initialize a linked list head
+ */
+void dapl_llist_init_head(DAPL_LLIST_HEAD * head)
+{
+	*head = NULL;
+}
+
+/*
+ * dapl_llist_init_entry()
+ *
+ * Purpose: initialize a linked list entry
+ */
+void dapl_llist_init_entry(DAPL_LLIST_ENTRY * entry)
+{
+	entry->blink = NULL;
+	entry->flink = NULL;
+	entry->data = 0;
+	entry->list_head = NULL;
+}
+
+/*
+ * dapl_llist_is_empty()
+ *
+ * Purpose: returns TRUE if the linked list is empty
+ */
+DAT_BOOLEAN dapl_llist_is_empty(DAPL_LLIST_HEAD * head)
+{
+	return (*head == NULL);
+}
+
+/*
+ * dapl_llist_add_head()
+ *
+ * Purpose: Add an entry to the head of a linked list
+ */
+void
+dapl_llist_add_head(DAPL_LLIST_HEAD * head,
+		    DAPL_LLIST_ENTRY * entry, void *data)
+{
+	DAPL_LLIST_ENTRY *first;
+
+	/* deal with empty list */
+	if (dapl_llist_is_empty(head)) {
+		entry->flink = entry;
+		entry->blink = entry;
+	} else {
+		first = *head;
+		entry->flink = first;
+		entry->blink = first->blink;
+		first->blink->flink = entry;
+		first->blink = entry;
+	}
+
+	*head = entry;
+	entry->data = data;
+	entry->list_head = head;
+}
+
+/*
+ * dapl_llist_add_tail()
+ *
+ * Purpose: Add an entry to the tail of a linked list
+ */
+void
+dapl_llist_add_tail(DAPL_LLIST_HEAD * head,
+		    DAPL_LLIST_ENTRY * entry, void *data)
+{
+	DAPL_LLIST_ENTRY *last;
+
+	/* deal with empty list */
+	if (dapl_llist_is_empty(head)) {
+		*head = entry;
+		entry->flink = entry;
+		entry->blink = entry;
+	} else {
+		last = (*head)->blink;
+		entry->flink = last->flink;
+		entry->blink = last;
+		last->flink->blink = entry;
+		last->flink = entry;
+	}
+	entry->data = data;
+	entry->list_head = head;
+}
+
+/*
+ * dapl_llist_add_entry()
+ *
+ * Purpose: Add an entry before an element in the list. Does
+ * not verify the list or the validity of the entries passed in.
+ */
+void
+dapl_llist_add_entry(DAPL_LLIST_HEAD * head,
+		     DAPL_LLIST_ENTRY * entry,
+		     DAPL_LLIST_ENTRY * new_entry, void *data)
+{
+	DAPL_LLIST_ENTRY *first;
+	DAPL_LLIST_ENTRY *prev;
+
+	/* get the head pointer */
+	first = *head;
+
+	/* link the entry into the queue */
+	prev = entry->blink;
+	entry->blink = new_entry;
+	prev->flink = new_entry;
+
+	new_entry->flink = entry;
+	new_entry->blink = prev;
+
+	new_entry->data = data;
+	new_entry->list_head = head;
+
+	/* If the old entry was the head of the list, adjust */
+	if (first == entry) {
+		(*head) = new_entry;
+	}
+
+}
+
+/*
+ * dapl_llist_remove_head()
+ *
+ * Purpose: Remove the first entry of a linked list
+ */
+void *dapl_llist_remove_head(DAPL_LLIST_HEAD * head)
+{
+	DAPL_LLIST_ENTRY *first;
+
+	dapl_os_assert(!dapl_llist_is_empty(head));
+	first = *head;
+	*head = first->flink;
+
+	first->flink->blink = first->blink;
+	first->blink->flink = first->flink;
+
+	if (first->flink == first) {
+		*head = NULL;
+	}
+	/* clean up the links for good measure */
+	first->flink = NULL;
+	first->blink = NULL;
+	first->list_head = NULL;
+	return (first->data);
+}
+
+/*
+ * dapl_llist_remove_tail()
+ *
+ * Purpose: Remove the last entry of a linked list
+ */
+void *dapl_llist_remove_tail(DAPL_LLIST_HEAD * head)
+{
+	DAPL_LLIST_ENTRY *last;
+
+	dapl_os_assert(!dapl_llist_is_empty(head));
+	last = (*head)->blink;
+
+	last->blink->flink = last->flink;
+	last->flink->blink = last->blink;
+
+	if (last->flink == last) {
+		*head = NULL;
+	}
+	/* clean up the links for good measure */
+	last->flink = NULL;
+	last->blink = NULL;
+	last->list_head = NULL;
+
+	return (last->data);
+}
+
+/*
+ * dapl_llist_remove_entry()
+ *
+ * Purpose: Remove the specified entry from a linked list
+ */
+void *dapl_llist_remove_entry(DAPL_LLIST_HEAD * head, DAPL_LLIST_ENTRY * entry)
+{
+	DAPL_LLIST_ENTRY *first;
+
+	dapl_os_assert(!dapl_llist_is_empty(head));
+	first = *head;
+
+	/* if it's the first entry, pull it off */
+	if (first == entry) {
+		(*head) = first->flink;
+		/* if it was the only entry, kill the list */
+		if (first->flink == first) {
+			(*head) = NULL;
+		}
+	}
+#ifdef VERIFY_LINKED_LIST
+	else {
+		DAPL_LLIST_ENTRY *try_entry;
+
+		try_entry = first->flink;
+		for (;;) {
+			if (try_entry == first) {
+				/* not finding the element on the list is a BAD thing */
+				dapl_os_assert(0);
+				break;
+			}
+			if (try_entry == entry) {
+				break;
+			}
+			try_entry = try_entry->flink;
+		}
+	}
+#endif				/* VERIFY_LINKED_LIST */
+
+	dapl_os_assert(entry->list_head == head);
+	entry->list_head = NULL;
+
+	entry->flink->blink = entry->blink;
+	entry->blink->flink = entry->flink;
+	entry->flink = NULL;
+	entry->blink = NULL;
+
+	return (entry->data);
+}
+
+/*
+ * dapl_llist_peek_head
+ */
+
+void *dapl_llist_peek_head(DAPL_LLIST_HEAD * head)
+{
+	DAPL_LLIST_ENTRY *first;
+
+	dapl_os_assert(!dapl_llist_is_empty(head));
+	first = *head;
+	return (first->data);
+}
+
+/*
+ * dapl_llist_next_entry
+ *
+ * Obtain the next entry in the list, return NULL when we get to the
+ * head
+ */
+
+void *dapl_llist_next_entry(IN DAPL_LLIST_HEAD * head,
+			    IN DAPL_LLIST_ENTRY * cur_ent)
+{
+	DAPL_LLIST_ENTRY *next;
+
+	dapl_os_assert(!dapl_llist_is_empty(head));
+	if (cur_ent == NULL) {
+		next = *head;
+	} else {
+		next = cur_ent->flink;
+		if (next == *head) {
+			return NULL;
+		}
+	}
+	return (next->data);
+}
+
+#ifdef DAPL_DBG
+/*
+ * dapl_llist_debug_print_list()
+ *
+ * Purpose: Prints the linked list for debugging
+ */
+void dapl_llist_debug_print_list(DAPL_LLIST_HEAD * head)
+{
+	DAPL_LLIST_ENTRY *entry;
+	DAPL_LLIST_ENTRY *first;
+	first = *head;
+	if (!first) {
+		dapl_os_printf("EMPTY_LIST\n");
+		return;
+	}
+	dapl_os_printf("HEAD %p\n", *head);
+	dapl_os_printf("Entry %p %p %p %p\n",
+		       first, first->flink, first->blink, first->data);
+	entry = first->flink;
+	while (entry != first) {
+		dapl_os_printf("Entry %p %p %p %p\n",
+			       entry, entry->flink, entry->blink, entry->data);
+		entry = entry->flink;
+	}
+}
+
+#endif				/* DAPL_DBG */
diff --git a/dapl/common/dapl_lmr_free.c b/dapl/common/dapl_lmr_free.c
new file mode 100644
index 0000000..e72824a
--- /dev/null
+++ b/dapl/common/dapl_lmr_free.c
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_lmr_free.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_lmr_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dapl_lmr_free
+ *
+ * DAPL Requirements Version xxx, 6.6.3.2
+ *
+ * Destroy an instance of the Local Memory Region
+ *
+ * Input:
+ * 	lmr_handle
+ *
+ * Output:
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *      DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_STATE 
+ */
+
+DAT_RETURN DAT_API dapl_lmr_free(IN DAT_LMR_HANDLE lmr_handle)
+{
+	DAPL_LMR *lmr;
+	DAPL_PZ *pz;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_lmr_free (%p)\n", lmr_handle);
+
+	if (DAPL_BAD_HANDLE(lmr_handle, DAPL_MAGIC_LMR)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_LMR);
+		goto bail;
+	}
+
+	lmr = (DAPL_LMR *) lmr_handle;
+	pz = (DAPL_PZ *) lmr->param.pz_handle;
+
+	DAPL_CNTR(pz->header.owner_ia, DCNT_IA_LMR_FREE);
+
+	switch (lmr->param.mem_type) {
+#if defined(__KDAPL__)
+	case DAT_MEM_TYPE_PHYSICAL:
+#else
+	case DAT_MEM_TYPE_SHARED_VIRTUAL:
+#endif				/* defined(__KDAPL__) */
+		/* fall through */
+	case DAT_MEM_TYPE_VIRTUAL:
+	case DAT_MEM_TYPE_LMR:
+		{
+			if (0 != dapl_os_atomic_read(&lmr->lmr_ref_count)) {
+				return DAT_INVALID_STATE;
+			}
+
+			dat_status =
+			    dapls_hash_remove(lmr->header.owner_ia->hca_ptr->
+					      lmr_hash_table,
+					      lmr->param.lmr_context, NULL);
+			if (dat_status != DAT_SUCCESS) {
+				goto bail;
+			}
+
+			dat_status = dapls_ib_mr_deregister(lmr);
+
+			if (dat_status == DAT_SUCCESS) {
+				dapl_os_atomic_dec(&pz->pz_ref_count);
+				dapl_lmr_dealloc(lmr);
+			} else {
+				/*
+				 * Deregister failed; put it back in the
+				 * hash table.
+				 */
+				dapls_hash_insert(lmr->header.owner_ia->
+						  hca_ptr->lmr_hash_table,
+						  lmr->param.lmr_context, lmr);
+			}
+
+			break;
+		}
+#if defined(__KDAPL__)
+	case DAT_MEM_TYPE_PLATFORM:
+	case DAT_MEM_TYPE_IA:
+	case DAT_MEM_TYPE_BYPASS:
+		{
+			return DAT_ERROR(DAT_NOT_IMPLEMENTED, 0);
+		}
+#endif				/* defined(__KDAPL__) */
+	default:
+		{
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+			break;
+		}
+	}
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_lmr_query.c b/dapl/common/dapl_lmr_query.c
new file mode 100644
index 0000000..4ac37ec
--- /dev/null
+++ b/dapl/common/dapl_lmr_query.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_lmr_query.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_lmr_query
+ *
+ * Provide the LMR arguments.
+ *
+ * Input:
+ * 	lmr_handle
+ * 	lmr_param_mask
+ *	lmr_param
+ *
+ * Output:
+ * 	lmr_param
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *      DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_lmr_query(IN DAT_LMR_HANDLE lmr_handle,
+	       IN DAT_LMR_PARAM_MASK lmr_param_mask,
+	       IN DAT_LMR_PARAM * lmr_param)
+{
+	DAPL_LMR *lmr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_lmr_query (%p, 0x%x, %p)\n",
+		     lmr_handle, lmr_param_mask, lmr_param);
+
+	if (DAPL_BAD_HANDLE(lmr_handle, DAPL_MAGIC_LMR)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_LMR);
+		goto bail;
+	}
+	if (NULL == lmr_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	dat_status = DAT_SUCCESS;
+	lmr = (DAPL_LMR *) lmr_handle;
+
+	dapl_os_memcpy(lmr_param, &lmr->param, sizeof(DAT_LMR_PARAM));
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_lmr_sync_rdma_read.c b/dapl/common/dapl_lmr_sync_rdma_read.c
new file mode 100644
index 0000000..9f26377
--- /dev/null
+++ b/dapl/common/dapl_lmr_sync_rdma_read.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_lmr_sync_rdma_read.c
+ *
+ * PURPOSE: Interface Adapter management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dat_lmr_sync_rdma_read
+ *
+ * Ensure a region of memory is consistent by locally flushing
+ * non-coherent cache
+ *
+ * Input:
+ *	ia_handle
+ *	local_segments		Array of buffer segments
+ *	num_segments		Number of segments in local_segments
+ *
+ * Output:
+ *	none
+ *
+ * Return Values:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_lmr_sync_rdma_read(IN DAT_IA_HANDLE ia_handle,
+			IN const DAT_LMR_TRIPLET * local_segments,
+			IN DAT_VLEN num_segments)
+{
+	DAPL_IA *ia_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dat_lmr_sync_rdma_read (%p, %p, %ld)\n",
+		     ia_handle, local_segments, num_segments);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	dat_status = dapl_os_sync_rdma_read(local_segments, num_segments);
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_lmr_sync_rdma_write.c b/dapl/common/dapl_lmr_sync_rdma_write.c
new file mode 100644
index 0000000..f20df69
--- /dev/null
+++ b/dapl/common/dapl_lmr_sync_rdma_write.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_lmr_sync_rdma_write.c
+ *
+ * PURPOSE: Interface Adapter management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dat_lmr_sync_rdma_write
+ *
+ * Ensure a region of memory is consistent by locally flushing
+ * non-coherent cache
+ *
+ * Input:
+ *	ia_handle
+ *	local_segments		Array of buffer segments
+ *	num_segments		Number of segments in local_segments
+ *
+ * Output:
+ *	none
+ *
+ * Return Values:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_lmr_sync_rdma_write(IN DAT_IA_HANDLE ia_handle,
+			 IN const DAT_LMR_TRIPLET * local_segments,
+			 IN DAT_VLEN num_segments)
+{
+	DAPL_IA *ia_ptr;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dat_lmr_sync_rdma_write (%p, %p, %ld)\n",
+		     ia_handle, local_segments, num_segments);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	dat_status = dapl_os_sync_rdma_write(local_segments, num_segments);
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_lmr_util.c b/dapl/common/dapl_lmr_util.c
new file mode 100644
index 0000000..40634f1
--- /dev/null
+++ b/dapl/common/dapl_lmr_util.c
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_lmr_util.c
+ *
+ * PURPOSE: Memory management support routines
+ * Description: Support routines for LMR functions
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_lmr_util.h"
+#include "dapl_ia_util.h"
+
+DAPL_LMR *dapl_lmr_alloc(IN DAPL_IA * ia,
+			 IN DAT_MEM_TYPE mem_type,
+			 IN DAT_REGION_DESCRIPTION region_desc,
+			 IN DAT_VLEN length,
+			 IN DAT_PZ_HANDLE pz_handle,
+			 IN DAT_MEM_PRIV_FLAGS mem_priv)
+{
+	DAPL_LMR *lmr;
+
+	/* Allocate LMR */
+	lmr = (DAPL_LMR *) dapl_os_alloc(sizeof(DAPL_LMR));
+	if (NULL == lmr) {
+		return (NULL);
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(lmr, sizeof(DAPL_LMR));
+
+	/*
+	 * initialize the header
+	 */
+	lmr->header.provider = ia->header.provider;
+	lmr->header.magic = DAPL_MAGIC_LMR;
+	lmr->header.handle_type = DAT_HANDLE_TYPE_LMR;
+	lmr->header.owner_ia = ia;
+	lmr->header.user_context.as_64 = 0;
+	lmr->header.user_context.as_ptr = NULL;
+	dapl_llist_init_entry(&lmr->header.ia_list_entry);
+	dapl_ia_link_lmr(ia, lmr);
+	dapl_os_lock_init(&lmr->header.lock);
+
+	/* 
+	 * initialize the body 
+	 */
+	lmr->param.ia_handle = (DAT_IA_HANDLE) ia;
+	lmr->param.mem_type = mem_type;
+	lmr->param.region_desc = region_desc;
+	lmr->param.length = length;
+	lmr->param.pz_handle = pz_handle;
+	lmr->param.mem_priv = mem_priv;
+	dapl_os_atomic_set(&lmr->lmr_ref_count, 0);
+
+	return (lmr);
+}
+
+void dapl_lmr_dealloc(IN DAPL_LMR * lmr)
+{
+	lmr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+	dapl_ia_unlink_lmr(lmr->header.owner_ia, lmr);
+	dapl_os_lock_destroy(&lmr->header.lock);
+
+	dapl_os_free((void *)lmr, sizeof(DAPL_LMR));
+}
diff --git a/dapl/common/dapl_lmr_util.h b/dapl/common/dapl_lmr_util.h
new file mode 100644
index 0000000..6b40107
--- /dev/null
+++ b/dapl/common/dapl_lmr_util.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_lmr_util.h
+ *
+ * PURPOSE: Utility defs & routines for the LMR data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_LMR_UTIL_H_
+#define _DAPL_LMR_UTIL_H_
+
+#include "dapl_mr_util.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAPL_LMR *
+dapl_lmr_alloc (
+    IN DAPL_IA 			*ia, 
+    IN DAT_MEM_TYPE	 	mem_type, 
+    IN DAT_REGION_DESCRIPTION	region_desc,
+    IN DAT_VLEN			length,
+    IN DAT_PZ_HANDLE		pz_handle,
+    IN DAT_MEM_PRIV_FLAGS	mem_priv);
+
+extern void
+dapl_lmr_dealloc (
+    IN DAPL_LMR 		*lmr);
+
+
+#endif /* _DAPL_LMR_UTIL_H_*/
diff --git a/dapl/common/dapl_mr_util.c b/dapl/common/dapl_mr_util.c
new file mode 100644
index 0000000..f0c9a34
--- /dev/null
+++ b/dapl/common/dapl_mr_util.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_mr_util.h"
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_mr_util.c
+ *
+ * PURPOSE: Common Memory Management functions and data structures
+ *
+ * $Id:$
+ **********************************************************************/
+
+/*********************************************************************
+ *                                                                   *
+ * Function Definitions	                                             *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * dapl_mr_get_address
+ *
+ * Returns the memory address associated with the given memory descriptor
+ *
+ * Input:
+ * 	desc		memory descriptor
+ * 	type		type of memory represented by desc
+ *
+ * Output:
+ * 	None
+ *
+ */
+
+DAT_VADDR
+dapl_mr_get_address(IN DAT_REGION_DESCRIPTION desc, IN DAT_MEM_TYPE type)
+{
+	switch (type) {
+	case DAT_MEM_TYPE_VIRTUAL:
+		{
+			return (DAT_VADDR) (uintptr_t) desc.for_va;
+		}
+	case DAT_MEM_TYPE_LMR:
+		{
+			DAPL_LMR *lmr;
+
+			lmr = (DAPL_LMR *) desc.for_lmr_handle;
+
+			/* Since this function is recoursive we cannot inline it */
+			return dapl_mr_get_address(lmr->param.region_desc,
+						   lmr->param.mem_type);
+		}
+#if defined(__KDAPL__)
+	case DAT_MEM_TYPE_PHYSICAL:
+		{
+			return desc.for_pa;
+		}
+#else
+	case DAT_MEM_TYPE_SHARED_VIRTUAL:
+		{
+			/* multi-cast necessary to convert a pvoid to a DAT_VADDR on
+			 * all architectures
+			 */
+			return (DAT_VADDR) (uintptr_t) desc.for_shared_memory.
+			    virtual_address;
+		}
+#endif				/* defined(__KDAPL__) */
+	default:
+		{
+			/*
+			 * The following kDAPL memory types have not been implemented:
+			 *    DAT_MEM_TYPE_PLATFORM
+			 *    DAT_MEM_TYPE_IA
+			 *    DAT_MEM_TYPE_BYPASS
+			 */
+			dapl_os_assert(0);
+			return 0;
+		}
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_mr_util.h b/dapl/common/dapl_mr_util.h
new file mode 100644
index 0000000..140fcaa
--- /dev/null
+++ b/dapl/common/dapl_mr_util.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_mr_util.h
+ *
+ * PURPOSE: Utility defs & routines for memory registration functions
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_MR_UTIL_H_
+#define _DAPL_MR_UTIL_H_
+
+#include "dapl.h"
+#include "dapl_hash.h"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAT_VADDR
+dapl_mr_get_address (
+    IN 	DAT_REGION_DESCRIPTION 		desc, 
+    IN 	DAT_MEM_TYPE 			type);
+
+STATIC _INLINE_ DAT_BOOLEAN
+dapl_mr_bounds_check (
+    IN 	DAT_VADDR 	addr_a, 
+    IN  DAT_VLEN 	length_a,
+    IN 	DAT_VADDR 	addr_b, 
+    IN 	DAT_VLEN 	length_b);
+
+
+/*********************************************************************
+ *                                                                   *
+ * Inline Functions	                                             *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * dapl_mr_bounds_check
+ *
+ * Returns true if region B is contained within region A
+ * and false otherwise
+ *
+ */
+
+STATIC _INLINE_ DAT_BOOLEAN
+dapl_mr_bounds_check (
+    IN  DAT_VADDR 	addr_a, 
+    IN  DAT_VLEN 	length_a,
+    IN  DAT_VADDR 	addr_b, 
+    IN  DAT_VLEN 	length_b)
+{
+    if ( (addr_a <= addr_b) &&
+         (addr_b + length_b) <= (addr_a + length_a))
+    {
+	return DAT_TRUE;
+    }
+    else
+    {
+	return DAT_FALSE;
+    }
+}
+
+#endif /* _DAPL_MR_UTIL_H_ */
diff --git a/dapl/common/dapl_name_service.c b/dapl/common/dapl_name_service.c
new file mode 100644
index 0000000..84ef468
--- /dev/null
+++ b/dapl/common/dapl_name_service.c
@@ -0,0 +1,264 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_name_service.c
+ *
+ * PURPOSE: Provide simple, file base name services in the absence
+ *          of DNS hooks for a particular transport type. If an
+ *          InfiniBand implementation supports IPoIB, this should
+ *	    not be used.
+ *
+ * Description: Interfaces in this file are completely described in
+ *		dapl_name_service.h
+ *
+ * $Id:$
+ **********************************************************************/
+
+/*
+ * Include files for setting up a network name
+ */
+#include "dapl.h"
+#include "dapl_name_service.h"
+
+/*
+ * Prototypes
+ */
+#ifdef IBHOSTS_NAMING
+DAT_RETURN dapli_ns_create_gid_map(void);
+
+DAT_RETURN dapli_ns_add_address(IN DAPL_GID_MAP * gme);
+#endif				/* IBHOSTS_NAMING */
+
+/*
+ * dapls_ns_init
+ *
+ * Initialize naming services
+ *
+ * Input:
+ *	none
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN dapls_ns_init(void)
+{
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+#ifdef IBHOSTS_NAMING
+	dat_status = dapli_ns_create_gid_map();
+#endif				/* IBHOSTS_NAMING */
+
+	return dat_status;
+}
+
+#ifdef IBHOSTS_NAMING
+
+#define	MAX_GID_ENTRIES		32
+DAPL_GID_MAP g_gid_map_table[MAX_GID_ENTRIES];
+
+#ifdef _WIN32
+#define MAP_FILE        "c:/WINNT/system32/drivers/etc/ibhosts"
+#else
+#define MAP_FILE	"/etc/dapl/ibhosts"
+#endif				/* !defined WIN32 */
+
+/*
+ * dapli_ns_create_gid_map()
+ *
+ * Read the MAP_FILE to obtain host names and GIDs.
+ * Create a table containing IP addresses and GIDs which can
+ * be used for lookups.
+ *
+ * This implementation is a simple method providing name services
+ * when more advanced mechanisms do not exist. The proper way
+ * to obtain these mappings is to use a name service such as is
+ * provided by IPoIB on InfiniBand.
+ *
+ * Input:
+ *	device_name		Name of device as reported by the provider
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	char * to string number
+ */
+DAT_RETURN dapli_ns_create_gid_map(void)
+{
+	FILE *f;
+	ib_gid_t gid;
+	char hostname[128];
+	int rc;
+	struct addrinfo *addr;
+	struct sockaddr_in *si;
+	DAPL_GID_MAP gmt;
+
+	f = fopen(MAP_FILE, "r");
+	if (f == NULL) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "ERROR: Must have file <%s> for IP/GID mappings\n",
+			     MAP_FILE);
+		return DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+
+	rc = fscanf(f, "%s " F64x " " F64x, hostname, &gid.gid_prefix,
+		    &gid.guid);
+	while (rc != EOF) {
+		rc = dapls_osd_getaddrinfo(hostname, &addr);
+
+		if (rc != 0) {
+			/*
+			 * hostname not registered in DNS, provide a dummy value
+			 */
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     "WARNING: <%s> not registered in DNS, using dummy IP value\n",
+				     hostname);
+			/*dapl_os_memcpy(hca_ptr->hca_address.sa_data, "0x01020304", 4); */
+			gmt.ip_address = 0x01020304;
+		} else {
+			/*
+			 * Load into the ip/gid mapping table
+			 */
+			si = (struct sockaddr_in *)addr->ai_addr;
+			if (AF_INET == addr->ai_addr->sa_family) {
+				gmt.ip_address = si->sin_addr.s_addr;
+			} else {
+				dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+					     "WARNING: <%s> Address family not supported, using dummy IP value\n",
+					     hostname);
+				gmt.ip_address = 0x01020304;
+			}
+			dapls_osd_freeaddrinfo(addr);
+		}
+		gmt.gid.gid_prefix = gid.gid_prefix;
+		gmt.gid.guid = gid.guid;
+
+		dapli_ns_add_address(&gmt);
+		rc = fscanf(f, "%s " F64x " " F64x, hostname, &gid.gid_prefix,
+			    &gid.guid);
+	}
+
+	fclose(f);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapli_ns_add_address
+ *
+ * Add a table entry to the  gid_map_table.
+ *
+ * Input:
+ *	remote_ia_address	remote IP address
+ *	gid			pointer to output gid
+ *
+ * Output:
+ * 	gid			filled in GID
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN dapli_ns_add_address(IN DAPL_GID_MAP * gme)
+{
+	DAPL_GID_MAP *gmt;
+	int count;
+
+	gmt = g_gid_map_table;
+
+	for (count = 0, gmt = g_gid_map_table; gmt->ip_address; gmt++) {
+		count++;
+	}
+
+	if (count > MAX_GID_ENTRIES) {
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, 0);
+	}
+
+	*gmt = *gme;
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ns_lookup_address
+ *
+ * Look up the provided IA_ADDRESS in the gid_map_table. Return
+ * the gid if found.
+ *
+ * Input:
+ *	remote_ia_address	remote IP address
+ *	gid			pointer to output gid
+ *
+ * Output:
+ * 	gid			filled in GID
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN
+dapls_ns_lookup_address(IN DAPL_IA * ia_ptr,
+			IN DAT_IA_ADDRESS_PTR remote_ia_address,
+			OUT ib_gid_t * gid)
+{
+	DAPL_GID_MAP *gmt;
+	struct sockaddr_in *si;
+
+	ia_ptr = ia_ptr;	/* unused here */
+
+	si = (struct sockaddr_in *)remote_ia_address;
+
+	for (gmt = g_gid_map_table; gmt->ip_address; gmt++) {
+		if (gmt->ip_address == si->sin_addr.s_addr) {
+			gid->guid = gmt->gid.guid;
+			gid->gid_prefix = gmt->gid.gid_prefix;
+
+			return DAT_SUCCESS;
+		}
+	}
+
+	return DAT_ERROR(DAT_INVALID_PARAMETER, 0);
+}
+
+#endif				/* IBHOSTS_NAMING */
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_name_service.h b/dapl/common/dapl_name_service.h
new file mode 100644
index 0000000..2d4725f
--- /dev/null
+++ b/dapl/common/dapl_name_service.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_name_service.h
+ *
+ * PURPOSE: Utility defs & routines supporting name services
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_NAME_SERVICE_H_
+#define _DAPL_NAME_SERVICE_H_
+
+#include "dapl.h"
+
+/*
+ * Prototypes for name service routines
+ */
+
+DAT_RETURN dapls_ns_init (void);
+
+#ifdef IBHOSTS_NAMING
+DAT_RETURN dapls_ns_lookup_address (
+	IN  DAPL_IA		*ia_ptr,
+	IN  DAT_IA_ADDRESS_PTR	remote_ia_address,
+	OUT ib_gid_t		*gid);
+#else
+
+/* routine is a no op if not using local name services */
+#define dapls_ns_lookup_address(ia,ria,gid) DAT_SUCCESS
+
+#endif /* IBHOSTS_NAMING */
+
+#endif /* _DAPL_NAME_SERVICE_H_ */
diff --git a/dapl/common/dapl_provider.c b/dapl/common/dapl_provider.c
new file mode 100755
index 0000000..38db8d7
--- /dev/null
+++ b/dapl/common/dapl_provider.c
@@ -0,0 +1,453 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_provider.c
+ *
+ * PURPOSE: Provider function table
+ * Description: DAT Interfaces to this provider
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_provider.h"
+
+extern DAT_RETURN dapl_not_implemented(void);
+
+/*********************************************************************
+ *                                                                   *
+ * Global Data                                                       *
+ *                                                                   *
+ *********************************************************************/
+
+DAPL_PROVIDER_LIST g_dapl_provider_list;
+
+/*
+ * the function table for this provider
+ */
+
+#if defined(__KDAPL__)
+DAT_PROVIDER g_dapl_provider_template = {
+	NULL,
+	0,
+	&dapl_ia_open,
+	&dapl_ia_query,
+	&dapl_ia_close,
+	&dapl_ia_memtype_hint,	/* unimplemented */
+
+	&dapl_set_consumer_context,	/* untested */
+	&dapl_get_consumer_context,	/* untested */
+	&dapl_get_handle_type,	/* untested */
+
+	&dapl_cr_query,
+	&dapl_cr_accept,
+	&dapl_cr_reject,
+	&dapl_cr_handoff,
+
+	&dapl_evd_kcreate,
+	&dapl_evd_kquery,	/* untested */
+	&dapl_evd_modify_upcall,
+	&dapl_evd_resize,	/* unimplemented */
+	&dapl_evd_post_se,	/* untested */
+	&dapl_evd_dequeue,
+	&dapl_evd_free,
+
+	&dapl_ep_create,
+	&dapl_ep_query,
+	&dapl_ep_modify,	/* untested */
+	&dapl_ep_connect,
+	&dapl_ep_dup_connect,	/* untested */
+	&dapl_ep_disconnect,
+	&dapl_ep_post_send,
+	&dapl_ep_post_recv,
+	&dapl_ep_post_rdma_read,
+	&dapl_ep_post_rdma_write,
+	&dapl_ep_get_status,
+	&dapl_ep_free,
+
+	&dapl_lmr_kcreate,
+	&dapl_lmr_query,
+	&dapl_lmr_free,
+
+	&dapl_rmr_create,
+	&dapl_rmr_query,	/* untested */
+	&dapl_rmr_bind,
+	&dapl_rmr_free,
+
+	&dapl_psp_create,
+	&dapl_psp_query,	/* untested */
+	&dapl_psp_free,
+
+	&dapl_rsp_create,
+	&dapl_rsp_query,	/* untested */
+	&dapl_rsp_free,
+
+	&dapl_pz_create,
+	&dapl_pz_query,		/* untested */
+	&dapl_pz_free,
+
+	/* dat-1.1 */
+	&dapl_psp_create_any,
+	&dapl_ep_reset,
+
+	/* dat-1.2 */
+	&dapl_lmr_sync_rdma_read,
+	&dapl_lmr_sync_rdma_write,
+
+	&dapl_ep_create_with_srq,
+	&dapl_ep_recv_query,
+	&dapl_ep_set_watermark,
+	&dapl_srq_create,
+	&dapl_srq_free,
+	&dapl_srq_post_recv,
+	&dapl_srq_query,
+	&dapl_srq_resize,
+	&dapl_srq_set_lw
+};
+#else
+/*
+ * uDAPL version of the provider jump table
+ */
+DAT_PROVIDER g_dapl_provider_template = {
+	NULL,
+	0,
+	&dapl_ia_open,
+	&dapl_ia_query,
+	&dapl_ia_close,
+
+	&dapl_set_consumer_context,
+	&dapl_get_consumer_context,
+	&dapl_get_handle_type,
+
+	&dapl_cno_create,
+	&dapl_cno_modify_agent,
+	&dapl_cno_query,
+	&dapl_cno_free,
+	&dapl_cno_wait,
+
+	&dapl_cr_query,
+	&dapl_cr_accept,
+	&dapl_cr_reject,
+	&dapl_cr_handoff,
+
+	&dapl_evd_create,
+	&dapl_evd_query,
+	&dapl_evd_modify_cno,
+	&dapl_evd_enable,
+	&dapl_evd_disable,
+	&dapl_evd_wait,
+	&dapl_evd_resize,
+	&dapl_evd_post_se,
+	&dapl_evd_dequeue,
+	&dapl_evd_free,
+
+	&dapl_ep_create,
+	&dapl_ep_query,
+	&dapl_ep_modify,
+	&dapl_ep_connect,
+	&dapl_ep_dup_connect,
+	&dapl_ep_disconnect,
+	&dapl_ep_post_send,
+	&dapl_ep_post_recv,
+	&dapl_ep_post_rdma_read,
+	&dapl_ep_post_rdma_write,
+	&dapl_ep_get_status,
+	&dapl_ep_free,
+
+	&dapl_lmr_create,
+	&dapl_lmr_query,
+	&dapl_lmr_free,
+
+	&dapl_rmr_create,
+	&dapl_rmr_query,
+	&dapl_rmr_bind,
+	&dapl_rmr_free,
+
+	&dapl_psp_create,
+	&dapl_psp_query,
+	&dapl_psp_free,
+
+	&dapl_rsp_create,
+	&dapl_rsp_query,
+	&dapl_rsp_free,
+
+	&dapl_pz_create,
+	&dapl_pz_query,
+	&dapl_pz_free,
+
+	&dapl_psp_create_any,
+	&dapl_ep_reset,
+	&dapl_evd_set_unwaitable,
+	&dapl_evd_clear_unwaitable,
+
+	/* dat-1.2 */
+	&dapl_lmr_sync_rdma_read,
+	&dapl_lmr_sync_rdma_write,
+
+	&dapl_ep_create_with_srq,
+	&dapl_ep_recv_query,
+	&dapl_ep_set_watermark,
+	&dapl_srq_create,
+	&dapl_srq_free,
+	&dapl_srq_post_recv,
+	&dapl_srq_query,
+	&dapl_srq_resize,
+	&dapl_srq_set_lw,
+
+	/* dat-2.0 */
+	&dapl_csp_create,
+	&dapl_csp_query,
+	&dapl_csp_free,
+	&dapl_ep_common_connect,
+	&dapl_rmr_create_for_ep,
+	&dapl_ep_post_send_with_invalidate,
+	&dapl_ep_post_rdma_read_to_rmr,
+	&dapl_cno_fd_create,
+	&dapl_cno_trigger,
+	&dapl_ia_ha
+#ifdef DAT_EXTENSIONS
+	    , &dapl_extensions
+#endif
+};
+#endif				/* __KDAPL__ */
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_BOOLEAN
+dapl_provider_list_key_cmp(const char *name_a, const char *name_b);
+
+/*********************************************************************
+ *                                                                   *
+ * Function Definitions                                              *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_RETURN dapl_provider_list_create(void)
+{
+	DAT_RETURN status;
+
+	status = DAT_SUCCESS;
+
+	/* create the head node */
+	g_dapl_provider_list.head =
+	    dapl_os_alloc(sizeof(DAPL_PROVIDER_LIST_NODE));
+	if (NULL == g_dapl_provider_list.head) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dapl_os_memzero(g_dapl_provider_list.head,
+			sizeof(DAPL_PROVIDER_LIST_NODE));
+
+	/* create the tail node */
+	g_dapl_provider_list.tail =
+	    dapl_os_alloc(sizeof(DAPL_PROVIDER_LIST_NODE));
+	if (NULL == g_dapl_provider_list.tail) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dapl_os_memzero(g_dapl_provider_list.tail,
+			sizeof(DAPL_PROVIDER_LIST_NODE));
+
+	g_dapl_provider_list.head->next = g_dapl_provider_list.tail;
+	g_dapl_provider_list.tail->prev = g_dapl_provider_list.head;
+	g_dapl_provider_list.size = 0;
+
+      bail:
+	if (DAT_SUCCESS != status) {
+		if (NULL != g_dapl_provider_list.head) {
+			dapl_os_free(g_dapl_provider_list.head,
+				     sizeof(DAPL_PROVIDER_LIST_NODE));
+		}
+
+		if (NULL != g_dapl_provider_list.tail) {
+			dapl_os_free(g_dapl_provider_list.tail,
+				     sizeof(DAPL_PROVIDER_LIST_NODE));
+		}
+	}
+
+	return status;
+}
+
+DAT_RETURN dapl_provider_list_destroy(void)
+{
+	DAPL_PROVIDER_LIST_NODE *cur_node;
+
+	while (NULL != g_dapl_provider_list.head) {
+		cur_node = g_dapl_provider_list.head;
+		g_dapl_provider_list.head = cur_node->next;
+
+		dapl_os_free(cur_node, sizeof(DAPL_PROVIDER_LIST_NODE));
+	}
+
+	return DAT_SUCCESS;
+}
+
+DAT_COUNT dapl_provider_list_size(void)
+{
+	return g_dapl_provider_list.size;
+}
+
+DAT_RETURN
+dapl_provider_list_insert(IN const char *name, IN DAT_PROVIDER ** p_data)
+{
+	DAPL_PROVIDER_LIST_NODE *cur_node, *prev_node, *next_node;
+	DAT_RETURN status;
+	unsigned int len;
+
+	status = DAT_SUCCESS;
+
+	cur_node = dapl_os_alloc(sizeof(DAPL_PROVIDER_LIST_NODE));
+
+	if (NULL == cur_node) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	len = dapl_os_strlen(name);
+
+	if (DAT_NAME_MAX_LENGTH <= len) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	/* insert node at end of list to preserve registration order */
+	prev_node = g_dapl_provider_list.tail->prev;
+	next_node = g_dapl_provider_list.tail;
+
+	dapl_os_memcpy(cur_node->name, name, len);
+	cur_node->name[len] = '\0';
+	cur_node->data = g_dapl_provider_template;
+	cur_node->data.device_name = cur_node->name;
+
+	cur_node->next = next_node;
+	cur_node->prev = prev_node;
+
+	prev_node->next = cur_node;
+	next_node->prev = cur_node;
+
+	g_dapl_provider_list.size++;
+
+	if (NULL != p_data) {
+		*p_data = &cur_node->data;
+	}
+
+      bail:
+	if (DAT_SUCCESS != status) {
+		if (NULL != cur_node) {
+			dapl_os_free(cur_node, sizeof(DAPL_PROVIDER_LIST_NODE));
+		}
+	}
+
+	return status;
+}
+
+DAT_RETURN
+dapl_provider_list_search(IN const char *name, OUT DAT_PROVIDER ** p_data)
+{
+	DAPL_PROVIDER_LIST_NODE *cur_node;
+	DAT_RETURN status;
+
+	status = DAT_ERROR(DAT_PROVIDER_NOT_FOUND, DAT_NAME_NOT_REGISTERED);
+
+	for (cur_node = g_dapl_provider_list.head->next;
+	     g_dapl_provider_list.tail != cur_node; cur_node = cur_node->next) {
+		if (dapl_provider_list_key_cmp(cur_node->name, name)) {
+			if (NULL != p_data) {
+				*p_data = &cur_node->data;
+			}
+
+			status = DAT_SUCCESS;
+			goto bail;
+		}
+	}
+
+      bail:
+	return status;
+}
+
+DAT_RETURN dapl_provider_list_remove(IN const char *name)
+{
+	DAPL_PROVIDER_LIST_NODE *cur_node, *prev_node, *next_node;
+	DAT_RETURN status;
+
+	status = DAT_ERROR(DAT_PROVIDER_NOT_FOUND, DAT_NAME_NOT_REGISTERED);
+
+	for (cur_node = g_dapl_provider_list.head->next;
+	     g_dapl_provider_list.tail != cur_node; cur_node = cur_node->next) {
+		if (dapl_provider_list_key_cmp(cur_node->name, name)) {
+			prev_node = cur_node->prev;
+			next_node = cur_node->next;
+
+			prev_node->next = next_node;
+			next_node->prev = prev_node;
+
+			dapl_os_free(cur_node, sizeof(DAPL_PROVIDER_LIST_NODE));
+
+			g_dapl_provider_list.size--;
+
+			status = DAT_SUCCESS;
+			goto bail;
+		}
+	}
+
+      bail:
+	return status;
+}
+
+DAT_BOOLEAN dapl_provider_list_key_cmp(const char *name_a, const char *name_b)
+{
+	unsigned int len;
+
+	len = dapl_os_strlen(name_a);
+
+	if (dapl_os_strlen(name_b) != len) {
+		return DAT_FALSE;
+	} else if (dapl_os_memcmp(name_a, name_b, len)) {
+		return DAT_FALSE;
+	} else {
+		return DAT_TRUE;
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_provider.h b/dapl/common/dapl_provider.h
new file mode 100644
index 0000000..32b91df
--- /dev/null
+++ b/dapl/common/dapl_provider.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_provider.h
+ *
+ * PURPOSE: Provider function table
+ * Description: DAT Interfaces to this provider
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _DAPL_PROVIDER_H_
+#define _DAPL_PROVIDER_H_
+
+#include "dapl.h"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Structures                                                        *
+ *                                                                   *
+ *********************************************************************/
+
+typedef struct DAPL_PROVIDER_LIST_NODE
+{
+    char                		name[DAT_NAME_MAX_LENGTH];
+    DAT_PROVIDER 			data;
+    struct DAPL_PROVIDER_LIST_NODE 	*next;
+    struct DAPL_PROVIDER_LIST_NODE 	*prev;
+} DAPL_PROVIDER_LIST_NODE;
+
+
+typedef struct DAPL_PROVIDER_LIST
+{
+    DAPL_PROVIDER_LIST_NODE 		*head;
+    DAPL_PROVIDER_LIST_NODE 		*tail;
+    DAT_COUNT           		size;
+} DAPL_PROVIDER_LIST;
+
+
+/*********************************************************************
+ *                                                                   *
+ * Global Data                                                       *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAPL_PROVIDER_LIST 	g_dapl_provider_list;
+extern DAT_PROVIDER 		g_dapl_provider_template;
+extern int 			g_dapl_loopback_connection;
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAT_RETURN
+dapl_provider_list_create( void );
+
+extern DAT_RETURN
+dapl_provider_list_destroy( void );
+
+extern DAT_COUNT
+dapl_provider_list_size( void );
+
+extern DAT_RETURN
+dapl_provider_list_insert(
+    IN  const char *name,
+    OUT DAT_PROVIDER **p_data );
+
+extern DAT_RETURN
+dapl_provider_list_search(
+    IN  const char *name,
+    OUT DAT_PROVIDER **p_data );
+
+extern DAT_RETURN
+dapl_provider_list_remove(
+    IN  const char *name );
+
+
+#endif /* _DAPL_PROVIDER_H_ */
diff --git a/dapl/common/dapl_psp_create.c b/dapl/common/dapl_psp_create.c
new file mode 100644
index 0000000..adef59f
--- /dev/null
+++ b/dapl/common/dapl_psp_create.c
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_psp_create.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_sp_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_psp_create
+ *
+ * uDAPL: User Direct Access Program Library Version 1.1, 6.4.1.1
+ *
+ * Create a persistent Public Service Point that can receive multiple
+ * requests for connections and generate multiple connection request
+ * instances that will be delivered to the specified Event Dispatcher
+ * in a notification event.
+ *
+ * Input:
+ * 	ia_handle
+ * 	conn_qual
+ * 	evd_handle
+ * 	psp_flags
+ *
+ * Output:
+ * 	psp_handle
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_CONN_QUAL_IN_USE
+ * 	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_psp_create(IN DAT_IA_HANDLE ia_handle,
+		IN DAT_CONN_QUAL conn_qual,
+		IN DAT_EVD_HANDLE evd_handle,
+		IN DAT_PSP_FLAGS psp_flags, OUT DAT_PSP_HANDLE * psp_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_SP *sp_ptr;
+	DAPL_EVD *evd_ptr;
+	DAT_BOOLEAN sp_found;
+	DAT_RETURN dat_status;
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	if (psp_handle == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG5);
+		goto bail;
+	}
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	if (!(evd_ptr->evd_flags & DAT_EVD_CR_FLAG)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	if (psp_flags != DAT_PSP_CONSUMER_FLAG &&
+	    psp_flags != DAT_PSP_PROVIDER_FLAG) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+
+	DAPL_CNTR(ia_ptr, DCNT_IA_PSP_CREATE);
+
+	/*
+	 * See if we have a quiescent listener to use for this PSP, else
+	 * create one and set it listening
+	 */
+	sp_ptr = dapls_ia_sp_search(ia_ptr, conn_qual, DAT_TRUE);
+	sp_found = DAT_TRUE;
+	if (sp_ptr == NULL) {
+		/* Allocate PSP */
+		sp_found = DAT_FALSE;
+		sp_ptr = dapls_sp_alloc(ia_ptr, DAT_TRUE);
+		if (sp_ptr == NULL) {
+			dat_status =
+			    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				      DAT_RESOURCE_MEMORY);
+			goto bail;
+		}
+	} else if (sp_ptr->listening == DAT_TRUE) {
+		dat_status = DAT_ERROR(DAT_CONN_QUAL_IN_USE, 0);
+		goto bail;
+	}
+
+	/*
+	 * Fill out the args for a PSP
+	 */
+	sp_ptr->conn_qual = conn_qual;
+	sp_ptr->evd_handle = evd_handle;
+	sp_ptr->psp_flags = psp_flags;
+	sp_ptr->ep_handle = NULL;
+
+	/*
+	 * Take a reference on the EVD handle
+	 */
+	dapl_os_atomic_inc(&((DAPL_EVD *) evd_handle)->evd_ref_count);
+
+	/* 
+	 * Set up a listener for a connection. Connections can arrive
+	 * even before this call returns!
+	 */
+	sp_ptr->state = DAPL_SP_STATE_PSP_LISTENING;
+	sp_ptr->listening = DAT_TRUE;
+
+	/*
+	 * If this is a new sp we need to add it to the IA queue, and set up
+	 * a conn_listener.
+	 */
+	if (sp_found == DAT_FALSE) {
+		/* Link it onto the IA before enabling it to receive conn
+		 * requests
+		 */
+		dapl_ia_link_psp(ia_ptr, sp_ptr);
+
+		dat_status = dapls_ib_setup_conn_listener(ia_ptr,
+							  conn_qual, sp_ptr);
+
+		if (dat_status != DAT_SUCCESS) {
+			/*
+			 * Have a problem setting up the connection, something
+			 * wrong!  Decrements the EVD refcount & release it.
+			 */
+			dapl_os_atomic_dec(&((DAPL_EVD *) evd_handle)->
+					   evd_ref_count);
+			sp_ptr->evd_handle = NULL;
+			dapls_ia_unlink_sp(ia_ptr, sp_ptr);
+			dapls_sp_free_sp(sp_ptr);
+
+			dapl_dbg_log(DAPL_DBG_TYPE_CM,
+				     "--> dapl_psp_create setup_conn_listener failed: %x\n",
+				     dat_status);
+
+			goto bail;
+		}
+	}
+
+	/*
+	 * Return handle to the user
+	 */
+	*psp_handle = (DAT_PSP_HANDLE) sp_ptr;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_psp_create_any.c b/dapl/common/dapl_psp_create_any.c
new file mode 100644
index 0000000..c9f53e0
--- /dev/null
+++ b/dapl/common/dapl_psp_create_any.c
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_psp_create.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_sp_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_psp_create_any
+ *
+ * uDAPL: User Direct Access Program Library Version 1.1, 6.4.3.3
+ *
+ * Create a persistent Public Service Point that can receive multiple
+ * requests for connections and generate multiple connection request
+ * instances that will be delivered to the specified Event Dispatcher
+ * in a notification event. Differs from dapl_psp_create() in that
+ * the conn_qual is selected by the implementation and returned to
+ * the user.
+ *
+ * Input:
+ * 	ia_handle
+ * 	evd_handle
+ * 	psp_flags
+ *
+ * Output:
+ * 	conn_qual
+ * 	psp_handle
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_CONN_QUAL_IN_USE
+ * 	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_psp_create_any(IN DAT_IA_HANDLE ia_handle,
+		    OUT DAT_CONN_QUAL * conn_qual,
+		    IN DAT_EVD_HANDLE evd_handle,
+		    IN DAT_PSP_FLAGS psp_flags, OUT DAT_PSP_HANDLE * psp_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_SP *sp_ptr;
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+	static DAT_CONN_QUAL hint_conn_qual = 1024;	/* seed value */
+	DAT_CONN_QUAL lcl_conn_qual;
+	DAT_CONN_QUAL limit_conn_qual;
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	if (psp_handle == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG5);
+		goto bail;
+	}
+	if (conn_qual == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	if (!(evd_ptr->evd_flags & DAT_EVD_CR_FLAG)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	if (psp_flags != DAT_PSP_CONSUMER_FLAG &&
+	    psp_flags != DAT_PSP_PROVIDER_FLAG) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+
+	/* Allocate PSP */
+	sp_ptr = dapls_sp_alloc(ia_ptr, DAT_TRUE);
+	if (sp_ptr == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	DAPL_CNTR(ia_ptr, DCNT_IA_PSP_CREATE_ANY);
+
+	/*
+	 * Fill out the args for a PSP
+	 */
+	sp_ptr->evd_handle = evd_handle;
+	sp_ptr->psp_flags = psp_flags;
+	sp_ptr->ep_handle = NULL;
+
+	/*
+	 * Take a reference on the EVD handle
+	 */
+	dapl_os_atomic_inc(&((DAPL_EVD *) evd_handle)->evd_ref_count);
+
+	/* Link it onto the IA */
+	dapl_ia_link_psp(ia_ptr, sp_ptr);
+
+	/* 
+	 * Set up a listener for a connection. Connections can arrive
+	 * even before this call returns!
+	 */
+	sp_ptr->state = DAPL_SP_STATE_PSP_LISTENING;
+	sp_ptr->listening = DAT_TRUE;
+
+	limit_conn_qual = 0;
+	lcl_conn_qual = hint_conn_qual;
+	dat_status = ~DAT_SUCCESS;
+
+	while (dat_status != DAT_SUCCESS) {
+		dat_status = dapls_ib_setup_conn_listener(ia_ptr,
+							  lcl_conn_qual,
+							  sp_ptr);
+
+		lcl_conn_qual++;
+
+		if (dat_status == DAT_CONN_QUAL_IN_USE) {
+			/*
+			 * If we have a big number of tries and we still haven't
+			 * found a service_ID we can use, bail out with an error,
+			 * something is wrong!
+			 */
+			if (limit_conn_qual++ > 100000) {
+				dat_status = DAT_CONN_QUAL_UNAVAILABLE;
+				break;
+			}
+		}
+	}
+	hint_conn_qual = lcl_conn_qual;
+
+	if (dat_status != DAT_SUCCESS) {
+		/*
+		 * Have a problem setting up the connection, something wrong!
+		 */
+		dapl_os_atomic_dec(&((DAPL_EVD *) evd_handle)->evd_ref_count);
+		sp_ptr->evd_handle = NULL;
+		dapls_ia_unlink_sp(ia_ptr, sp_ptr);
+		dapls_sp_free_sp(sp_ptr);
+
+		dapl_os_printf
+		    ("--> dapl_psp_create cannot set up conn listener: %x\n",
+		     dat_status);
+
+		goto bail;
+	}
+
+	sp_ptr->conn_qual = lcl_conn_qual - 1;
+
+	/*
+	 * Return handle to the user
+	 */
+	*conn_qual = sp_ptr->conn_qual;
+	*psp_handle = (DAT_PSP_HANDLE) sp_ptr;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_psp_free.c b/dapl/common/dapl_psp_free.c
new file mode 100644
index 0000000..9df2db1
--- /dev/null
+++ b/dapl/common/dapl_psp_free.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_psp_free.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_sp_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_psp_free
+ *
+ * uDAPL: User Direct Access Program Library Version 1.1, 6.4.1.2
+ *
+ * Destroy a specific instance of a Service Point.
+ *
+ * Input:
+ * 	psp_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API dapl_psp_free(IN DAT_PSP_HANDLE psp_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_SP *sp_ptr;
+	DAT_RETURN dat_status;
+	DAPL_SP_STATE save_state;
+
+	sp_ptr = (DAPL_SP *) psp_handle;
+	dat_status = DAT_SUCCESS;
+	/*
+	 * Verify handle
+	 */
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, ">>> dapl_psp_free %p\n", psp_handle);
+
+	if (DAPL_BAD_HANDLE(sp_ptr, DAPL_MAGIC_PSP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PSP);
+		goto bail;
+	}
+
+	ia_ptr = sp_ptr->header.owner_ia;
+
+	DAPL_CNTR(ia_ptr->header.owner_ia, DCNT_IA_PSP_FREE);
+
+	/* 
+	 * Remove the connection listener if it has been established
+	 * and there are no current connections in progress.
+	 * If we defer removing the sp it becomes something of a zombie
+	 * container until the last connection is disconnected, after
+	 * which it will be cleaned up.
+	 */
+	dapl_os_lock(&sp_ptr->header.lock);
+
+	sp_ptr->listening = DAT_FALSE;
+
+	/* Release reference on EVD. If an error was encountered in a previous
+	 * free the evd_handle will be NULL
+	 */
+	if (sp_ptr->evd_handle) {
+		dapl_os_atomic_dec(&((DAPL_EVD *) sp_ptr->evd_handle)->
+				   evd_ref_count);
+		sp_ptr->evd_handle = NULL;
+	}
+
+	/*
+	 * Release the base resource if there are no outstanding
+	 * connections; else the last disconnect on this PSP will free it
+	 * up. The PSP is used to contain CR records for each connection,
+	 * which contain information necessary to disconnect.
+	 */
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     ">>> dapl_psp_free: state %d cr_list_count %d\n",
+		     sp_ptr->state, sp_ptr->cr_list_count);
+
+	if ((sp_ptr->state == DAPL_SP_STATE_PSP_LISTENING ||
+	     sp_ptr->state == DAPL_SP_STATE_PSP_PENDING) &&
+	    sp_ptr->cr_list_count == 0) {
+		save_state = sp_ptr->state;
+		sp_ptr->state = DAPL_SP_STATE_FREE;
+		dapl_os_unlock(&sp_ptr->header.lock);
+
+		dat_status = dapls_ib_remove_conn_listener(ia_ptr, sp_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			/* revert to entry state on error */
+			sp_ptr->state = save_state;
+			goto bail;
+		}
+		dapls_ia_unlink_sp(ia_ptr, sp_ptr);
+		dapls_sp_free_sp(sp_ptr);
+	} else {
+		/* The PSP is now in the pending state, where it will sit until
+		 * the last connection terminates or the app uses the same
+		 * ServiceID again, which will reactivate it.
+		 */
+		sp_ptr->state = DAPL_SP_STATE_PSP_PENDING;
+		dapl_os_unlock(&sp_ptr->header.lock);
+		dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			     ">>> dapl_psp_free: PSP PENDING\n");
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_psp_query.c b/dapl/common/dapl_psp_query.c
new file mode 100644
index 0000000..d990ebd
--- /dev/null
+++ b/dapl/common/dapl_psp_query.c
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_psp_query.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_psp_query
+ *
+ * uDAPL: User Direct Access Program Library Version 1.1, 6.4.1.3
+ *
+ * Provide arguments of the public service points
+ *
+ * Input:
+ *	psp_handle
+ *	psp_args_mask
+ *
+ * Output:
+ * 	psp_args
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_psp_query(IN DAT_PSP_HANDLE psp_handle,
+	       IN DAT_PSP_PARAM_MASK psp_args_mask,
+	       OUT DAT_PSP_PARAM * psp_param)
+{
+	DAPL_SP *sp_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(psp_handle, DAPL_MAGIC_PSP) ||
+	    ((DAPL_SP *) psp_handle)->listening != DAT_TRUE) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PSP);
+		goto bail;
+	}
+
+	if (NULL == psp_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	sp_ptr = (DAPL_SP *) psp_handle;
+
+	/*
+	 * Fill in the PSP params
+	 */
+	psp_param->ia_handle = sp_ptr->header.owner_ia;
+	psp_param->conn_qual = sp_ptr->conn_qual;
+	psp_param->evd_handle = sp_ptr->evd_handle;
+	psp_param->psp_flags = sp_ptr->psp_flags;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_pz_create.c b/dapl/common/dapl_pz_create.c
new file mode 100644
index 0000000..95a4703
--- /dev/null
+++ b/dapl/common/dapl_pz_create.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_pz_create.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_pz_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_pz_create
+ *
+ * Create an instance of a protection zone
+ *
+ * Input:
+ *      ia_handle
+ *
+ * Output:
+ *      pz_handle
+ *
+ * Returns:
+ *      DAT_SUCCESS
+ *      DAT_INSUFFICIENT_RESOURCES
+ *      DAT_INVALID_PARAMETER
+ *      DAT_INVLAID_HANDLE
+ */
+DAT_RETURN DAT_API
+dapl_pz_create(IN DAT_IA_HANDLE ia_handle, OUT DAT_PZ_HANDLE * pz_handle)
+{
+	DAPL_IA *ia;
+	DAPL_PZ *pz;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_pz_create (%p, %p)\n", ia_handle, pz_handle);
+
+	dat_status = DAT_SUCCESS;
+	if (DAPL_BAD_HANDLE(ia_handle, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	if (NULL == pz_handle) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	ia = (DAPL_IA *) ia_handle;
+
+	pz = dapl_pz_alloc(ia);
+	if (NULL == pz) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+	DAPL_CNTR(ia, DCNT_IA_PZ_CREATE);
+
+	dat_status = dapls_ib_pd_alloc(ia, pz);
+	if (DAT_SUCCESS != dat_status) {
+		dapl_pz_dealloc(pz);
+		pz = NULL;
+	}
+
+	*pz_handle = pz;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_pz_free.c b/dapl/common/dapl_pz_free.c
new file mode 100644
index 0000000..6c3970c
--- /dev/null
+++ b/dapl/common/dapl_pz_free.c
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_pz_free.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_pz_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_pz_free
+ *
+ * Remove an instance of a protection zone
+ *
+ * Input:
+ * 	pz_handle
+ *
+ * Output:
+ * 	None.
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_STATE
+ * 	DAT_INVALID_HANDLE
+ */
+DAT_RETURN DAT_API dapl_pz_free(IN DAT_PZ_HANDLE pz_handle)
+{
+	DAPL_PZ *pz;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_pz_free (%p)\n", pz_handle);
+
+	dat_status = DAT_SUCCESS;
+	if (DAPL_BAD_HANDLE(pz_handle, DAPL_MAGIC_PZ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+		goto bail;
+	}
+
+	pz = (DAPL_PZ *) pz_handle;
+
+	DAPL_CNTR(pz->header.owner_ia, DCNT_IA_PZ_FREE);
+
+	if (0 != dapl_os_atomic_read(&pz->pz_ref_count)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_PZ_IN_USE);
+		goto bail;
+	}
+
+	dat_status = dapls_ib_pd_free(pz);
+	if (DAT_SUCCESS == dat_status) {
+		dapl_pz_dealloc(pz);
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_pz_query.c b/dapl/common/dapl_pz_query.c
new file mode 100644
index 0000000..5829af4
--- /dev/null
+++ b/dapl/common/dapl_pz_query.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_pz_query.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_pz_query
+ *
+ * Return the ia associated with the protection zone pz
+ *
+ * Input:
+ * 	pz_handle
+ *      pz_param_mask
+ *
+ * Output:
+ * 	pz_param
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *      DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_pz_query(IN DAT_PZ_HANDLE pz_handle,
+	      IN DAT_PZ_PARAM_MASK pz_param_mask, OUT DAT_PZ_PARAM * pz_param)
+{
+	DAPL_PZ *pz;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_pz_query (%p, %x, %p)\n",
+		     pz_handle, pz_param_mask, pz_param);
+
+	if (DAPL_BAD_HANDLE(pz_handle, DAPL_MAGIC_PZ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+		goto bail;
+	}
+	if (NULL == pz_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	dat_status = DAT_SUCCESS;
+	pz = (DAPL_PZ *) pz_handle;
+
+	/* Since the DAT_PZ_ARGS values are easily accessible, */
+	/* don't bother checking the DAT_PZ_ARGS_MASK value    */
+	pz_param->ia_handle = (DAT_IA_HANDLE) pz->header.owner_ia;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_pz_util.c b/dapl/common/dapl_pz_util.c
new file mode 100644
index 0000000..ebfb6c8
--- /dev/null
+++ b/dapl/common/dapl_pz_util.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_pz_util.c
+ *
+ * PURPOSE: Manage PZ structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_pz_util.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dapl_pz_alloc
+ *
+ * alloc and initialize an PZ struct
+ *
+ * Input:
+ * 	none
+ *
+ * Output:
+ * 	pz_ptr
+ *
+ * Returns:
+ * 	none
+ *
+ */
+DAPL_PZ *dapl_pz_alloc(IN DAPL_IA * ia)
+{
+	DAPL_PZ *pz;
+
+	/* Allocate PZ */
+	pz = (DAPL_PZ *) dapl_os_alloc(sizeof(DAPL_PZ));
+	if (NULL == pz) {
+		return (NULL);
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(pz, sizeof(DAPL_PZ));
+
+	/*
+	 * initialize the header
+	 */
+	pz->header.provider = ia->header.provider;
+	pz->header.magic = DAPL_MAGIC_PZ;
+	pz->header.handle_type = DAT_HANDLE_TYPE_PZ;
+	pz->header.owner_ia = ia;
+	pz->header.user_context.as_64 = 0;
+	pz->header.user_context.as_ptr = NULL;
+	dapl_llist_init_entry(&pz->header.ia_list_entry);
+	dapl_ia_link_pz(ia, pz);
+	dapl_os_lock_init(&pz->header.lock);
+
+	/* 
+	 * initialize the body 
+	 */
+	dapl_os_atomic_set(&pz->pz_ref_count, 0);
+
+	return (pz);
+}
+
+/*
+ * dapl_pz_free
+ *
+ * free an PZ struct
+ *
+ * Input:
+ * 	pz_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_pz_dealloc(IN DAPL_PZ * pz)
+{
+	pz->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+	dapl_ia_unlink_pz(pz->header.owner_ia, pz);
+	dapl_os_lock_destroy(&pz->header.lock);
+
+	dapl_os_free(pz, sizeof(DAPL_PZ));
+}
diff --git a/dapl/common/dapl_pz_util.h b/dapl/common/dapl_pz_util.h
new file mode 100644
index 0000000..c7aa8de
--- /dev/null
+++ b/dapl/common/dapl_pz_util.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_pz_util.h
+ *
+ * PURPOSE: Utility defs & routines for the PZ data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_PZ_UTIL_H_
+#define _DAPL_PZ_UTIL_H_
+
+#include "dapl.h"
+
+extern DAPL_PZ *
+dapl_pz_alloc (
+    IN DAPL_IA 	*ia);
+
+extern void
+dapl_pz_dealloc (
+    IN DAPL_PZ  *pz);
+
+#endif /* _DAPL_PZ_UTIL_H_ */
diff --git a/dapl/common/dapl_ring_buffer_util.c b/dapl/common/dapl_ring_buffer_util.c
new file mode 100644
index 0000000..54517a9
--- /dev/null
+++ b/dapl/common/dapl_ring_buffer_util.c
@@ -0,0 +1,317 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ring_buffer_util.c
+ *
+ * PURPOSE: Ring buffer management
+ * Description: Support and management functions for ring buffers
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_ring_buffer_util.h"
+
+/*
+ * dapls_rbuf_alloc
+ *
+ * Given a DAPL_RING_BUFFER, initialize it and provide memory for
+ * the ringbuf itself. A passed in size will be adjusted to the next
+ * largest power of two number to simplify management.
+ *
+ * Input:
+ *	rbuf		pointer to DAPL_RING_BUFFER
+ *	size		number of elements to allocate & manage
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN dapls_rbuf_alloc(INOUT DAPL_RING_BUFFER * rbuf, IN DAT_COUNT size)
+{
+	unsigned int rsize;	/* real size */
+
+	/* The circular buffer must be allocated one too large.
+	 * This eliminates any need for a distinct counter, as
+	 * having the two pointers equal always means "empty" -- never "full"
+	 */
+	size++;
+
+	/* Put size on a power of 2 boundary */
+	rsize = 1;
+	while ((DAT_COUNT) rsize < size) {
+		rsize <<= 1;
+	}
+
+	rbuf->base = (void *)dapl_os_alloc(rsize * sizeof(void *));
+	if (rbuf->base != NULL) {
+		rbuf->lim = rsize - 1;
+		dapl_os_atomic_set(&rbuf->head, 0);
+		dapl_os_atomic_set(&rbuf->tail, 0);
+	} else {
+		return DAT_INSUFFICIENT_RESOURCES | DAT_RESOURCE_MEMORY;
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_rbuf_realloc
+ *
+ * Resizes a DAPL_RING_BUFFER. This function is not thread safe;
+ * adding or removing elements from a ring buffer while resizing 
+ * will have indeterminate results.
+ *
+ * Input:
+ *	rbuf		pointer to DAPL_RING_BUFFER
+ *	size		number of elements to allocate & manage
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_STATE
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN dapls_rbuf_realloc(INOUT DAPL_RING_BUFFER * rbuf, IN DAT_COUNT size)
+{
+	DAPL_RING_BUFFER new_rbuf;
+	void *entry;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	/* decreasing the size or retaining the old size is not allowed */
+	if (size <= rbuf->lim + 1) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	/*
+	 * !This is NOT ATOMIC!
+	 * Simple algorithm: Allocate a new ring buffer, take everything
+	 * out of the old one and put it in the new one, and release the 
+	 * old base buffer.
+	 */
+	dat_status = dapls_rbuf_alloc(&new_rbuf, size);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+
+	while ((entry = dapls_rbuf_remove(rbuf)) != NULL) {
+		/* We know entries will fit so ignore the return code */
+		(void)dapls_rbuf_add(&new_rbuf, entry);
+	}
+
+	/* release the old base buffer */
+	dapl_os_free(rbuf->base, (rbuf->lim + 1) * sizeof(void *));
+
+	*rbuf = new_rbuf;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * dapls_rbuf_destroy
+ *
+ * Release the buffer and reset pointers to a DAPL_RING_BUFFER
+ *
+ * Input:
+ *	rbuf		pointer to DAPL_RING_BUFFER
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	none
+ *
+ */
+void dapls_rbuf_destroy(IN DAPL_RING_BUFFER * rbuf)
+{
+	if ((NULL == rbuf) || (NULL == rbuf->base)) {
+		return;
+	}
+
+	dapl_os_free(rbuf->base, (rbuf->lim + 1) * sizeof(void *));
+	rbuf->base = NULL;
+	rbuf->lim = 0;
+
+	return;
+}
+
+/*
+ * dapls_rbuf_add
+ *
+ * Add an entry to the ring buffer
+ *
+ * Input:
+ *	rbuf		pointer to DAPL_RING_BUFFER
+ *	entry		entry to add
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES         (queue full)
+ *
+ */
+DAT_RETURN dapls_rbuf_add(IN DAPL_RING_BUFFER * rbuf, IN void *entry)
+{
+	int pos;
+	int val;
+
+	while (((dapl_os_atomic_read(&rbuf->head) + 1) & rbuf->lim) !=
+	       (dapl_os_atomic_read(&rbuf->tail) & rbuf->lim)) {
+		pos = dapl_os_atomic_read(&rbuf->head);
+		val = dapl_os_atomic_assign(&rbuf->head, pos, pos + 1);
+		if (val == pos) {
+			pos = (pos + 1) & rbuf->lim;	/* verify in range */
+			rbuf->base[pos] = entry;
+			return DAT_SUCCESS;
+		}
+	}
+
+	return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+
+}
+
+/*
+ * dapls_rbuf_remove
+ *
+ * Remove an entry from the ring buffer
+ *
+ * Input:
+ *	rbuf		pointer to DAPL_RING_BUFFER
+ *
+ * Output:
+ *	entry		entry removed from the ring buffer
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_QUEUE_EMPTY
+   
+ */
+void *dapls_rbuf_remove(IN DAPL_RING_BUFFER * rbuf)
+{
+	int pos;
+	int val;
+
+	while (dapl_os_atomic_read(&rbuf->head) !=
+	       dapl_os_atomic_read(&rbuf->tail)) {
+		pos = dapl_os_atomic_read(&rbuf->tail);
+		val = dapl_os_atomic_assign(&rbuf->tail, pos, pos + 1);
+		if (val == pos) {
+			pos = (pos + 1) & rbuf->lim;	/* verify in range */
+
+			return (rbuf->base[pos]);
+		}
+	}
+
+	return NULL;
+
+}
+
+/*
+ * dapli_rbuf_count
+ *
+ * Return the number of entries in use in the ring buffer
+ *
+ * Input:
+ *      rbuf            pointer to DAPL_RING_BUFFER
+ *
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	count of entries
+ *
+ */
+DAT_COUNT dapls_rbuf_count(IN DAPL_RING_BUFFER * rbuf)
+{
+	DAT_COUNT count;
+	int head;
+	int tail;
+
+	head = dapl_os_atomic_read(&rbuf->head) & rbuf->lim;
+	tail = dapl_os_atomic_read(&rbuf->tail) & rbuf->lim;
+	if (head > tail) {
+		count = head - tail;
+	} else {
+		/* add 1 to lim as it is a mask, number of entries - 1 */
+		count = (rbuf->lim + 1 - tail + head) & rbuf->lim;
+	}
+
+	return count;
+}
+
+/*
+ * dapls_rbuf_adjust
+ *
+ * Adjusts the addresses of all elements stored in the 
+ * ring buffer by a constant. This is useful for situations 
+ * in which the memory area for the elements being stored 
+ * has been reallocated (see dapl_evd_realloc() and helper 
+ * functions).
+ *
+ * Input:
+ *	rbuf		pointer to DAPL_RING_BUFFER
+ *	offset		offset to adjust elemnt addresss by,
+ *                      used for addresses of type void *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	none
+ */
+void dapls_rbuf_adjust(IN DAPL_RING_BUFFER * rbuf, IN intptr_t offset)
+{
+	int pos;
+
+	pos = dapl_os_atomic_read(&rbuf->head);
+	while (pos != dapl_os_atomic_read(&rbuf->tail)) {
+		rbuf->base[pos] = (void *)((char *)rbuf->base[pos] + offset);
+		pos = (pos + 1) & rbuf->lim;	/* verify in range */
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_ring_buffer_util.h b/dapl/common/dapl_ring_buffer_util.h
new file mode 100644
index 0000000..46c82c9
--- /dev/null
+++ b/dapl/common/dapl_ring_buffer_util.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_ring_buffer_util.h
+ *
+ * PURPOSE: Utility defs & routines for the ring buffer data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_RING_BUFFER_H_
+#define _DAPL_RING_BUFFER_H_
+
+#include "dapl.h"
+
+/*
+ * Prototypes
+ */
+DAT_RETURN dapls_rbuf_alloc (
+        DAPL_RING_BUFFER		*rbuf,
+	DAT_COUNT			 size );
+
+DAT_RETURN dapls_rbuf_realloc (
+        DAPL_RING_BUFFER		*rbuf,
+	DAT_COUNT			 size );
+
+void dapls_rbuf_destroy (
+	DAPL_RING_BUFFER		*rbuf);
+
+DAT_RETURN dapls_rbuf_add (
+	DAPL_RING_BUFFER		*rbuf,
+	void				*entry);
+
+void * dapls_rbuf_remove (
+	DAPL_RING_BUFFER		*rbuf);
+
+DAT_COUNT dapls_rbuf_count (
+	DAPL_RING_BUFFER		*rbuf );
+
+void dapls_rbuf_adjust (
+	IN  DAPL_RING_BUFFER		*rbuf,
+	IN  intptr_t			offset);
+
+
+/*
+ * Simple functions
+ */
+#define dapls_rbuf_empty(rbuf)	(rbuf->head == rbuf->tail)
+
+
+#endif /* _DAPL_RING_BUFFER_H_ */
diff --git a/dapl/common/dapl_rmr_bind.c b/dapl/common/dapl_rmr_bind.c
new file mode 100755
index 0000000..9793f38
--- /dev/null
+++ b/dapl/common/dapl_rmr_bind.c
@@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_rmr_bind.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_rmr_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_cookie.h"
+#include "dapl_adapter_util.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+STATIC _INLINE_ DAT_RETURN
+dapli_rmr_bind_fuse(IN DAPL_RMR * rmr,
+		    IN const DAT_LMR_TRIPLET * lmr_triplet,
+		    IN DAT_MEM_PRIV_FLAGS mem_priv,
+		    IN DAPL_EP * ep_ptr,
+		    IN DAT_RMR_COOKIE user_cookie,
+		    IN DAT_COMPLETION_FLAGS completion_flags,
+		    OUT DAT_RMR_CONTEXT * rmr_context);
+
+STATIC _INLINE_ DAT_RETURN
+dapli_rmr_bind_unfuse(IN DAPL_RMR * rmr,
+		      IN DAPL_EP * ep_ptr,
+		      IN DAT_RMR_COOKIE user_cookie,
+		      IN DAT_COMPLETION_FLAGS completion_flags);
+
+/*********************************************************************
+ *                                                                   *
+ * Function Definitions                                              *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_RETURN
+dapli_rmr_bind_fuse(IN DAPL_RMR * rmr,
+		    IN const DAT_LMR_TRIPLET * lmr_triplet,
+		    IN DAT_MEM_PRIV_FLAGS mem_priv,
+		    IN DAPL_EP * ep_ptr,
+		    IN DAT_RMR_COOKIE user_cookie,
+		    IN DAT_COMPLETION_FLAGS completion_flags,
+		    OUT DAT_RMR_CONTEXT * rmr_context)
+{
+	DAPL_LMR *lmr;
+	DAPL_COOKIE *cookie;
+	DAT_RETURN dat_status;
+	DAT_BOOLEAN is_signaled;
+	DAPL_HASH_DATA hash_lmr;
+
+	dat_status =
+	    dapls_hash_search(rmr->header.owner_ia->hca_ptr->lmr_hash_table,
+			      lmr_triplet->lmr_context, &hash_lmr);
+	if (DAT_SUCCESS != dat_status) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+	lmr = (DAPL_LMR *) hash_lmr;
+
+	/* if the ep in unconnected return an error. IB requires that the */
+	/* QP be connected to change a memory window binding since:       */
+	/*                                                                */
+	/* - memory window bind operations are WQEs placed on a QP's      */
+	/*   send queue                                                   */
+	/*                                                                */
+	/* - QP's only process WQEs on the send queue when the QP is in   */
+	/*   the RTS state                                                */
+	if (DAT_EP_STATE_CONNECTED != ep_ptr->param.ep_state) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      dapls_ep_state_subtype(ep_ptr));
+		goto bail;
+	}
+
+	if (DAT_FALSE ==
+	    dapl_mr_bounds_check(dapl_mr_get_address
+				 (lmr->param.region_desc, lmr->param.mem_type),
+				 lmr->param.length,
+				 lmr_triplet->virtual_address,
+				 lmr_triplet->segment_length)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	/* If the LMR, RMR, and EP are not in the same PZ, there is an error */
+	if ((ep_ptr->param.pz_handle != lmr->param.pz_handle) ||
+	    (ep_ptr->param.pz_handle != rmr->param.pz_handle)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+
+	if (!dapl_rmr_validate_completion_flag(DAT_COMPLETION_SUPPRESS_FLAG,
+					       ep_ptr->param.ep_attr.
+					       request_completion_flags,
+					       completion_flags)
+	    ||
+	    !dapl_rmr_validate_completion_flag(DAT_COMPLETION_UNSIGNALLED_FLAG,
+					       ep_ptr->param.ep_attr.
+					       request_completion_flags,
+					       completion_flags)
+	    ||
+	    !dapl_rmr_validate_completion_flag
+	    (DAT_COMPLETION_BARRIER_FENCE_FLAG,
+	     ep_ptr->param.ep_attr.request_completion_flags,
+	     completion_flags)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+
+	dat_status = dapls_rmr_cookie_alloc(&ep_ptr->req_buffer,
+					    rmr, user_cookie, &cookie);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail;
+	}
+
+	is_signaled =
+	    (completion_flags & DAT_COMPLETION_SUPPRESS_FLAG) ? DAT_FALSE :
+	    DAT_TRUE;
+
+	dat_status = dapls_ib_mw_bind(rmr,
+				      lmr,
+				      ep_ptr,
+				      cookie,
+				      lmr_triplet->virtual_address,
+				      lmr_triplet->segment_length,
+				      mem_priv, is_signaled);
+	if (DAT_SUCCESS != dat_status) {
+		dapls_cookie_dealloc(&ep_ptr->req_buffer, cookie);
+		goto bail;
+	}
+
+	dapl_os_atomic_inc(&lmr->lmr_ref_count);
+
+	/* if the RMR was previously bound */
+	if (NULL != rmr->lmr) {
+		dapl_os_atomic_dec(&rmr->lmr->lmr_ref_count);
+	}
+
+	rmr->param.mem_priv = mem_priv;
+	rmr->param.lmr_triplet = *lmr_triplet;
+	rmr->ep = ep_ptr;
+	rmr->lmr = lmr;
+
+	if (NULL != rmr_context) {
+		*rmr_context = rmr->param.rmr_context;
+	}
+
+      bail:
+	return dat_status;
+}
+
+DAT_RETURN
+dapli_rmr_bind_unfuse(IN DAPL_RMR * rmr,
+		      IN DAPL_EP * ep_ptr,
+		      IN DAT_RMR_COOKIE user_cookie,
+		      IN DAT_COMPLETION_FLAGS completion_flags)
+{
+	DAPL_COOKIE *cookie;
+	DAT_RETURN dat_status;
+	DAT_BOOLEAN is_signaled;
+
+	dat_status = DAT_SUCCESS;
+	/*
+	 * if the ep in unconnected return an error. IB requires that the
+	 * QP be connected to change a memory window binding since:
+	 *
+	 * - memory window bind operations are WQEs placed on a QP's
+	 *   send queue
+	 *
+	 * - QP's only process WQEs on the send queue when the QP is in
+	 *   the RTS state
+	 */
+	if (DAT_EP_STATE_CONNECTED != ep_ptr->param.ep_state) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      dapls_ep_state_subtype(ep_ptr));
+		goto bail1;
+	}
+
+	/* If the RMR and EP are not in the same PZ, there is an error */
+	if (ep_ptr->param.pz_handle != rmr->param.pz_handle) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail1;
+	}
+
+	if (!dapl_rmr_validate_completion_flag(DAT_COMPLETION_SUPPRESS_FLAG,
+					       ep_ptr->param.ep_attr.
+					       request_completion_flags,
+					       completion_flags)
+	    ||
+	    !dapl_rmr_validate_completion_flag(DAT_COMPLETION_UNSIGNALLED_FLAG,
+					       ep_ptr->param.ep_attr.
+					       request_completion_flags,
+					       completion_flags)
+	    ||
+	    !dapl_rmr_validate_completion_flag
+	    (DAT_COMPLETION_BARRIER_FENCE_FLAG,
+	     ep_ptr->param.ep_attr.request_completion_flags,
+	     completion_flags)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail1;
+	}
+
+	dat_status = dapls_rmr_cookie_alloc(&ep_ptr->req_buffer,
+					    rmr, user_cookie, &cookie);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail1;
+	}
+
+	is_signaled =
+	    (completion_flags & DAT_COMPLETION_UNSIGNALLED_FLAG) ? DAT_FALSE :
+	    DAT_TRUE;
+
+	dat_status = dapls_ib_mw_unbind(rmr, ep_ptr, cookie, is_signaled);
+	if (DAT_SUCCESS != dat_status) {
+		dapls_cookie_dealloc(&ep_ptr->req_buffer, cookie);
+		goto bail1;
+	}
+
+	/* if the RMR was previously bound */
+	if (NULL != rmr->lmr) {
+		dapl_os_atomic_dec(&rmr->lmr->lmr_ref_count);
+	}
+
+	rmr->param.mem_priv = DAT_MEM_PRIV_NONE_FLAG;
+	rmr->param.lmr_triplet.lmr_context = 0;
+	rmr->param.lmr_triplet.virtual_address = 0;
+	rmr->param.lmr_triplet.segment_length = 0;
+	rmr->ep = ep_ptr;
+	rmr->lmr = NULL;
+
+      bail1:
+	return dat_status;
+}
+
+/*
+ * dapl_rmr_bind
+ *
+ * DAPL Requirements Version xxx, 6.6.4.4
+ *
+ * Bind the RMR to the specified memory region within the LMR and
+ * provide a new rmr_context value.
+ *
+ * Input:
+ * Output:
+ */
+DAT_RETURN DAT_API
+dapl_rmr_bind(IN DAT_RMR_HANDLE rmr_handle,
+	      IN DAT_LMR_HANDLE lmr_handle,
+	      IN const DAT_LMR_TRIPLET * lmr_triplet,
+	      IN DAT_MEM_PRIV_FLAGS mem_priv,
+	      IN DAT_VA_TYPE va_type,
+	      IN DAT_EP_HANDLE ep_handle,
+	      IN DAT_RMR_COOKIE user_cookie,
+	      IN DAT_COMPLETION_FLAGS completion_flags,
+	      OUT DAT_RMR_CONTEXT * rmr_context)
+{
+	DAPL_RMR *rmr;
+	DAPL_EP *ep_ptr;
+
+	if (DAPL_BAD_HANDLE(rmr_handle, DAPL_MAGIC_RMR)) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RMR);
+	}
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+
+	rmr = (DAPL_RMR *) rmr_handle;
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/* if the rmr should be bound */
+	if (0 != lmr_triplet->segment_length) {
+		return dapli_rmr_bind_fuse(rmr,
+					   lmr_triplet,
+					   mem_priv,
+					   ep_ptr,
+					   user_cookie,
+					   completion_flags, rmr_context);
+	} else {		/* the rmr should be unbound */
+
+		return dapli_rmr_bind_unfuse(rmr,
+					     ep_ptr,
+					     user_cookie, completion_flags);
+	}
+}
diff --git a/dapl/common/dapl_rmr_create.c b/dapl/common/dapl_rmr_create.c
new file mode 100755
index 0000000..3811bf9
--- /dev/null
+++ b/dapl/common/dapl_rmr_create.c
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_rmr_create.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_rmr_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_rmr_create
+ *
+ * Create a remote memory region for the specified protection zone
+ *
+ * Input:
+ * 	pz_handle
+ *
+ * Output:
+ * 	rmr_handle
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_rmr_create(IN DAT_PZ_HANDLE pz_handle, OUT DAT_RMR_HANDLE * rmr_handle)
+{
+	DAPL_PZ *pz;
+	DAPL_RMR *rmr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(pz_handle, DAPL_MAGIC_PZ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+		goto bail;
+	}
+
+	pz = (DAPL_PZ *) pz_handle;
+	rmr = dapl_rmr_alloc(pz);
+
+	if (rmr == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+	DAPL_CNTR(pz->header.owner_ia, DCNT_IA_RMR_CREATE);
+
+	dat_status = dapls_ib_mw_alloc(rmr);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_rmr_dealloc(rmr);
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+			      DAT_RESOURCE_MEMORY_REGION);
+		goto bail;
+	}
+
+	dapl_os_atomic_inc(&pz->pz_ref_count);
+
+	*rmr_handle = rmr;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * dapl_rmr_create_for_ep
+ *
+ * DAPL Requirements Version 2.0, 6.7.3.x
+ *
+ * Creates an RMR that is specific to a single connection at a time.
+ * 
+ * This operation is relatively heavy. The created RMR can be bound to a
+ * memory region within the LMR through a lightweight dat_rmr_bind
+ * operation for EPs that use the pz_handle that generates rmr_context.
+ * 
+ * If the operation fails (does not return DAT_SUCCESS), the return values
+ * of rmr_handle are undefined and Consumers should not use it.
+ * pz_handle provide Consumers a way to restrict access to an RMR by
+ * authorized connections only.
+ * 
+ *
+ * Input:
+ *	pz_handle
+ *
+ * Output:
+ *	rmr_handle
+ * 
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_HANDLE
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API dapl_rmr_create_for_ep(IN DAT_PZ_HANDLE pz_handle,	/* pz_handle            */
+					  OUT DAT_RMR_HANDLE * rmr_handle)
+{				/* rmr_handle           */
+	return DAT_MODEL_NOT_SUPPORTED;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_rmr_free.c b/dapl/common/dapl_rmr_free.c
new file mode 100644
index 0000000..d3abecb
--- /dev/null
+++ b/dapl/common/dapl_rmr_free.c
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_rmr_free.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_rmr_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dapl_rmr_free
+ *
+ * Destroy an instance of the Remote Memory Region
+ *
+ * Input:
+ * 	rmr_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API dapl_rmr_free(IN DAT_RMR_HANDLE rmr_handle)
+{
+	DAPL_RMR *rmr;
+	DAPL_PZ *pz;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(rmr_handle, DAPL_MAGIC_RMR)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RMR);
+		goto bail;
+	}
+
+	rmr = (DAPL_RMR *) rmr_handle;
+	pz = (DAPL_PZ *) rmr->param.pz_handle;
+	DAPL_CNTR(pz->header.owner_ia, DCNT_IA_RMR_FREE);
+
+	/*
+	 * If the user did not perform an unbind op, release
+	 * counts here.
+	 */
+	if (rmr->param.lmr_triplet.virtual_address != 0) {
+		dapl_os_atomic_dec(&rmr->lmr->lmr_ref_count);
+		rmr->param.lmr_triplet.virtual_address = 0;
+	}
+
+	dat_status = dapls_ib_mw_free(rmr);
+
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+
+	dapl_os_atomic_dec(&rmr->pz->pz_ref_count);
+
+	dapl_rmr_dealloc(rmr);
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_rmr_query.c b/dapl/common/dapl_rmr_query.c
new file mode 100644
index 0000000..d18aa84
--- /dev/null
+++ b/dapl/common/dapl_rmr_query.c
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_rmr_query.c
+ *
+ * PURPOSE: Memory management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 6
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_rmr_query
+ *
+ * DAPL Requirements Version xxx, 6.6.4.3
+ *
+ * Provide the RMR arguments.
+ *
+ * Input:
+ * 	rmr_handle
+ * 	rmr_args_mask
+ *
+ * Output:
+ * 	rmr_args
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *      DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_rmr_query(IN DAT_RMR_HANDLE rmr_handle,
+	       IN DAT_RMR_PARAM_MASK rmr_param_mask,
+	       IN DAT_RMR_PARAM * rmr_param)
+{
+	DAPL_RMR *rmr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(rmr_handle, DAPL_MAGIC_RMR)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RMR);
+		goto bail;
+	}
+	if (NULL == rmr_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	rmr = (DAPL_RMR *) rmr_handle;
+
+	/* If the RMR is unbound, there is no LMR triplet associated with   */
+	/* this RMR.  If the consumer requests this field, return an error. */
+	if ((rmr_param_mask & DAT_RMR_FIELD_LMR_TRIPLET) && (NULL == rmr->lmr)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+
+	dapl_os_memcpy(rmr_param, &rmr->param, sizeof(DAT_RMR_PARAM));
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_rmr_util.c b/dapl/common/dapl_rmr_util.c
new file mode 100644
index 0000000..2621491
--- /dev/null
+++ b/dapl/common/dapl_rmr_util.c
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_rmr_util.h"
+#include "dapl_ia_util.h"
+
+DAPL_RMR *dapl_rmr_alloc(IN DAPL_PZ * pz)
+{
+	DAPL_RMR *rmr;
+
+	/* Allocate LMR */
+	rmr = (DAPL_RMR *) dapl_os_alloc(sizeof(DAPL_RMR));
+	if (NULL == rmr) {
+		return (NULL);
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(rmr, sizeof(DAPL_RMR));
+
+	/*
+	 * initialize the header
+	 */
+	rmr->header.provider = pz->header.provider;
+	rmr->header.magic = DAPL_MAGIC_RMR;
+	rmr->header.handle_type = DAT_HANDLE_TYPE_RMR;
+	rmr->header.owner_ia = pz->header.owner_ia;
+	rmr->header.user_context.as_64 = 0;
+	rmr->header.user_context.as_ptr = 0;
+	dapl_llist_init_entry(&rmr->header.ia_list_entry);
+	dapl_ia_link_rmr(rmr->header.owner_ia, rmr);
+	dapl_os_lock_init(&rmr->header.lock);
+
+	/* 
+	 * initialize the body 
+	 */
+	rmr->param.ia_handle = (DAT_IA_HANDLE) pz->header.owner_ia;
+	rmr->param.pz_handle = (DAT_PZ_HANDLE) pz;
+	rmr->param.lmr_triplet.lmr_context = 0;
+	rmr->param.lmr_triplet.virtual_address = 0;
+	rmr->param.lmr_triplet.segment_length = 0;
+
+	rmr->param.mem_priv = 0;
+	rmr->pz = pz;
+	rmr->lmr = NULL;
+
+	return (rmr);
+}
+
+void dapl_rmr_dealloc(IN DAPL_RMR * rmr)
+{
+	rmr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+
+	dapl_ia_unlink_rmr(rmr->header.owner_ia, rmr);
+	dapl_os_lock_destroy(&rmr->header.lock);
+
+	dapl_os_free((void *)rmr, sizeof(DAPL_RMR));
+}
diff --git a/dapl/common/dapl_rmr_util.h b/dapl/common/dapl_rmr_util.h
new file mode 100644
index 0000000..3c2f630
--- /dev/null
+++ b/dapl/common/dapl_rmr_util.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_rmr_util.h
+ *
+ * PURPOSE: Utility defs & routines for the RMR data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_RMR_UTIL_H_
+#define _DAPL_RMR_UTIL_H_
+
+#include "dapl_mr_util.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAPL_RMR *
+dapl_rmr_alloc (
+    IN  DAPL_PZ 		*pz);
+
+extern void
+dapl_rmr_dealloc (
+    IN  DAPL_RMR 		*rmr);
+
+STATIC _INLINE_ DAT_BOOLEAN 
+dapl_rmr_validate_completion_flag (
+    IN  DAT_COMPLETION_FLAGS 	mask,
+    IN  DAT_COMPLETION_FLAGS 	allow,
+    IN  DAT_COMPLETION_FLAGS 	request);
+
+
+/*********************************************************************
+ *                                                                   *
+ * Inline Functions                                                  *
+ *                                                                   *
+ *********************************************************************/
+
+STATIC _INLINE_ DAT_BOOLEAN 
+dapl_rmr_validate_completion_flag (
+    IN  DAT_COMPLETION_FLAGS 	mask,
+    IN  DAT_COMPLETION_FLAGS 	allow,
+    IN  DAT_COMPLETION_FLAGS 	request)
+{
+    if ( (mask & request ) && !(mask & allow) )
+    {
+	return DAT_FALSE;
+    }
+    else
+    {
+	return DAT_TRUE;
+    }
+}
+
+#endif /* _DAPL_RMR_UTIL_H_*/
diff --git a/dapl/common/dapl_rsp_create.c b/dapl/common/dapl_rsp_create.c
new file mode 100644
index 0000000..3e36e81
--- /dev/null
+++ b/dapl/common/dapl_rsp_create.c
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_rsp_create.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_sp_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_rsp_create
+ *
+ * uDAPL: User Direct Access Program Library Version 1.1, 6.4.3.4.1
+ *
+ * Create a Resereved Service Point with the specified Endpoint
+ * that generates at most one Connection Request that is
+ * delivered to the specified Event Dispatcher in a notification
+ * event
+ *
+ * Input:
+ *	ia_handle
+ *	conn_qual
+ *	ep_handle
+ *	evd_handle
+ *
+ * Output:
+ *	rsp_handle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ *	DAT_CONN_QUAL_IN_USE
+ */
+DAT_RETURN DAT_API
+dapl_rsp_create(IN DAT_IA_HANDLE ia_handle,
+		IN DAT_CONN_QUAL conn_qual,
+		IN DAT_EP_HANDLE ep_handle,
+		IN DAT_EVD_HANDLE evd_handle, OUT DAT_RSP_HANDLE * rsp_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_SP *sp_ptr;
+	DAPL_EVD *evd_ptr;
+	DAPL_EP *ep_ptr;
+	DAT_BOOLEAN sp_found;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+	ia_ptr = (DAPL_IA *) ia_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     ">>> dapl_rsp_free conn_qual: %x EP: %p\n",
+		     conn_qual, ep_handle);
+
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+		goto bail;
+	}
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	if (rsp_handle == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG5);
+		goto bail;
+	}
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+	if (ep_ptr->param.ep_state != DAT_EP_STATE_UNCONNECTED) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      dapls_ep_state_subtype(ep_ptr));
+		goto bail;
+	}
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	if (!(evd_ptr->evd_flags & DAT_EVD_CR_FLAG)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EVD_CR);
+		goto bail;
+	}
+
+	DAPL_CNTR(ia_ptr, DCNT_IA_RSP_CREATE);
+
+	sp_ptr = dapls_ia_sp_search(ia_ptr, conn_qual, DAT_FALSE);
+	sp_found = DAT_TRUE;
+	if (sp_ptr == NULL) {
+		sp_found = DAT_FALSE;
+
+		/* Allocate RSP */
+		sp_ptr = dapls_sp_alloc(ia_ptr, DAT_FALSE);
+		if (sp_ptr == NULL) {
+			dat_status =
+			    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				      DAT_RESOURCE_MEMORY);
+			goto bail;
+		}
+	}
+
+	/*
+	 * Fill out the RSP args
+	 */
+	sp_ptr->conn_qual = conn_qual;
+	sp_ptr->evd_handle = evd_handle;
+	sp_ptr->psp_flags = 0;
+	sp_ptr->ep_handle = ep_handle;
+
+	/*
+	 * Take a reference on the EVD handle
+	 */
+	dapl_os_atomic_inc(&((DAPL_EVD *) evd_handle)->evd_ref_count);
+
+	/*
+	 * Update the EP state indicating the provider now owns it
+	 */
+	ep_ptr->param.ep_state = DAT_EP_STATE_RESERVED;
+
+	/* 
+	 * Set up a listener for a connection. Connections can arrive
+	 * even before this call returns!
+	 */
+	sp_ptr->state = DAPL_SP_STATE_RSP_LISTENING;
+	sp_ptr->listening = DAT_TRUE;
+
+	if (sp_found == DAT_FALSE) {
+		/* Link it onto the IA */
+		dapl_ia_link_rsp(ia_ptr, sp_ptr);
+
+		dat_status = dapls_ib_setup_conn_listener(ia_ptr,
+							  conn_qual, sp_ptr);
+
+		if (dat_status != DAT_SUCCESS) {
+			/*
+			 * Have a problem setting up the connection, something
+			 * wrong!  Decrements the EVD refcount & release it. Set 
+			 * the state to FREE, so we know the call failed.
+			 */
+			dapl_os_atomic_dec(&((DAPL_EVD *) evd_handle)->
+					   evd_ref_count);
+			sp_ptr->evd_handle = NULL;
+			sp_ptr->state = DAPL_SP_STATE_FREE;
+			dapls_ia_unlink_sp(ia_ptr, sp_ptr);
+			dapls_sp_free_sp(sp_ptr);
+
+			dapl_dbg_log(DAPL_DBG_TYPE_CM,
+				     "--> dapl_rsp_create setup_conn_listener failed: %x\n",
+				     dat_status);
+
+			goto bail;
+		}
+	}
+
+	/*
+	 * Return handle to the user
+	 */
+	*rsp_handle = (DAT_RSP_HANDLE) sp_ptr;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_rsp_free.c b/dapl/common/dapl_rsp_free.c
new file mode 100644
index 0000000..6d5c464
--- /dev/null
+++ b/dapl/common/dapl_rsp_free.c
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_rsp_free.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_sp_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_rsp_free
+ *
+ * uDAPL: User Direct Access Program Library Version 1.1, 6.4.3.5
+ *
+ * Destroy a specific instance of a Reserved Service Point.
+ *
+ * Input:
+ *	rsp_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ */
+DAT_RETURN DAT_API dapl_rsp_free(IN DAT_RSP_HANDLE rsp_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_SP *sp_ptr;
+	DAPL_EP *ep_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	sp_ptr = (DAPL_SP *) rsp_handle;
+	/*
+	 * Verify handle
+	 */
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, ">>> dapl_rsp_free %p\n", rsp_handle);
+	if (DAPL_BAD_HANDLE(sp_ptr, DAPL_MAGIC_RSP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
+		goto bail;
+	}
+
+	/* ia_ptr = (DAPL_IA *)sp_ptr->header.owner_ia; */
+	ia_ptr = sp_ptr->header.owner_ia;
+
+	DAPL_CNTR(ia_ptr, DCNT_IA_RSP_FREE);
+
+	/*
+	 * Remove the connection listener if there are no connections.  If
+	 * we defer removing the sp it becomes something of a zombie
+	 * container until disconnection, after which it will be cleaned up.
+	 */
+	dapl_os_lock(&sp_ptr->header.lock);
+
+	/*
+	 * Make sure we don't leave a dangling EP. If the state is still
+	 * RESERVED then the RSP still owns it.
+	 */
+	ep_ptr = (DAPL_EP *) sp_ptr->ep_handle;
+	if (ep_ptr != NULL && ep_ptr->param.ep_state == DAT_EP_STATE_RESERVED) {
+		ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+	}
+	sp_ptr->ep_handle = NULL;
+
+	/* Release reference on EVD. If an error was encountered in a previous
+	 * free the evd_handle will be NULL
+	 */
+	if (sp_ptr->evd_handle) {
+		dapl_os_atomic_dec(&((DAPL_EVD *) sp_ptr->evd_handle)->
+				   evd_ref_count);
+		sp_ptr->evd_handle = NULL;
+	}
+
+	/*
+	 * Release the base resource if there are no outstanding connections;
+	 * else the last disconnect on this RSP will free it up. The RSP
+	 * is used to contain CR records for each connection, which 
+	 * contain information necessary to disconnect.
+	 * sp_ptr->listening will be DAT_TRUE if there has never been a
+	 * connection event, and DAT_FALSE if a connection attempt resulted
+	 * in a reject.
+	 */
+	if (sp_ptr->cr_list_count == 0) {
+		/* This RSP has never been used. Clean it up */
+		sp_ptr->listening = DAT_FALSE;
+		sp_ptr->state = DAPL_SP_STATE_FREE;
+		dapl_os_unlock(&sp_ptr->header.lock);
+
+		dat_status = dapls_ib_remove_conn_listener(ia_ptr, sp_ptr);
+		if (dat_status != DAT_SUCCESS) {
+			sp_ptr->state = DAPL_SP_STATE_RSP_LISTENING;
+			goto bail;
+		}
+		dapls_ia_unlink_sp(ia_ptr, sp_ptr);
+		dapls_sp_free_sp(sp_ptr);
+	} else {
+		/* The RSP is now in the pending state, where it will sit until
+		 * the connection terminates or the app uses the same
+		 * ServiceID again, which will reactivate it.
+		 */
+		sp_ptr->state = DAPL_SP_STATE_RSP_PENDING;
+		dapl_os_unlock(&sp_ptr->header.lock);
+	}
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_rsp_query.c b/dapl/common/dapl_rsp_query.c
new file mode 100644
index 0000000..dfc8145
--- /dev/null
+++ b/dapl/common/dapl_rsp_query.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_rsp_query.c
+ *
+ * PURPOSE: Connection management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_rsp_query
+ *
+ * uDAPL: User Direct Access Program Library Version 1.1, 6.4.1.6
+ *
+ * Provide arguments of the reserved service points
+ *
+ * Input:
+ *	rsp_handle
+ *	rsp_args_mask
+ *
+ * Output:
+ *	rsp_args
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_rsp_query(IN DAT_RSP_HANDLE rsp_handle,
+	       IN DAT_RSP_PARAM_MASK rsp_mask, OUT DAT_RSP_PARAM * rsp_param)
+{
+	DAPL_SP *sp_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(rsp_handle, DAPL_MAGIC_RSP)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
+		goto bail;
+	}
+
+	if (NULL == rsp_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	sp_ptr = (DAPL_SP *) rsp_handle;
+
+	/*
+	 * Fill in the RSP params
+	 */
+	rsp_param->ia_handle = sp_ptr->header.owner_ia;
+	rsp_param->conn_qual = sp_ptr->conn_qual;
+	rsp_param->evd_handle = sp_ptr->evd_handle;
+	rsp_param->ep_handle = sp_ptr->ep_handle;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-brace-offset: -4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_set_consumer_context.c b/dapl/common/dapl_set_consumer_context.c
new file mode 100644
index 0000000..86874b9
--- /dev/null
+++ b/dapl/common/dapl_set_consumer_context.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_set_consumer_context.c
+ *
+ * PURPOSE: Interface Adapter management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_set_consumer_context
+ *
+ * DAPL Requirements Version xxx, 6.2.2.1
+ *
+ * Set a consumer context in the provided dat_handle
+ *
+ * Input:
+ *	dat_handle
+ *	context
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ */
+DAT_RETURN DAT_API
+dapl_set_consumer_context(IN DAT_HANDLE dat_handle, IN DAT_CONTEXT context)
+{
+	DAT_RETURN dat_status;
+	DAPL_HEADER *header;
+
+	dat_status = DAT_SUCCESS;
+
+	header = (DAPL_HEADER *) dat_handle;
+	if (((header) == NULL) ||
+	    DAPL_BAD_PTR(header) ||
+	    (header->magic != DAPL_MAGIC_IA &&
+	     header->magic != DAPL_MAGIC_EVD &&
+	     header->magic != DAPL_MAGIC_EP &&
+	     header->magic != DAPL_MAGIC_LMR &&
+	     header->magic != DAPL_MAGIC_RMR &&
+	     header->magic != DAPL_MAGIC_PZ &&
+	     header->magic != DAPL_MAGIC_PSP &&
+	     header->magic != DAPL_MAGIC_RSP &&
+	     header->magic != DAPL_MAGIC_CR)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	header->user_context = context;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_sp_util.c b/dapl/common/dapl_sp_util.c
new file mode 100644
index 0000000..c1a3fdb
--- /dev/null
+++ b/dapl/common/dapl_sp_util.c
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_sp_util.c
+ *
+ * PURPOSE: Manage PSP Info structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ep_util.h"
+#include "dapl_sp_util.h"
+#include "dapl_cr_util.h"
+
+/*
+ * Local definitions
+ */
+
+/*
+ * dapl_sp_alloc
+ *
+ * alloc and initialize a PSP INFO struct
+ *
+ * Input:
+ * 	IA INFO struct ptr
+ *
+ * Output:
+ * 	sp_ptr
+ *
+ * Returns:
+ * 	NULL
+ *	pointer to sp info struct
+ *
+ */
+DAPL_SP *dapls_sp_alloc(IN DAPL_IA * ia_ptr, IN DAT_BOOLEAN is_psp)
+{
+	DAPL_SP *sp_ptr;
+
+	/* Allocate EP */
+	sp_ptr = (DAPL_SP *) dapl_os_alloc(sizeof(DAPL_SP));
+	if (sp_ptr == NULL) {
+		return (NULL);
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(sp_ptr, sizeof(DAPL_SP));
+
+	/*
+	 * initialize the header
+	 */
+	sp_ptr->header.provider = ia_ptr->header.provider;
+	if (is_psp) {
+		sp_ptr->header.magic = DAPL_MAGIC_PSP;
+		sp_ptr->header.handle_type = DAT_HANDLE_TYPE_PSP;
+	} else {
+		sp_ptr->header.magic = DAPL_MAGIC_RSP;
+		sp_ptr->header.handle_type = DAT_HANDLE_TYPE_RSP;
+	}
+	sp_ptr->header.owner_ia = ia_ptr;
+	sp_ptr->header.user_context.as_64 = 0;
+	sp_ptr->header.user_context.as_ptr = NULL;
+	dapl_llist_init_entry(&sp_ptr->header.ia_list_entry);
+	dapl_os_lock_init(&sp_ptr->header.lock);
+
+#if defined(_VENDOR_IBAL_)
+	dapl_os_wait_object_init(&sp_ptr->wait_object);
+#endif
+	/*
+	 * Initialize the Body (set to NULL above)
+	 */
+	dapl_llist_init_head(&sp_ptr->cr_list_head);
+
+	return (sp_ptr);
+}
+
+/*
+ * dapl_sp_free
+ *
+ * Free the passed in PSP structure.
+ *
+ * Input:
+ * 	entry point pointer
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapls_sp_free_sp(IN DAPL_SP * sp_ptr)
+{
+	dapl_os_assert(sp_ptr->header.magic == DAPL_MAGIC_PSP ||
+		       sp_ptr->header.magic == DAPL_MAGIC_RSP);
+	dapl_os_assert(dapl_llist_is_empty(&sp_ptr->cr_list_head));
+
+#if defined(_VENDOR_IBAL_)
+	dapl_os_wait_object_destroy(&sp_ptr->wait_object);
+#endif
+	dapl_os_lock(&sp_ptr->header.lock);
+	sp_ptr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+	dapl_os_unlock(&sp_ptr->header.lock);
+	dapl_os_free(sp_ptr, sizeof(DAPL_SP));
+}
+
+/*
+ * dapl_cr_link_cr
+ *
+ * Add a cr to a PSP structure
+ *
+ * Input:
+ *	sp_ptr
+ *	cr_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_sp_link_cr(IN DAPL_SP * sp_ptr, IN DAPL_CR * cr_ptr)
+{
+	dapl_os_lock(&sp_ptr->header.lock);
+	dapl_llist_add_tail(&sp_ptr->cr_list_head,
+			    &cr_ptr->header.ia_list_entry, cr_ptr);
+	sp_ptr->cr_list_count++;
+	dapl_os_unlock(&sp_ptr->header.lock);
+}
+
+/*
+ * dapl_sp_search_cr
+ *
+ * Search for a CR on the PSP cr_list with a matching cm_handle. When
+ * found, remove it from the list and update fields.
+ *
+ * Must be called with the sp_ptr lock taken.
+ *
+ * Input:
+ *	sp_ptr
+ *	ib_cm_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	cr_ptr_fnd	Pointer to matching DAPL_CR
+ *
+ */
+DAPL_CR *dapl_sp_search_cr(IN DAPL_SP * sp_ptr,
+			   IN dp_ib_cm_handle_t ib_cm_handle)
+{
+	DAPL_CR *cr_ptr;
+	DAPL_CR *cr_ptr_fnd;
+
+	if (dapl_llist_is_empty(&sp_ptr->cr_list_head)) {
+		return NULL;
+	}
+	cr_ptr_fnd = NULL;
+	cr_ptr = (DAPL_CR *) dapl_llist_peek_head(&sp_ptr->cr_list_head);
+	dapl_os_assert(cr_ptr);
+
+	do {
+		if (cr_ptr->ib_cm_handle == ib_cm_handle) {
+			cr_ptr_fnd = cr_ptr;
+
+			break;
+		}
+		cr_ptr = cr_ptr->header.ia_list_entry.flink->data;
+	} while ((void *)cr_ptr != (void *)sp_ptr->cr_list_head->data);
+
+	return cr_ptr_fnd;
+}
+
+/*
+ * dapl_sp_remove_cr
+ *
+ * Remove the CR from the PSP. Done prior to freeing the CR resource.
+ *
+ * Must be called with the sp_ptr lock taken.
+ *
+ * Input:
+ *	sp_ptr
+ *	cr_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	void
+ *
+ */
+void dapl_sp_remove_cr(IN DAPL_SP * sp_ptr, IN DAPL_CR * cr_ptr)
+{
+	if (dapl_llist_is_empty(&sp_ptr->cr_list_head)) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "**dapl_sp_remove_cr: removing from empty queue! sp %p\n",
+			     sp_ptr);
+		return;
+	}
+
+	dapl_llist_remove_entry(&sp_ptr->cr_list_head,
+				&cr_ptr->header.ia_list_entry);
+	sp_ptr->cr_list_count--;
+}
+
+/*
+ * dapl_sp_remove_ep
+ *
+ * Remove a CR from a PSP, given an EP.
+ *
+ *
+ * Input:
+ *	ep_ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	void
+ *
+ */
+void dapl_sp_remove_ep(IN DAPL_EP * ep_ptr)
+{
+	DAPL_SP *sp_ptr;
+	DAPL_CR *cr_ptr;
+
+	cr_ptr = ep_ptr->cr_ptr;
+
+	if (cr_ptr != NULL) {
+		sp_ptr = cr_ptr->sp_ptr;
+
+		dapl_os_lock(&sp_ptr->header.lock);
+
+		/* Remove the CR from the queue */
+		dapl_sp_remove_cr(sp_ptr, cr_ptr);
+
+		dapl_os_unlock(&sp_ptr->header.lock);
+
+		/* free memory outside of the lock */
+		dapls_cr_free(cr_ptr);
+
+		return;
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_sp_util.h b/dapl/common/dapl_sp_util.h
new file mode 100644
index 0000000..fde8bea
--- /dev/null
+++ b/dapl/common/dapl_sp_util.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dapl_sp_util.h
+ *
+ * PURPOSE: Utility defs & routines for the PSP & RSP data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_PSP_UTIL_H_
+#define _DAPL_PSP_UTIL_H_
+
+DAPL_SP *dapls_sp_alloc (
+	IN DAPL_IA		*ia_ptr,
+	IN DAT_BOOLEAN		is_psp );
+
+void dapls_sp_free_sp (
+	IN DAPL_SP		*sp_ptr );
+
+void dapl_sp_link_cr (
+	IN DAPL_SP		*sp_ptr,
+	IN DAPL_CR		*cr_ptr );
+
+DAPL_CR *dapl_sp_search_cr (
+	IN DAPL_SP		*sp_ptr,
+	IN  dp_ib_cm_handle_t   ib_cm_handle );
+
+void dapl_sp_remove_cr (
+	IN  DAPL_SP		*sp_ptr,
+	IN  DAPL_CR		*cr_ptr );
+
+void dapl_sp_remove_ep (
+	IN  DAPL_EP		*ep_ptr );
+
+#endif /* _DAPL_PSP_UTIL_H_ */
diff --git a/dapl/common/dapl_srq_create.c b/dapl/common/dapl_srq_create.c
new file mode 100644
index 0000000..7631a5e
--- /dev/null
+++ b/dapl/common/dapl_srq_create.c
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_srq_create.c
+ *
+ * PURPOSE: Shared Receive Queue management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.2 API, Chapter 6, section 5.1
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_srq_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_srq_create
+ *
+ * DAPL Version 1.2, 6.5.1
+ *
+ * Create an instance of a Shared Receive Queue that is provided to the
+ * consumer at srq_handle.
+ *
+ * Input:
+ *	ia_handle
+ *	pz_handle
+ *	srq_attr
+ *
+ * Output:
+ *	srq_handle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_PARAMETER
+ *	?DAT_INVALID_ATTRIBUTE??
+ *	DAT_MODEL_NOT_SUPPORTED
+ */
+DAT_RETURN DAT_API
+dapl_srq_create(IN DAT_IA_HANDLE ia_handle,
+		IN DAT_PZ_HANDLE pz_handle,
+		IN DAT_SRQ_ATTR * srq_attr, OUT DAT_SRQ_HANDLE * srq_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_SRQ *srq_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_srq_create (%p, %p, %p, %p)\n",
+		     ia_handle, pz_handle, srq_attr, srq_handle);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+
+	/*
+	 * Verify parameters
+	 */
+	if (DAPL_BAD_HANDLE(ia_ptr, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	DAPL_CNTR(ia_ptr, DCNT_IA_SRQ_CREATE);
+
+	/*
+	 * Verify non-required parameters.
+	 * N.B. Assumption: any parameter that can be
+	 *      modified by dat_ep_modify() is not strictly
+	 *      required when the EP is created
+	 */
+	if (pz_handle != NULL && DAPL_BAD_HANDLE(pz_handle, DAPL_MAGIC_PZ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+		goto bail;
+	}
+
+	if (srq_handle == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+	if (DAPL_BAD_PTR(srq_attr)) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	/* Allocate SRQ */
+	srq_ptr = dapl_srq_alloc(ia_ptr, srq_attr);
+	if (srq_ptr == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	srq_ptr->param.ia_handle = (DAT_IA_HANDLE) ia_ptr;
+	srq_ptr->param.srq_state = DAT_SRQ_STATE_OPERATIONAL;
+	srq_ptr->param.pz_handle = pz_handle;
+
+	/*
+	 * XXX Allocate provider resource here!!!
+	 */
+	/* XXX */ dat_status = DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+	/* XXX */ dapl_srq_dealloc(srq_ptr);
+	/* XXX */ goto bail;
+
+	/* Link it onto the IA */
+	dapl_ia_link_srq(ia_ptr, srq_ptr);
+
+	*srq_handle = srq_ptr;
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_srq_free.c b/dapl/common/dapl_srq_free.c
new file mode 100644
index 0000000..d93e188
--- /dev/null
+++ b/dapl/common/dapl_srq_free.c
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_srq_free.c
+ *
+ * PURPOSE: Shared Receive Queue management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5.5
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_srq_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_srq_free
+ *
+ * DAPL Version 1.2, 6.5.5
+ *
+ * Destroy an instance of an SRQ
+ *
+ * Input:
+ *	srq_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *	DAT_INVALID_STATE
+ */
+DAT_RETURN DAT_API dapl_srq_free(IN DAT_SRQ_HANDLE srq_handle)
+{
+	DAPL_SRQ *srq_ptr;
+	DAPL_IA *ia_ptr;
+	DAT_SRQ_PARAM *param;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_srq_free (%p)\n", srq_handle);
+
+	srq_ptr = (DAPL_SRQ *) srq_handle;
+	param = &srq_ptr->param;
+
+	/*
+	 * Verify parameter & state
+	 */
+	if (DAPL_BAD_HANDLE(srq_ptr, DAPL_MAGIC_SRQ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+		goto bail;
+	}
+
+	if (dapl_os_atomic_read(&srq_ptr->srq_ref_count) != 0) {
+		/*
+		 * The DAPL 1.2 spec says to return DAT_SRQ_IN_USE, which does
+		 * not exist. Have filed the following as an errata.
+		 */
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_SRQ_IN_USE);
+		goto bail;
+	}
+
+	ia_ptr = srq_ptr->header.owner_ia;
+
+	DAPL_CNTR(ia_ptr, DCNT_IA_SRQ_FREE);
+
+	/*
+	 * Do verification of parameters and the state change atomically.
+	 */
+	dapl_os_lock(&srq_ptr->header.lock);
+
+	/* Remove the SRQ from the IA */
+	dapl_ia_unlink_srq(ia_ptr, srq_ptr);
+
+	dapl_os_unlock(&srq_ptr->header.lock);
+
+	/*
+	 * Finish tearing everything down.
+	 */
+
+	/*
+	 * Take care of the transport resource
+	 */
+
+	/* XXX Put provider code here!!! */
+
+	/* Free the resource */
+	dapl_srq_dealloc(srq_ptr);
+
+      bail:
+	return dat_status;
+
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_srq_post_recv.c b/dapl/common/dapl_srq_post_recv.c
new file mode 100644
index 0000000..d46f9bd
--- /dev/null
+++ b/dapl/common/dapl_srq_post_recv.c
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_srq_post_recv.c
+ *
+ * PURPOSE: Shared Receive Queue management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 5.8
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_cookie.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_srq_post_recv
+ *
+ * DAPL Requirements Version 1.2, 6.5.8
+ *
+ * Post a receive buffer that can be used by any incoming
+ * message by any connected EP using the SRQ. Request to receive data
+ * over a connection of any ep handle into local_iov
+ *
+ * Input:
+ * 	srq_handle
+ * 	num_segments
+ * 	local_iov
+ * 	user_cookie
+ *
+ * Output:
+ * 	None.
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_STATE
+ * 	DAT_PROTECTION_VIOLATION
+ * 	DAT_PROVILEGES_VIOLATION
+ */
+DAT_RETURN DAT_API
+dapl_srq_post_recv(IN DAT_SRQ_HANDLE srq_handle,
+		   IN DAT_COUNT num_segments,
+		   IN DAT_LMR_TRIPLET * local_iov,
+		   IN DAT_DTO_COOKIE user_cookie)
+{
+	DAPL_SRQ *srq_ptr;
+	DAPL_COOKIE *cookie;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_srq_post_recv (%p, %d, %p, %p)\n",
+		     srq_handle, num_segments, local_iov, user_cookie.as_64);
+
+	if (DAPL_BAD_HANDLE(srq_handle, DAPL_MAGIC_SRQ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+		goto bail;
+	}
+
+	srq_ptr = (DAPL_SRQ *) srq_handle;
+
+	/*
+	 * Synchronization ok since this buffer is only used for receive
+	 * requests, which aren't allowed to race with each other. The
+	 * app must syncronize access to the SRQ.
+	 */
+	dat_status = dapls_dto_cookie_alloc(&srq_ptr->recv_buffer,
+					    DAPL_DTO_TYPE_RECV,
+					    user_cookie, &cookie);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail;
+	}
+
+	/*
+	 * Take reference before posting to avoid race conditions with
+	 * completions
+	 */
+	dapl_os_atomic_inc(&srq_ptr->recv_count);
+
+	/*
+	 * Invoke provider specific routine to post DTO
+	 */
+	/* XXX Put code here XXX */
+	/* XXX */ dat_status = DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_os_atomic_dec(&srq_ptr->recv_count);
+		dapls_cookie_dealloc(&srq_ptr->recv_buffer, cookie);
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_srq_query.c b/dapl/common/dapl_srq_query.c
new file mode 100644
index 0000000..af395d4
--- /dev/null
+++ b/dapl/common/dapl_srq_query.c
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_srq_query.c
+ *
+ * PURPOSE: Shared Receive Queue management
+ *
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.2 API, Chapter 6, section 5.6
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_srq_query
+ *
+ * DAPL Requirements Version 1.2, 6.5.6
+ *
+ * Return SRQ parameters to the consumer
+ *
+ * Input:
+ * 	srq_handle
+ *      srq_param_mask
+ *
+ * Output:
+ * 	srq_param
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *      DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_srq_query(IN DAT_SRQ_HANDLE srq_handle,
+	       IN DAT_SRQ_PARAM_MASK srq_param_mask,
+	       OUT DAT_SRQ_PARAM * srq_param)
+{
+	DAPL_SRQ *srq_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_srq_query (%p, %x, %p)\n",
+		     srq_handle, srq_param_mask, srq_param);
+
+	if (DAPL_BAD_HANDLE(srq_handle, DAPL_MAGIC_SRQ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+		goto bail;
+	}
+	if (srq_param == NULL) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	srq_ptr = (DAPL_SRQ *) srq_handle;
+
+	/*
+	 * XXX Need to calculate available_dto_count and outstanding_dto_count
+	 */
+	srq_ptr->param.available_dto_count = DAT_VALUE_UNKNOWN;
+	srq_ptr->param.outstanding_dto_count = DAT_VALUE_UNKNOWN;
+
+	*srq_param = srq_ptr->param;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/common/dapl_srq_resize.c b/dapl/common/dapl_srq_resize.c
new file mode 100644
index 0000000..32386ff
--- /dev/null
+++ b/dapl/common/dapl_srq_resize.c
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_srq_resize.c
+ *
+ * PURPOSE: Shared Receive Queue management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ *              the uDAPL 1.1 API, Chapter 6, section 5.7
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_srq_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_srq_resize
+ *
+ * DAPL Requirements Version 1.2, 6.5.7
+ *
+ * Modify the size of the event queue of a Shared Receive Queue
+ *
+ * Input:
+ * 	srq_handle
+ * 	srq_max_recv_dto
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_STATE
+ */
+
+DAT_RETURN DAT_API
+dapl_srq_resize(IN DAT_SRQ_HANDLE srq_handle, IN DAT_COUNT srq_max_recv_dto)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_SRQ *srq_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_srq_resize (%p, %d)\n",
+		     srq_handle, srq_max_recv_dto);
+
+	if (DAPL_BAD_HANDLE(srq_handle, DAPL_MAGIC_SRQ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+		goto bail;
+	}
+
+	srq_ptr = (DAPL_SRQ *) srq_handle;
+	ia_ptr = srq_ptr->header.owner_ia;
+
+	/*
+	 * Check for nonsense requests per the spec
+	 */
+	if (srq_max_recv_dto <= srq_ptr->param.low_watermark) {
+		dat_status = DAT_ERROR(DAT_INVALID_STATE, DAT_NO_SUBTYPE);
+		goto bail;
+	}
+
+	/* XXX Put implementation here XXX */
+
+	/* XXX */ dat_status = DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_srq_set_lw.c b/dapl/common/dapl_srq_set_lw.c
new file mode 100644
index 0000000..1e4254f
--- /dev/null
+++ b/dapl/common/dapl_srq_set_lw.c
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_srq_set_lw.c
+ *
+ * PURPOSE: Shared Receive Queue management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ *              the uDAPL 1.1 API, Chapter 6, section 5.4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_srq_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_srq_set_lw
+ *
+ * DAPL Requirements Version 1.2, 6.5.4
+ *
+ * Set the low water mark for an SRQ and arm the SRQ to generate an
+ * event if it is reached.
+ *
+ * Input:
+ * 	srq_handle
+ * 	srq_max_recv_dto
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_MODEL_NOT_SUPPORTED
+ */
+
+DAT_RETURN DAT_API
+dapl_srq_set_lw(IN DAT_SRQ_HANDLE srq_handle, IN DAT_COUNT low_watermark)
+{
+	DAPL_SRQ *srq_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_srq_set_lw (%p, %d)\n",
+		     srq_handle, low_watermark);
+
+	if (DAPL_BAD_HANDLE(srq_handle, DAPL_MAGIC_SRQ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+		goto bail;
+	}
+
+	srq_ptr = (DAPL_SRQ *) srq_handle;
+
+	/* XXX Put implementation here XXX */
+
+	/* XXX */ dat_status = DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_srq_util.c b/dapl/common/dapl_srq_util.c
new file mode 100644
index 0000000..3b29890
--- /dev/null
+++ b/dapl/common/dapl_srq_util.c
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ep_util.c
+ *
+ * PURPOSE: Shared Receive Queue management and support
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_srq_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_cookie.h"
+
+/*
+ * dapl_srq_alloc
+ *
+ * alloc and initialize an SRQ struct
+ *
+ * Input:
+ * 	IA INFO struct ptr
+ *	SRQ ATTR ptr
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	pointer to srq
+ *
+ */
+DAPL_SRQ *dapl_srq_alloc(IN DAPL_IA * ia_ptr, IN const DAT_SRQ_ATTR * srq_attr)
+{
+	DAPL_SRQ *srq_ptr;
+
+	/* Allocate SRQ */
+	srq_ptr = (DAPL_SRQ *) dapl_os_alloc(sizeof(DAPL_SRQ));
+
+	if (srq_ptr == NULL) {
+		goto bail;
+	}
+
+	/* zero the structure */
+	dapl_os_memzero(srq_ptr, sizeof(DAPL_SRQ));
+
+	/*
+	 * initialize the header
+	 */
+	srq_ptr->header.provider = ia_ptr->header.provider;
+	srq_ptr->header.magic = DAPL_MAGIC_SRQ;
+	srq_ptr->header.handle_type = DAT_HANDLE_TYPE_SRQ;
+	srq_ptr->header.owner_ia = ia_ptr;
+	srq_ptr->header.user_context.as_64 = 0;
+	srq_ptr->header.user_context.as_ptr = NULL;
+	dapl_os_atomic_set(&srq_ptr->srq_ref_count, 0);
+
+	dapl_llist_init_entry(&srq_ptr->header.ia_list_entry);
+	dapl_os_lock_init(&srq_ptr->header.lock);
+
+	/*
+	 * Initialize the body. 
+	 * XXX Assume srq_attrs is required
+	 */
+	srq_ptr->param.max_recv_dtos = srq_attr->max_recv_dtos;
+	srq_ptr->param.max_recv_iov = srq_attr->max_recv_iov;
+	srq_ptr->param.low_watermark = srq_attr->low_watermark;
+
+	/* Get a cookie buffer to track outstanding recvs */
+	if (DAT_SUCCESS != dapls_cb_create(&srq_ptr->recv_buffer, (DAPL_EP *) srq_ptr,	/* just saves the value */
+					   srq_ptr->param.max_recv_dtos)) {
+		dapl_srq_dealloc(srq_ptr);
+		srq_ptr = NULL;
+		goto bail;
+	}
+
+      bail:
+	return srq_ptr;
+}
+
+/*
+ * dapl_srq_dealloc
+ *
+ * Free the passed in SRQ structure.
+ *
+ * Input:
+ * 	SRQ pointer
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	none
+ *
+ */
+void dapl_srq_dealloc(IN DAPL_SRQ * srq_ptr)
+{
+	dapl_os_assert(srq_ptr->header.magic == DAPL_MAGIC_SRQ);
+
+	srq_ptr->header.magic = DAPL_MAGIC_INVALID;	/* reset magic to prevent reuse */
+	dapl_ia_unlink_srq(srq_ptr->header.owner_ia, srq_ptr);
+	dapls_cb_free(&srq_ptr->recv_buffer);
+	dapl_os_lock_destroy(&srq_ptr->header.lock);
+
+	dapl_os_free(srq_ptr, sizeof(DAPL_SRQ));
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_srq_util.h b/dapl/common/dapl_srq_util.h
new file mode 100644
index 0000000..952f767
--- /dev/null
+++ b/dapl/common/dapl_srq_util.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_srq_util.h
+ *
+ * PURPOSE: Utility defs & routines for the SRQ data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_SRQ_UTIL_H_
+#define _DAPL_SRQ_UTIL_H_
+
+#include "dapl.h"
+
+/* function prototypes */
+
+extern DAPL_SRQ * 
+dapl_srq_alloc (
+    IN DAPL_IA			*ia,
+    IN const DAT_SRQ_ATTR	*srq_attr );
+
+extern void 
+dapl_srq_dealloc (
+    IN DAPL_SRQ			*srq_ptr );
+
+#endif /*  _DAPL_SRQ_UTIL_H_ */
diff --git a/dapl/common/dapl_timer_util.c b/dapl/common/dapl_timer_util.c
new file mode 100644
index 0000000..f0d7964
--- /dev/null
+++ b/dapl/common/dapl_timer_util.c
@@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_timer_util.c
+ *
+ * PURPOSE: DAPL timer management
+ * Description: Routines to add and cancel timer records. A timer record
+ *		is put on the global timer queue. If the timer thread is
+ *		not running, start it. The timer thread will sleep
+ *		until a timer event or until a process wakes it up
+ *		to notice a new timer is available; we use a DAPL_WAIT_OBJ
+ *		for synchronization.
+ *
+ *		If a timer is cancelled, it is simlpy removed from the
+ *		queue. The timer may wakeup and notice there is no timer
+ *		record to awaken at this time, so it will reset for the
+ *		next entry. When there are no timer records to manage,
+ *		the timer thread just sleeps until awakened.
+ *
+ *		This file also contains the timer handler thread,
+ *		embodied in dapls_timer_thread().
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_timer_util.h"
+
+struct timer_head {
+	DAPL_LLIST_HEAD timer_list_head;
+	DAPL_OS_LOCK lock;
+	DAPL_OS_WAIT_OBJECT wait_object;
+	DAPL_OS_THREAD timeout_thread_handle;
+} g_daplTimerHead;
+
+typedef struct timer_head DAPL_TIMER_HEAD;
+
+void dapls_timer_thread(void *arg);
+
+void dapls_timer_init()
+{
+	/*
+	 * Set up the timer thread elements. The timer thread isn't
+	 * started until it is actually needed
+	 */
+	g_daplTimerHead.timer_list_head = NULL;
+	dapl_os_lock_init(&g_daplTimerHead.lock);
+	dapl_os_wait_object_init(&g_daplTimerHead.wait_object);
+	g_daplTimerHead.timeout_thread_handle = 0;
+}
+
+/*
+ * dapls_timer_set
+ *
+ * Set a timer. The timer will invoke the specified function
+ * after a number of useconds expires.
+ *
+ * Input:
+ *      timer    User provided timer structure
+ *      func     Function to invoke when timer expires
+ *      data     Argument passed to func()
+ *      expires  microseconds until timer fires
+ *
+ * Returns:
+ *	no return value
+ *
+ */
+DAT_RETURN
+dapls_timer_set(IN DAPL_OS_TIMER * timer,
+		IN void (*func) (uintptr_t),
+		IN void *data, IN DAPL_OS_TIMEVAL expires)
+{
+	DAPL_OS_TIMER *list_ptr;
+	DAPL_OS_TIMEVAL cur_time;
+	DAT_BOOLEAN wakeup_tmo_thread;
+
+	/*
+	 * Start the timer thread the first time we need a timer
+	 */
+	if (g_daplTimerHead.timeout_thread_handle == 0) {
+		dapl_os_thread_create(dapls_timer_thread,
+				      &g_daplTimerHead,
+				      &g_daplTimerHead.timeout_thread_handle);
+	}
+
+	dapl_llist_init_entry(&timer->list_entry);
+	wakeup_tmo_thread = DAT_FALSE;
+	dapl_os_get_time(&cur_time);
+	timer->expires = cur_time + expires;	/* calculate future time */
+	timer->function = func;
+	timer->data = data;
+
+	/*
+	 * Put the element on the queue: sorted by wakeup time, eariliest
+	 * first.
+	 */
+	dapl_os_lock(&g_daplTimerHead.lock);
+	/*
+	 * Deal with 3 cases due to our list structure:
+	 * 1) list is empty: become the list head
+	 * 2) New timer is sooner than list head: become the list head
+	 * 3) otherwise, sort the timer into the list, no need to wake
+	 *    the timer thread up
+	 */
+	if (dapl_llist_is_empty(&g_daplTimerHead.timer_list_head)) {
+		/* Case 1: add entry to head of list */
+		dapl_llist_add_head(&g_daplTimerHead.timer_list_head,
+				    (DAPL_LLIST_ENTRY *) & timer->list_entry,
+				    timer);
+		wakeup_tmo_thread = DAT_TRUE;
+	} else {
+		list_ptr = (DAPL_OS_TIMER *)
+		    dapl_llist_peek_head(&g_daplTimerHead.timer_list_head);
+
+		if (timer->expires < list_ptr->expires) {
+			/* Case 2: add entry to head of list */
+			dapl_llist_add_head(&g_daplTimerHead.timer_list_head,
+					    (DAPL_LLIST_ENTRY *) & timer->
+					    list_entry, timer);
+			wakeup_tmo_thread = DAT_TRUE;
+		} else {
+			/* Case 3: figure out where entry goes in sorted list */
+			list_ptr =
+			    dapl_llist_next_entry(&g_daplTimerHead.
+						  timer_list_head,
+						  (DAPL_LLIST_ENTRY *) &
+						  list_ptr->list_entry);
+
+			while (list_ptr != NULL) {
+				if (timer->expires < list_ptr->expires) {
+					dapl_llist_add_entry(&g_daplTimerHead.
+							     timer_list_head,
+							     (DAPL_LLIST_ENTRY
+							      *) & list_ptr->
+							     list_entry,
+							     (DAPL_LLIST_ENTRY
+							      *) & timer->
+							     list_entry, timer);
+					break;
+
+				}
+				list_ptr =
+				    dapl_llist_next_entry(&g_daplTimerHead.
+							  timer_list_head,
+							  (DAPL_LLIST_ENTRY *) &
+							  list_ptr->list_entry);
+			}
+			if (list_ptr == NULL) {
+				/* entry goes to the end of the list */
+				dapl_llist_add_tail(&g_daplTimerHead.
+						    timer_list_head,
+						    (DAPL_LLIST_ENTRY *) &
+						    timer->list_entry, timer);
+			}
+		}
+
+	}
+	dapl_os_unlock(&g_daplTimerHead.lock);
+
+	if (wakeup_tmo_thread == DAT_TRUE) {
+		dapl_os_wait_object_wakeup(&g_daplTimerHead.wait_object);
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_os_timer_cancel
+ *
+ * Cancel a timer. Simply deletes the timer with no function invocations
+ *
+ * Input:
+ *      timer    User provided timer structure
+ *
+ * Returns:
+ *	no return value
+ */
+void dapls_timer_cancel(IN DAPL_OS_TIMER * timer)
+{
+	dapl_os_lock(&g_daplTimerHead.lock);
+	/*
+	 * make sure the entry has not been removed by another thread
+	 */
+	if (!dapl_llist_is_empty(&g_daplTimerHead.timer_list_head) &&
+	    timer->list_entry.list_head == &g_daplTimerHead.timer_list_head) {
+		dapl_llist_remove_entry(&g_daplTimerHead.timer_list_head,
+					(DAPL_LLIST_ENTRY *) & timer->
+					list_entry);
+	}
+	/*
+	 * If this was the first entry on the queue we could awaken the
+	 * thread and have it reset the list; but it will just wake up
+	 * and find that the timer entry has been removed, then go back
+	 * to sleep, so don't bother.
+	 */
+	dapl_os_unlock(&g_daplTimerHead.lock);
+}
+
+/*
+ * dapls_timer_thread
+ *
+ * Core worker thread dealing with all timers. Basic algorithm:
+ *	- Sleep until work shows up
+ *	- Take first element of sorted timer list and wake
+ *	  invoke the callback if expired
+ *	- Sleep for the timeout period if not expired
+ *
+ * Input:
+ *      timer_head    Timer head structure to manage timer lists
+ *
+ * Returns:
+ *	no return value
+ */
+void dapls_timer_thread(void *arg)
+{
+	DAPL_OS_TIMER *list_ptr;
+	DAPL_OS_TIMEVAL cur_time;
+	DAT_RETURN dat_status;
+	DAPL_TIMER_HEAD *timer_head;
+
+	timer_head = arg;
+
+	for (;;) {
+		if (dapl_llist_is_empty(&timer_head->timer_list_head)) {
+			dat_status =
+			    dapl_os_wait_object_wait(&timer_head->wait_object,
+						     DAT_TIMEOUT_INFINITE);
+		}
+
+		/*
+		 * Lock policy:
+		 * While this thread is accessing the timer list, it holds the
+		 * lock.  Otherwise, it doesn't.
+		 */
+		dapl_os_lock(&timer_head->lock);
+		while (!dapl_llist_is_empty(&timer_head->timer_list_head)) {
+			list_ptr = (DAPL_OS_TIMER *)
+			    dapl_llist_peek_head(&g_daplTimerHead.
+						 timer_list_head);
+			dapl_os_get_time(&cur_time);
+
+			if (list_ptr->expires <= cur_time) {
+				/*
+				 * Remove the entry from the list. Sort out how much
+				 * time we need to sleep for the next one
+				 */
+				list_ptr =
+				    dapl_llist_remove_head(&timer_head->
+							   timer_list_head);
+				dapl_os_unlock(&timer_head->lock);
+
+				/*
+				 * Invoke the user callback
+				 */
+				list_ptr->function((uintptr_t) list_ptr->data);
+				/* timer structure was allocated by caller, we don't
+				 * free it here.
+				 */
+
+				/* reacquire the lock */
+				dapl_os_lock(&timer_head->lock);
+			} else {
+				dapl_os_unlock(&timer_head->lock);
+				dat_status =
+				    dapl_os_wait_object_wait(&timer_head->
+							     wait_object,
+							     (DAT_TIMEOUT)
+							     (list_ptr->
+							      expires -
+							      cur_time));
+				dapl_os_lock(&timer_head->lock);
+			}
+		}
+		/*
+		 * release the lock before going back to the top to sleep
+		 */
+		dapl_os_unlock(&timer_head->lock);
+
+		if (dat_status == DAT_INTERNAL_ERROR) {
+			/*
+			 * XXX What do we do here?
+			 */
+		}
+	}			/* for (;;) */
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/common/dapl_timer_util.h b/dapl/common/dapl_timer_util.h
new file mode 100644
index 0000000..c24d26a
--- /dev/null
+++ b/dapl/common/dapl_timer_util.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dapl_timer_util.h
+ *
+ * PURPOSE: DAPL timer management
+ * Description: support for dapl_timer.h
+ *
+ * $Id:$
+ **********************************************************************/
+
+void dapls_timer_init ( void );
+
+DAT_RETURN dapls_timer_set (
+	IN  DAPL_OS_TIMER		*timer,
+	IN  void			(*func)	(uintptr_t),
+	IN  void			*data,
+	IN  DAPL_OS_TIMEVAL	 	expires );
+
+void dapls_timer_cancel (
+	IN  DAPL_OS_TIMER		*timer);
diff --git a/dapl/include/dapl.h b/dapl/include/dapl.h
new file mode 100755
index 0000000..b13c963
--- /dev/null
+++ b/dapl/include/dapl.h
@@ -0,0 +1,1275 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl.h
+ *
+ * PURPOSE: defines common data structures for the DAPL reference implemenation
+ *
+ * Description: This file describes the working data structures used within
+ *              DAPL RI.
+ *
+ *
+ * $Id: dapl.h 1317 2005-04-25 17:29:42Z jlentini $
+ **********************************************************************/
+
+#ifndef _DAPL_H_
+#define _DAPL_H_
+
+#if defined(__KERNEL__)
+#include <dat2/kdat.h>
+#else
+#include <dat2/udat.h>
+#endif	/* defined(__KERNEL__) */
+#include <dat2/dat_registry.h>
+#include "dapl_osd.h"
+#include "dapl_debug.h"
+
+
+
+/*********************************************************************
+ *                                                                   *
+ * Enumerations                                                      *
+ *                                                                   *
+ *********************************************************************/
+
+typedef enum dapl_magic
+{
+    /* magic number values for verification & debug */
+    DAPL_MAGIC_IA	= 0xCafeF00d,
+    DAPL_MAGIC_EVD	= 0xFeedFace,
+    DAPL_MAGIC_EP	= 0xDeadBabe,
+    DAPL_MAGIC_LMR	= 0xBeefCafe,
+    DAPL_MAGIC_RMR      = 0xABadCafe,
+    DAPL_MAGIC_PZ	= 0xDeafBeef,
+    DAPL_MAGIC_PSP	= 0xBeadeD0c,
+    DAPL_MAGIC_RSP	= 0xFab4Feed,
+    DAPL_MAGIC_SRQ	= 0xC001Babe,
+    DAPL_MAGIC_CR	= 0xBe12Cee1,
+    DAPL_MAGIC_CR_DESTROYED = 0xB12bDead,
+    DAPL_MAGIC_CNO	= 0xDeadF00d,
+    DAPL_MAGIC_INVALID  = 0xFFFFFFFF
+} DAPL_MAGIC;
+
+typedef enum dapl_evd_state
+{
+    DAPL_EVD_STATE_TERMINAL,
+    DAPL_EVD_STATE_INITIAL,
+    DAPL_EVD_STATE_OPEN,
+    DAPL_EVD_STATE_WAITED,
+    DAPL_EVD_STATE_DEAD	= 0xDEAD
+} DAPL_EVD_STATE;
+
+typedef enum dapl_evd_completion
+{
+    DAPL_EVD_STATE_INIT,
+    DAPL_EVD_STATE_SOLICITED_WAIT,
+    DAPL_EVD_STATE_THRESHOLD,
+    DAPL_EVD_STATE_UNSIGNALLED
+} DAPL_EVD_COMPLETION;
+
+typedef enum dapl_cno_state
+{
+    DAPL_CNO_STATE_UNTRIGGERED,
+    DAPL_CNO_STATE_TRIGGERED,
+    DAPL_CNO_STATE_DEAD = 0xDeadFeed,
+} DAPL_CNO_STATE;
+
+typedef enum dapl_qp_state
+{
+    DAPL_QP_STATE_UNCONNECTED,
+    DAPL_QP_STATE_RESERVED,
+    DAPL_QP_STATE_PASSIVE_CONNECTION_PENDING,
+    DAPL_QP_STATE_ACTIVE_CONNECTION_PENDING,
+    DAPL_QP_STATE_TENTATIVE_CONNECTION_PENDING,
+    DAPL_QP_STATE_CONNECTED,
+    DAPL_QP_STATE_DISCONNECT_PENDING,
+    DAPL_QP_STATE_ERROR,
+    DAPL_QP_STATE_NOT_REUSABLE,
+    DAPL_QP_STATE_FREE
+} DAPL_QP_STATE;
+
+
+/*********************************************************************
+ *                                                                   *
+ * Constants                                                         *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * number of HCAs allowed
+ */
+#define DAPL_MAX_HCA_COUNT		4
+
+/*
+ * Configures the RMR bind evd restriction
+ */
+
+#define DAPL_RMR_BIND_EVD_RESTRICTION 	DAT_RMR_EVD_SAME_AS_REQUEST_EVD
+
+/*
+ * special qp_state indicating the EP does not have a QP attached yet
+ */
+#define DAPL_QP_STATE_UNATTACHED 	0xFFF0
+
+#define DAPL_MAX_PRIVATE_DATA_SIZE 	256
+
+/*********************************************************************
+ *                                                                   *
+ * Macros                                                            *
+ *                                                                   *
+ *********************************************************************/
+
+#if defined (sun) || defined(__sun) || defined(_sun_) || defined (__solaris__) 
+#define DAPL_BAD_PTR(a) ((unsigned long)(a) & 3)
+#elif defined(__linux__)
+#define DAPL_BAD_PTR(a) ((unsigned long)(a) & 3)
+#elif defined(_WIN64)
+#define DAPL_BAD_PTR(a) ((unsigned long)((DAT_UINT64)(a)) & 3)
+#elif defined(_WIN32)
+#define DAPL_BAD_PTR(a) ((unsigned long)((DAT_UINT64)(a)) & 3)
+#endif
+
+/*
+ * Simple macro to verify a handle is bad. Conditions:
+ * - pointer is NULL
+ * - pointer is not word aligned
+ * - pointer's magic number is wrong
+ */
+
+#define DAPL_BAD_HANDLE(h, magicNum) (				\
+	    ((h) == NULL) ||					\
+	    DAPL_BAD_PTR(h) ||					\
+	    (((DAPL_HEADER *)(h))->magic != (magicNum)))
+
+#define DAPL_MIN(a, b)        ((a < b) ? (a) : (b))
+#define DAPL_MAX(a, b)        ((a > b) ? (a) : (b))
+
+#if NDEBUG > 0
+#define DEBUG_IS_BAD_HANDLE(h, magicNum) (DAPL_BAD_HANDLE(h, magicNum))
+#else
+#define DEBUG_IS_BAD_HANDLE(h, magicNum) (0)
+#endif
+
+#define DAT_ERROR(Type, SubType) ((DAT_RETURN)(DAT_CLASS_ERROR | Type | SubType))
+
+/*********************************************************************
+ *                                                                   *
+ * Typedefs                                                          *
+ *                                                                   *
+ *********************************************************************/
+
+typedef struct dapl_llist_entry		DAPL_LLIST_ENTRY;
+typedef DAPL_LLIST_ENTRY *		DAPL_LLIST_HEAD;
+typedef struct dapl_ring_buffer		DAPL_RING_BUFFER;
+typedef struct dapl_cookie_buffer	DAPL_COOKIE_BUFFER;
+
+typedef struct dapl_hash_table          DAPL_HASH_TABLE;
+typedef struct dapl_hash_table *        DAPL_HASH_TABLEP;
+typedef DAT_UINT64                      DAPL_HASH_KEY;
+typedef void *                          DAPL_HASH_DATA;
+
+typedef struct dapl_hca			DAPL_HCA;
+
+typedef struct dapl_header		DAPL_HEADER;
+
+typedef struct dapl_ia			DAPL_IA;
+typedef struct dapl_cno			DAPL_CNO;
+typedef struct dapl_evd         	DAPL_EVD;
+typedef struct dapl_ep 	        	DAPL_EP;
+typedef struct dapl_srq	        	DAPL_SRQ;
+typedef struct dapl_pz			DAPL_PZ;
+typedef struct dapl_lmr			DAPL_LMR;
+typedef struct dapl_rmr			DAPL_RMR;
+typedef struct dapl_sp			DAPL_SP;
+typedef struct dapl_cr			DAPL_CR;
+
+typedef struct dapl_cookie		DAPL_COOKIE;
+typedef struct dapl_dto_cookie		DAPL_DTO_COOKIE;
+typedef struct dapl_rmr_cookie		DAPL_RMR_COOKIE;
+
+typedef struct dapl_private		DAPL_PRIVATE;
+
+
+
+/*********************************************************************
+ *                                                                   *
+ * Structures                                                        *
+ *                                                                   *
+ *********************************************************************/
+
+struct dapl_llist_entry
+{
+    struct dapl_llist_entry	*flink;
+    struct dapl_llist_entry	*blink;
+    void			*data;
+    DAPL_LLIST_HEAD		*list_head; /* for consistency checking */
+};
+
+struct dapl_ring_buffer
+{
+    void		**base;		/* base of element array */
+    DAT_COUNT		lim;		/* mask, number of entries - 1 */
+    DAPL_ATOMIC		head;		/* head pointer index */
+    DAPL_ATOMIC		tail;		/* tail pointer index */
+};
+
+struct dapl_cookie_buffer
+{
+    DAPL_COOKIE		*pool;
+    DAT_COUNT		pool_size;
+    DAPL_ATOMIC		head;
+    DAPL_ATOMIC		tail;
+};
+
+#ifdef	IBAPI
+#include "dapl_ibapi_util.h"
+#elif VAPI
+#include "dapl_vapi_util.h"
+#elif __OPENIB__
+#include "dapl_openib_util.h"
+#include "dapl_openib_cm.h"
+#elif DUMMY
+#include "dapl_dummy_util.h"
+#elif OPENIB
+#include "dapl_ib_util.h"
+#else /* windows - IBAL and/or IBAL+Sock_CM */
+#include "dapl_ibal_util.h"
+#endif
+
+struct dapl_hca
+{
+    DAPL_OS_LOCK	lock;
+    DAPL_LLIST_HEAD	ia_list_head;	   /* list of all open IAs */
+    DAPL_ATOMIC		handle_ref_count;  /* count of ia_opens on handle */
+    DAPL_EVD		*async_evd;
+    DAPL_EVD		*async_error_evd;
+    DAT_SOCK_ADDR6	hca_address;	   /* local address of HCA*/
+    char	 	*name;		   /* provider name */
+    ib_hca_handle_t	ib_hca_handle;
+    unsigned long       port_num;	   /* physical port number */
+    ib_hca_transport_t  ib_trans;	   /* Values specific transport API */
+    /* Memory Subsystem Support */
+    DAPL_HASH_TABLE 	*lmr_hash_table;
+    /* Limits & useful HCA attributes */
+    DAT_IA_ATTR		ia_attr;
+};
+
+/* DAPL Objects always have the following header */
+struct dapl_header
+{
+    DAT_PROVIDER	*provider;	/* required by DAT - must be first */
+    DAPL_MAGIC		magic;		/* magic number for verification */
+    DAT_HANDLE_TYPE	handle_type;	/* struct type */
+    DAPL_IA		*owner_ia;	/* ia which owns this stuct */
+    DAPL_LLIST_ENTRY	ia_list_entry;	/* link entry on ia struct */
+    DAT_CONTEXT		user_context;	/* user context - opaque to DAPL */
+    DAPL_OS_LOCK	lock;		/* lock - in header for easier macros */
+};
+
+/* DAPL_IA maps to DAT_IA_HANDLE */
+struct dapl_ia
+{
+    DAPL_HEADER		header;
+    DAPL_HCA		*hca_ptr;
+    DAPL_EVD		*async_error_evd;
+    DAT_BOOLEAN		cleanup_async_error_evd;
+
+    DAPL_LLIST_ENTRY	hca_ia_list_entry;	/* HCAs list of IAs */
+    DAPL_LLIST_HEAD	ep_list_head;		/* EP queue */
+    DAPL_LLIST_HEAD	lmr_list_head;		/* LMR queue */
+    DAPL_LLIST_HEAD	rmr_list_head;		/* RMR queue */
+    DAPL_LLIST_HEAD	pz_list_head;		/* PZ queue */
+    DAPL_LLIST_HEAD	evd_list_head;		/* EVD queue */
+    DAPL_LLIST_HEAD	cno_list_head;		/* CNO queue */
+    DAPL_LLIST_HEAD	psp_list_head;		/* PSP queue */
+    DAPL_LLIST_HEAD	rsp_list_head;		/* RSP queue */
+    DAPL_LLIST_HEAD	srq_list_head;		/* SRQ queue */
+#ifdef DAPL_COUNTERS
+    void		*cntrs;
+#endif
+};
+
+/* DAPL_CNO maps to DAT_CNO_HANDLE */
+struct dapl_cno
+{
+    DAPL_HEADER	header;
+
+    /* A CNO cannot be freed while it is referenced elsewhere.  */
+    DAPL_ATOMIC			cno_ref_count;
+    DAPL_CNO_STATE		cno_state;
+
+    DAT_COUNT			cno_waiters;
+    DAPL_EVD			*cno_evd_triggered;
+#if defined(__KERNEL__)
+    DAT_UPCALL_OBJECT		cno_upcall;
+    DAT_UPCALL_POLICY		cno_upcall_policy;
+#else
+    DAT_OS_WAIT_PROXY_AGENT	cno_wait_agent;
+#endif	/* defined(__KERNEL__) */
+
+    DAPL_OS_WAIT_OBJECT		cno_wait_object;
+};
+
+/* DAPL_EVD maps to DAT_EVD_HANDLE */
+struct dapl_evd
+{
+    DAPL_HEADER		header;
+
+    DAPL_EVD_STATE	evd_state;
+    DAT_EVD_FLAGS	evd_flags;
+    DAT_BOOLEAN		evd_enabled; /* For attached CNO.  */
+    DAT_BOOLEAN		evd_waitable; /* EVD state.  */
+
+    /* Derived from evd_flags; see dapls_evd_internal_create.  */
+    DAT_BOOLEAN		evd_producer_locking_needed;
+
+    /* Every EVD has a CQ unless it is a SOFTWARE_EVENT only EVD */
+    ib_cq_handle_t	ib_cq_handle;
+
+    /* Mellanox Specific completion handle for registration/de-registration */
+    ib_comp_handle_t    ib_comp_handle;
+
+    /* An Event Dispatcher cannot be freed while
+     * it is referenced elsewhere.
+     */
+    DAPL_ATOMIC		evd_ref_count;
+
+    /* Set if there has been a catastrophic overflow */
+    DAT_BOOLEAN		catastrophic_overflow;
+
+    /* the actual events */
+    DAT_COUNT		qlen;
+    DAT_EVENT		*events;
+    DAPL_RING_BUFFER	free_event_queue;
+    DAPL_RING_BUFFER	pending_event_queue;
+
+    /* CQ Completions are not placed into 'deferred_events'
+     ** rather they are simply left on the Completion Queue
+     ** and the fact that there was a notification is flagged.
+     */
+    DAT_BOOLEAN		cq_notified;
+    DAPL_OS_TICKS	cq_notified_when;
+
+    DAT_COUNT		cno_active_count;
+    DAPL_CNO		*cno_ptr;
+
+    DAPL_OS_WAIT_OBJECT wait_object;
+
+#ifdef CQ_WAIT_OBJECT
+    /* Some providers support a direct CQ wait object */
+    ib_wait_obj_handle_t	cq_wait_obj_handle;
+#endif
+
+    DAT_COUNT		threshold;
+    DAPL_EVD_COMPLETION	completion_type;
+
+#ifdef DAPL_COUNTERS
+    void		*cntrs;
+#endif
+};
+
+/* DAPL_PRIVATE used to pass private data in a connection */
+struct dapl_private
+{
+#ifdef IBHOSTS_NAMING
+    DAT_SOCK_ADDR6		hca_address;	/* local address of HCA*/
+#endif /* IBHOSTS_NAMING */
+    unsigned char		private_data[DAPL_MAX_PRIVATE_DATA_SIZE];
+};
+
+/* uDAPL timer entry, used to queue timeouts */
+struct dapl_timer_entry
+{
+    DAPL_LLIST_ENTRY		list_entry;	/* link entry on ia struct */
+    DAPL_OS_TIMEVAL		expires;
+    void			(*function) (uintptr_t);
+    void			*data;
+};
+
+#ifdef DAPL_DBG_IO_TRC
+
+#define DBG_IO_TRC_QLEN   32		/* length of trace buffer        */
+#define DBG_IO_TRC_IOV 3		/* iov elements we keep track of */
+
+struct io_buf_track
+{
+    Ib_send_op_type 		op_type;
+    DAPL_COOKIE			*cookie;
+    DAT_LMR_TRIPLET		iov[DBG_IO_TRC_IOV];
+    DAT_RMR_TRIPLET		remote_iov;
+    unsigned int		done;	/* count to track completion ordering */
+    int				status;
+    void			*wqe;
+};
+
+#endif /* DAPL_DBG_IO_TRC */
+
+/* DAPL_EP maps to DAT_EP_HANDLE */
+struct dapl_ep
+{
+    DAPL_HEADER			header;
+    /* What the DAT Consumer asked for */
+    DAT_EP_PARAM		param;
+
+    /* The RC Queue Pair (IBM OS API) */
+    ib_qp_handle_t		qp_handle;
+    unsigned int		qpn;	/* qp number */
+    ib_qp_state_t		qp_state;
+
+    /* communications manager handle (IBM OS API) */
+    dp_ib_cm_handle_t		cm_handle;
+
+    /* store the remote IA address here, reference from the param
+     * struct which only has a pointer, no storage
+     */
+    DAT_SOCK_ADDR6		remote_ia_address;
+
+    /* For passive connections we maintain a back pointer to the CR */
+    void *			cr_ptr;
+
+    /* pointer to connection timer, if set */
+    struct dapl_timer_entry	*cxn_timer;
+
+    /* private data container */
+    DAPL_PRIVATE		private;
+
+    /* DTO data */
+    DAPL_ATOMIC			req_count;
+    DAPL_ATOMIC			recv_count;
+
+    DAPL_COOKIE_BUFFER	req_buffer;
+    DAPL_COOKIE_BUFFER	recv_buffer;
+
+#ifdef DAPL_DBG_IO_TRC
+    int			ibt_dumped;
+    struct io_buf_track *ibt_base;
+    DAPL_RING_BUFFER	ibt_queue;
+#endif /* DAPL_DBG_IO_TRC */
+#if defined(_WIN32) || defined(_WIN64)
+    DAT_BOOLEAN         recv_discreq;
+    DAT_BOOLEAN         sent_discreq;
+    dp_ib_cm_handle_t   ibal_cm_handle;
+#endif
+#ifdef DAPL_COUNTERS
+    void		*cntrs;
+#endif
+};
+
+/* DAPL_SRQ maps to DAT_SRQ_HANDLE */
+struct dapl_srq
+{
+    DAPL_HEADER		header;
+    DAT_SRQ_PARAM	param;
+    DAPL_ATOMIC		srq_ref_count;
+    DAPL_COOKIE_BUFFER	recv_buffer;
+    DAPL_ATOMIC		recv_count;
+};
+
+/* DAPL_PZ maps to DAT_PZ_HANDLE */
+struct dapl_pz
+{
+    DAPL_HEADER		header;
+    ib_pd_handle_t	pd_handle;
+    DAPL_ATOMIC		pz_ref_count;
+};
+
+/* DAPL_LMR maps to DAT_LMR_HANDLE */
+struct dapl_lmr
+{
+    DAPL_HEADER		header;
+    DAT_LMR_PARAM	param;
+    ib_mr_handle_t	mr_handle;
+    DAPL_ATOMIC		lmr_ref_count;
+#if !defined(__KDAPL__)
+    char		shmid[DAT_LMR_COOKIE_SIZE]; /* shared memory ID */
+    ib_shm_transport_t	ib_trans; 	/* provider specific data */
+#endif /* !__KDAPL__ */
+};
+
+/* DAPL_RMR maps to DAT_RMR_HANDLE */
+struct dapl_rmr
+{
+    DAPL_HEADER		header;
+    DAT_RMR_PARAM	param;
+    DAPL_EP             *ep;
+    DAPL_PZ             *pz;
+    DAPL_LMR            *lmr;
+    ib_mw_handle_t	mw_handle;
+};
+
+/* SP types, indicating the state and queue */
+typedef enum dapl_sp_state
+{
+    DAPL_SP_STATE_FREE,
+    DAPL_SP_STATE_PSP_LISTENING,
+    DAPL_SP_STATE_PSP_PENDING,
+    DAPL_SP_STATE_RSP_LISTENING,
+    DAPL_SP_STATE_RSP_PENDING
+} DAPL_SP_STATE;
+
+/* DAPL_SP maps to DAT_PSP_HANDLE and DAT_RSP_HANDLE */
+struct dapl_sp
+{
+    DAPL_HEADER		header;
+    DAPL_SP_STATE	state;		/* type and queue of the SP */
+
+    /* PSP/RSP PARAM fields */
+    DAT_CONN_QUAL       conn_qual;
+    DAT_EVD_HANDLE      evd_handle;
+    DAT_PSP_FLAGS       psp_flags;
+    DAT_EP_HANDLE       ep_handle;
+
+     /* maintenence fields */
+    DAT_BOOLEAN		listening;	/* PSP is registered & active */
+    ib_cm_srvc_handle_t	cm_srvc_handle; /* Used by Mellanox CM */
+    DAPL_LLIST_HEAD	cr_list_head;	/* CR pending queue */
+    DAT_COUNT		cr_list_count;	/* count of CRs on queue */
+#if defined(_VENDOR_IBAL_)
+    DAPL_OS_WAIT_OBJECT wait_object;    /* cancel & destroy. */
+#endif
+};
+
+/* DAPL_CR maps to DAT_CR_HANDLE */
+struct dapl_cr
+{
+    DAPL_HEADER		header;
+
+    /* for convenience the data is kept as a DAT_CR_PARAM.
+     * however, the "local_endpoint" field is always NULL
+     * so this wastes a pointer. This is probably ok to
+     * simplify code, espedially dat_cr_query.
+     */
+    DAT_CR_PARAM	param;
+    /* IB specific fields */
+    dp_ib_cm_handle_t	ib_cm_handle;
+
+    DAT_SOCK_ADDR6	remote_ia_address;
+    /* Assuming that the maximum private data size is small.
+     * If it gets large, use of a pointer may be appropriate.
+     */
+    unsigned char	private_data[DAPL_MAX_PRIVATE_DATA_SIZE];
+    /*
+     * Need to be able to associate the CR back to the PSP for
+     * dapl_cr_reject.
+     */
+    DAPL_SP		*sp_ptr;
+};
+
+typedef enum dapl_dto_type
+{
+    DAPL_DTO_TYPE_SEND,
+    DAPL_DTO_TYPE_RECV,
+    DAPL_DTO_TYPE_RDMA_WRITE,
+    DAPL_DTO_TYPE_RDMA_READ,
+#ifdef DAT_EXTENSIONS
+    DAPL_DTO_TYPE_EXTENSION,
+#endif
+} DAPL_DTO_TYPE;
+
+typedef enum dapl_cookie_type
+{
+    DAPL_COOKIE_TYPE_NULL,
+    DAPL_COOKIE_TYPE_DTO,
+    DAPL_COOKIE_TYPE_RMR,
+} DAPL_COOKIE_TYPE;
+
+/* DAPL_DTO_COOKIE used as context for DTO WQEs */
+struct dapl_dto_cookie
+{
+    DAPL_DTO_TYPE		type;
+    DAT_DTO_COOKIE		cookie;
+    DAT_COUNT			size;	/* used for SEND and RDMA write */
+};
+
+/* DAPL_RMR_COOKIE used as context for bind WQEs */
+struct dapl_rmr_cookie
+{
+    DAPL_RMR			*rmr;
+    DAT_RMR_COOKIE              cookie;
+};
+
+/* DAPL_COOKIE used as context for WQEs */
+struct dapl_cookie
+{
+    DAPL_COOKIE_TYPE    	type; /* Must be first, to define struct.  */
+    DAPL_EP			*ep;
+    DAT_COUNT 			index;
+    union
+    {
+	DAPL_DTO_COOKIE 	dto;
+	DAPL_RMR_COOKIE		rmr;
+    } val;
+};
+
+/*
+ * Private Data operations. Used to obtain the size of the private
+ * data from the provider layer.
+ */
+typedef enum dapl_private_data_op
+{
+    DAPL_PDATA_CONN_REQ  = 0,		/* connect request    */
+    DAPL_PDATA_CONN_REP  = 1,		/* connect reply      */
+    DAPL_PDATA_CONN_REJ  = 2,		/* connect reject     */
+    DAPL_PDATA_CONN_DREQ = 3,		/* disconnect request */
+    DAPL_PDATA_CONN_DREP = 4,		/* disconnect reply   */
+} DAPL_PDATA_OP;
+
+
+/*
+ * Generic HCA name field
+ */
+#define DAPL_HCA_NAME_MAX_LEN 260
+typedef char DAPL_HCA_NAME[DAPL_HCA_NAME_MAX_LEN+1];
+
+#ifdef IBHOSTS_NAMING
+
+/*
+ * Simple mapping table to match IP addresses to GIDs. Loaded
+ * by dapl_init.
+ */
+typedef struct _dapl_gid_map_table
+{
+    uint32_t		ip_address;
+    ib_gid_t		gid;
+} DAPL_GID_MAP;
+
+#endif /* IBHOSTS_NAMING */
+
+/*
+ * IBTA defined reason for reject message: See IBTA 1.1 specification,
+ * 12.6.7.2 REJECTION REASON section.
+ */
+#define IB_CM_REJ_REASON_CONSUMER_REJ            0x001C
+
+
+#if defined(DAPL_DBG_IO_TRC)
+/*********************************************************************
+ *                                                                   *
+ * Debug I/O tracing support prototypes                              *
+ *                                                                   *
+ *********************************************************************/
+/*
+ * I/O tracing support
+ */
+void dapls_io_trc_alloc (
+    DAPL_EP			*ep_ptr);
+
+void dapls_io_trc_update_completion (
+    DAPL_EP			*ep_ptr,
+    DAPL_COOKIE			*cookie,
+    ib_uint32_t			ib_status );
+
+void dapls_io_trc_dump (
+    DAPL_EP			*ep_ptr,
+    ib_work_completion_t	*cqe_ptr,
+    ib_uint32_t			ib_status);
+
+#else /* DAPL_DBG_IO_TRC */
+
+#define dapls_io_trc_alloc(a)
+#define dapls_io_trc_update_completion(a, b, c)
+#define dapls_io_trc_dump(a, b, c)
+
+#endif /* DAPL_DBG_IO_TRC */
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+typedef void (*DAPL_CONNECTION_STATE_HANDLER) (
+	IN	DAPL_EP *,
+	IN	ib_cm_events_t,
+	IN	const void *,
+	OUT	DAT_EVENT *);
+
+/*
+ * DAT Mandated functions
+ */
+
+extern DAT_RETURN DAT_API dapl_ia_open (
+	IN	const DAT_NAME_PTR,	/* name */
+	IN	DAT_COUNT,		/* asynch_evd_qlen */
+	INOUT	DAT_EVD_HANDLE *,	/* asynch_evd_handle */
+	OUT	DAT_IA_HANDLE *);	/* ia_handle */
+
+extern DAT_RETURN DAT_API dapl_ia_close (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_CLOSE_FLAGS );	/* ia_flags */
+
+
+extern DAT_RETURN DAT_API dapl_ia_query (
+	IN	DAT_IA_HANDLE,		/* ia handle */
+	OUT	DAT_EVD_HANDLE *,	/* async_evd_handle */
+	IN	DAT_IA_ATTR_MASK,	/* ia_params_mask */
+	OUT	DAT_IA_ATTR *,		/* ia_params */
+	IN	DAT_PROVIDER_ATTR_MASK, /* provider_params_mask */
+	OUT	DAT_PROVIDER_ATTR * );	/* provider_params */
+
+
+/* helper functions */
+
+extern DAT_RETURN DAT_API dapl_set_consumer_context (
+	IN	DAT_HANDLE,			/* dat handle */
+	IN	DAT_CONTEXT);			/* context */
+
+extern DAT_RETURN DAT_API dapl_get_consumer_context (
+	IN	DAT_HANDLE,			/* dat handle */
+	OUT	DAT_CONTEXT * );		/* context */
+
+extern DAT_RETURN DAT_API dapl_get_handle_type (
+	IN	DAT_HANDLE,
+	OUT	DAT_HANDLE_TYPE * );
+
+/* CNO functions */
+
+#if !defined(__KERNEL__)
+extern DAT_RETURN DAT_API dapl_cno_create (
+	IN	DAT_IA_HANDLE,			/* ia_handle */
+	IN	DAT_OS_WAIT_PROXY_AGENT,	/* agent */
+	OUT	DAT_CNO_HANDLE *);		/* cno_handle */
+
+extern DAT_RETURN DAT_API dapl_cno_modify_agent (
+	IN	DAT_CNO_HANDLE,			/* cno_handle */
+	IN	DAT_OS_WAIT_PROXY_AGENT);	/* agent */
+
+extern DAT_RETURN DAT_API dapl_cno_query (
+	IN	DAT_CNO_HANDLE,		/* cno_handle */
+	IN	DAT_CNO_PARAM_MASK,	/* cno_param_mask */
+	OUT	DAT_CNO_PARAM * );	/* cno_param */
+
+extern DAT_RETURN DAT_API dapl_cno_free (
+	IN	DAT_CNO_HANDLE);	/* cno_handle */
+
+extern DAT_RETURN DAT_API dapl_cno_wait (
+	IN	DAT_CNO_HANDLE,		/* cno_handle */
+	IN	DAT_TIMEOUT,		/* timeout */
+	OUT	DAT_EVD_HANDLE *);	/* evd_handle */
+
+extern DAT_RETURN DAT_API dapl_cno_fd_create (
+	IN 	DAT_IA_HANDLE,		/* ia_handle            */
+	OUT	DAT_FD *,		/* file_descriptor	*/
+	OUT 	DAT_CNO_HANDLE *);	/* cno_handle           */
+
+extern DAT_RETURN DAT_API dapl_cno_trigger (
+	IN	DAT_CNO_HANDLE,		/* cno_handle */
+	OUT	DAT_EVD_HANDLE *);	/* evd_handle */
+
+#endif	/* !defined(__KERNEL__) */
+
+/* CR Functions */
+
+extern DAT_RETURN DAT_API dapl_cr_query (
+	IN	DAT_CR_HANDLE,		/* cr_handle */
+	IN	DAT_CR_PARAM_MASK,	/* cr_args_mask */
+	OUT	DAT_CR_PARAM * );	/* cwr_args */
+
+extern DAT_RETURN DAT_API dapl_cr_accept (
+	IN	DAT_CR_HANDLE,		/* cr_handle */
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_COUNT,		/* private_data_size */
+	IN	const DAT_PVOID );	/* private_data */
+
+extern DAT_RETURN DAT_API dapl_cr_reject (
+	IN      DAT_CR_HANDLE, 		/* cr_handle            */
+	IN	DAT_COUNT,		/* private_data_size	*/
+	IN	const DAT_PVOID );      /* private_data         */
+
+extern DAT_RETURN DAT_API dapl_cr_handoff (
+	IN DAT_CR_HANDLE,		/* cr_handle */
+	IN DAT_CONN_QUAL);		/* handoff */
+
+/* EVD Functions */
+
+#if defined(__KERNEL__)
+extern DAT_RETURN DAT_API dapl_ia_memtype_hint (
+	IN    DAT_IA_HANDLE,		/* ia_handle */
+	IN    DAT_MEM_TYPE,		/* mem_type */
+	IN    DAT_VLEN,			/* length */
+	IN    DAT_MEM_OPT,		/* mem_optimization */
+	OUT   DAT_VLEN *,		/* suggested_length */
+	OUT   DAT_VADDR	*);		/* suggested_alignment */
+
+extern DAT_RETURN DAT_API dapl_evd_kcreate (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_COUNT,		/* evd_min_qlen */
+	IN	DAT_UPCALL_POLICY,	/* upcall_policy */
+	IN	const DAT_UPCALL_OBJECT *, /* upcall */
+	IN	DAT_EVD_FLAGS,		/* evd_flags */
+	OUT	DAT_EVD_HANDLE * );	/* evd_handle */
+
+extern DAT_RETURN DAT_API dapl_evd_kquery (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_EVD_PARAM_MASK,	/* evd_args_mask */
+	OUT	DAT_EVD_PARAM * );	/* evd_args */
+
+#else
+extern DAT_RETURN DAT_API dapl_evd_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_COUNT,		/* evd_min_qlen */
+	IN	DAT_CNO_HANDLE,		/* cno_handle */
+	IN	DAT_EVD_FLAGS,		/* evd_flags */
+	OUT	DAT_EVD_HANDLE * );	/* evd_handle */
+
+extern DAT_RETURN DAT_API dapl_evd_query (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_EVD_PARAM_MASK,	/* evd_args_mask */
+	OUT	DAT_EVD_PARAM * );	/* evd_args */
+#endif	/* defined(__KERNEL__) */
+
+#if defined(__KERNEL__)
+extern DAT_RETURN DAT_API dapl_evd_modify_upcall (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_UPCALL_POLICY,	/* upcall_policy */
+	IN	const DAT_UPCALL_OBJECT * ); /* upcall */
+
+#else
+
+extern DAT_RETURN DAT_API dapl_evd_modify_cno (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_CNO_HANDLE);	/* cno_handle */
+#endif
+
+extern DAT_RETURN DAT_API dapl_evd_enable (
+	IN	DAT_EVD_HANDLE);	/* evd_handle */
+
+extern DAT_RETURN DAT_API dapl_evd_disable (
+	IN	DAT_EVD_HANDLE);	/* evd_handle */
+
+#if !defined(__KERNEL__)
+extern DAT_RETURN DAT_API dapl_evd_wait (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_TIMEOUT,		/* timeout */
+	IN	DAT_COUNT,		/* threshold */
+	OUT	DAT_EVENT *,		/* event */
+	OUT	DAT_COUNT *);		/* nmore */
+#endif	/* !defined(__KERNEL__) */
+
+extern DAT_RETURN DAT_API dapl_evd_resize (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_COUNT );		/* evd_qlen */
+
+extern DAT_RETURN DAT_API dapl_evd_post_se (
+	DAT_EVD_HANDLE,			/* evd_handle */
+	const DAT_EVENT * );		/* event */
+
+extern DAT_RETURN DAT_API dapl_evd_dequeue (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	OUT	DAT_EVENT * );		/* event */
+
+extern DAT_RETURN DAT_API dapl_evd_free (
+	IN	DAT_EVD_HANDLE );
+
+extern DAT_RETURN DAT_API
+dapl_evd_set_unwaitable (
+	IN	DAT_EVD_HANDLE	evd_handle );
+
+extern DAT_RETURN DAT_API
+dapl_evd_clear_unwaitable (
+	IN	DAT_EVD_HANDLE	evd_handle );
+
+/* EP functions */
+
+extern DAT_RETURN DAT_API dapl_ep_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_PZ_HANDLE,		/* pz_handle */
+	IN	DAT_EVD_HANDLE,		/* in_dto_completion_evd_handle */
+	IN	DAT_EVD_HANDLE,		/* out_dto_completion_evd_handle */
+	IN	DAT_EVD_HANDLE,		/* connect_evd_handle */
+	IN	const DAT_EP_ATTR *,	/* ep_parameters */
+	OUT	DAT_EP_HANDLE * );	/* ep_handle */
+
+extern DAT_RETURN DAT_API dapl_ep_query (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_EP_PARAM_MASK,	/* ep_args_mask */
+	OUT	DAT_EP_PARAM * );	/* ep_args */
+
+extern DAT_RETURN DAT_API dapl_ep_modify (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_EP_PARAM_MASK,	/* ep_args_mask */
+	IN	const DAT_EP_PARAM * ); /* ep_args */
+
+extern DAT_RETURN DAT_API dapl_ep_connect (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_IA_ADDRESS_PTR,	/* remote_ia_address */
+	IN	DAT_CONN_QUAL,		/* remote_conn_qual */
+	IN	DAT_TIMEOUT,		/* timeout */
+	IN	DAT_COUNT,		/* private_data_size */
+	IN	const DAT_PVOID,	/* private_data  */
+	IN	DAT_QOS,		/* quality_of_service */
+	IN	DAT_CONNECT_FLAGS );	/* connect_flags */
+
+extern DAT_RETURN DAT_API dapl_ep_common_connect (
+	IN      DAT_EP_HANDLE ep,		/* ep_handle            */
+	IN      DAT_IA_ADDRESS_PTR remote_addr,	/* remote_ia_address    */
+	IN      DAT_TIMEOUT timeout,		/* timeout              */
+	IN      DAT_COUNT pdata_size,		/* private_data_size    */
+	IN      const DAT_PVOID pdata	);	/* private_data         */
+
+extern DAT_RETURN DAT_API dapl_ep_dup_connect (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_EP_HANDLE,		/* ep_dup_handle */
+	IN	DAT_TIMEOUT,		/* timeout*/
+	IN	DAT_COUNT,		/* private_data_size */
+	IN	const DAT_PVOID,	/* private_data */
+	IN	DAT_QOS);		/* quality_of_service */
+
+extern DAT_RETURN DAT_API dapl_ep_disconnect (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_CLOSE_FLAGS );	/* close_flags */
+
+extern DAT_RETURN DAT_API dapl_ep_post_send (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_COUNT,		/* num_segments */
+	IN	DAT_LMR_TRIPLET *,	/* local_iov */
+	IN	DAT_DTO_COOKIE,		/* user_cookie */
+	IN	DAT_COMPLETION_FLAGS ); /* completion_flags */
+
+extern DAT_RETURN DAT_API dapl_ep_post_recv (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_COUNT,		/* num_segments */
+	IN	DAT_LMR_TRIPLET *,	/* local_iov */
+	IN	DAT_DTO_COOKIE,		/* user_cookie */
+	IN	DAT_COMPLETION_FLAGS ); /* completion_flags */
+
+extern DAT_RETURN DAT_API dapl_ep_post_rdma_read (
+	IN	DAT_EP_HANDLE,		 /* ep_handle */
+	IN	DAT_COUNT,		 /* num_segments */
+	IN	DAT_LMR_TRIPLET *,	 /* local_iov */
+	IN	DAT_DTO_COOKIE,		 /* user_cookie */
+	IN	const DAT_RMR_TRIPLET *, /* remote_iov */
+	IN	DAT_COMPLETION_FLAGS );	 /* completion_flags */
+
+extern DAT_RETURN DAT_API dapl_ep_post_rdma_read_to_rmr (
+	IN      DAT_EP_HANDLE,	        /* ep_handle            */
+	IN      const DAT_RMR_TRIPLET *,/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      const DAT_RMR_TRIPLET *,/* remote_iov           */
+	IN      DAT_COMPLETION_FLAGS);	/* completion_flags     */
+
+extern DAT_RETURN DAT_API dapl_ep_post_rdma_write (
+	IN	DAT_EP_HANDLE,		 /* ep_handle */
+	IN	DAT_COUNT,		 /* num_segments */
+	IN	DAT_LMR_TRIPLET *,	 /* local_iov */
+	IN	DAT_DTO_COOKIE,		 /* user_cookie */
+	IN	const DAT_RMR_TRIPLET *, /* remote_iov */
+	IN	DAT_COMPLETION_FLAGS );	 /* completion_flags */
+
+extern DAT_RETURN DAT_API dapl_ep_post_send_with_invalidate (
+	IN      DAT_EP_HANDLE,          /* ep_handle            */
+	IN      DAT_COUNT,              /* num_segments         */
+	IN      DAT_LMR_TRIPLET *,      /* local_iov            */
+	IN      DAT_DTO_COOKIE,         /* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS,   /* completion_flags     */
+	IN      DAT_BOOLEAN,            /* invalidate_flag      */
+	IN      DAT_RMR_CONTEXT);      /* RMR context          */
+
+extern DAT_RETURN DAT_API dapl_ep_get_status (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	OUT	DAT_EP_STATE *,		/* ep_state */
+	OUT	DAT_BOOLEAN *,		/* in_dto_idle */
+	OUT	DAT_BOOLEAN * );	/* out_dto_idle */
+
+extern DAT_RETURN DAT_API dapl_ep_free (
+	IN	DAT_EP_HANDLE);		/* ep_handle */
+
+extern DAT_RETURN DAT_API dapl_ep_reset (
+	IN	DAT_EP_HANDLE);		/* ep_handle */
+
+extern DAT_RETURN DAT_API dapl_ep_create_with_srq (
+        IN      DAT_IA_HANDLE,          /* ia_handle            */
+        IN      DAT_PZ_HANDLE,          /* pz_handle            */
+        IN      DAT_EVD_HANDLE,         /* recv_evd_handle      */
+        IN      DAT_EVD_HANDLE,         /* request_evd_handle   */
+        IN      DAT_EVD_HANDLE,         /* connect_evd_handle   */
+        IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+        IN      const DAT_EP_ATTR *,    /* ep_attributes        */
+        OUT     DAT_EP_HANDLE *);       /* ep_handle            */
+
+extern DAT_RETURN DAT_API dapl_ep_recv_query (
+        IN      DAT_EP_HANDLE,          /* ep_handle            */
+        OUT     DAT_COUNT *,            /* nbufs_allocated      */
+        OUT     DAT_COUNT *);           /* bufs_alloc_span      */
+
+extern DAT_RETURN DAT_API dapl_ep_set_watermark (
+        IN      DAT_EP_HANDLE,          /* ep_handle            */
+        IN      DAT_COUNT,              /* soft_high_watermark  */
+        IN      DAT_COUNT);             /* hard_high_watermark  */
+
+/* LMR functions */
+
+#if defined(__KERNEL__)
+extern DAT_RETURN DAT_API dapl_lmr_kcreate (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_MEM_TYPE,		/* mem_type */
+	IN	DAT_REGION_DESCRIPTION, /* region_description */
+	IN	DAT_VLEN,		/* length */
+	IN	DAT_PZ_HANDLE,		/* pz_handle */
+	IN	DAT_MEM_PRIV_FLAGS,	/* privileges */
+	IN	DAT_VA_TYPE,		/* va_type */
+	IN	DAT_MEM_OPT,		/* optimization */
+	OUT	DAT_LMR_HANDLE *,	/* lmr_handle */
+	OUT	DAT_LMR_CONTEXT *,	/* lmr_context */
+	OUT     DAT_RMR_CONTEXT *,	/* rmr_context          */
+	OUT	DAT_VLEN *,		/* registered_length */
+	OUT	DAT_VADDR * );		/* registered_address */
+#else
+extern DAT_RETURN DAT_API dapl_lmr_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_MEM_TYPE,		/* mem_type */
+	IN	DAT_REGION_DESCRIPTION, /* region_description */
+	IN	DAT_VLEN,		/* length */
+	IN	DAT_PZ_HANDLE,		/* pz_handle */
+	IN	DAT_MEM_PRIV_FLAGS,	/* privileges */
+	IN	DAT_VA_TYPE,		/* va_type */
+	OUT	DAT_LMR_HANDLE *,	/* lmr_handle */
+	OUT	DAT_LMR_CONTEXT *,	/* lmr_context */
+	OUT     DAT_RMR_CONTEXT *,	/* rmr_context          */
+	OUT	DAT_VLEN *,		/* registered_length */
+	OUT	DAT_VADDR * );		/* registered_address */
+#endif	/* defined(__KERNEL__) */
+
+extern DAT_RETURN DAT_API dapl_lmr_query (
+	IN	DAT_LMR_HANDLE,
+	IN	DAT_LMR_PARAM_MASK,
+	OUT	DAT_LMR_PARAM *);
+
+extern DAT_RETURN DAT_API dapl_lmr_free (
+	IN	DAT_LMR_HANDLE);
+
+extern DAT_RETURN DAT_API dapl_lmr_sync_rdma_read (
+	IN      DAT_IA_HANDLE,          /* ia_handle            */
+	IN      const DAT_LMR_TRIPLET *, /* local_segments      */
+	IN      DAT_VLEN);              /* num_segments         */
+
+extern DAT_RETURN DAT_API dapl_lmr_sync_rdma_write (
+	IN      DAT_IA_HANDLE,          /* ia_handle            */
+	IN      const DAT_LMR_TRIPLET *, /* local_segments      */
+	IN      DAT_VLEN);              /* num_segments         */
+
+/* RMR Functions */
+
+extern DAT_RETURN DAT_API dapl_rmr_create (
+	IN	DAT_PZ_HANDLE,		/* pz_handle */
+	OUT	DAT_RMR_HANDLE *);	/* rmr_handle */
+
+extern DAT_RETURN DAT_API dapl_rmr_create_for_ep (
+	IN      DAT_PZ_HANDLE pz_handle,	/* pz_handle    */
+	OUT     DAT_RMR_HANDLE *rmr_handle);	/* rmr_handle   */
+
+extern DAT_RETURN DAT_API dapl_rmr_query (
+	IN	DAT_RMR_HANDLE,		/* rmr_handle */
+	IN	DAT_RMR_PARAM_MASK,	/* rmr_args_mask */
+	OUT	DAT_RMR_PARAM *);	/* rmr_args */
+
+extern DAT_RETURN DAT_API dapl_rmr_bind (
+	IN	DAT_RMR_HANDLE,		 /* rmr_handle */
+	IN	DAT_LMR_HANDLE,		 /* lmr_handle */
+	IN	const DAT_LMR_TRIPLET *, /* lmr_triplet */
+	IN	DAT_MEM_PRIV_FLAGS,	 /* mem_priv */
+	IN	DAT_VA_TYPE,		 /* va_type */
+	IN	DAT_EP_HANDLE,		 /* ep_handle */
+	IN	DAT_RMR_COOKIE,		 /* user_cookie */
+	IN	DAT_COMPLETION_FLAGS,	 /* completion_flags */
+	INOUT	DAT_RMR_CONTEXT * );	 /* context */
+
+extern DAT_RETURN DAT_API dapl_rmr_free (
+	IN	DAT_RMR_HANDLE);
+
+/* PSP Functions */
+
+extern DAT_RETURN DAT_API dapl_psp_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_CONN_QUAL,		/* conn_qual */
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_PSP_FLAGS,		/* psp_flags */
+	OUT	DAT_PSP_HANDLE * );	/* psp_handle */
+
+extern DAT_RETURN DAT_API dapl_psp_create_any (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	OUT	DAT_CONN_QUAL *,	/* conn_qual */
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_PSP_FLAGS,		/* psp_flags */
+	OUT	DAT_PSP_HANDLE *);	/* psp_handle */
+
+extern DAT_RETURN DAT_API dapl_psp_query (
+	IN	DAT_PSP_HANDLE,
+	IN	DAT_PSP_PARAM_MASK,
+	OUT	DAT_PSP_PARAM * );
+
+extern DAT_RETURN DAT_API dapl_psp_free (
+	IN	DAT_PSP_HANDLE );	/* psp_handle */
+
+/* RSP Functions */
+
+extern DAT_RETURN DAT_API dapl_rsp_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_CONN_QUAL,		/* conn_qual */
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	OUT	DAT_RSP_HANDLE * );	/* rsp_handle */
+
+extern DAT_RETURN DAT_API dapl_rsp_query (
+	IN	DAT_RSP_HANDLE,
+	IN	DAT_RSP_PARAM_MASK,
+	OUT	DAT_RSP_PARAM * );
+
+extern DAT_RETURN DAT_API dapl_rsp_free (
+	IN	DAT_RSP_HANDLE );	/* rsp_handle */
+
+/* PZ Functions */
+
+extern DAT_RETURN DAT_API dapl_pz_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	OUT	DAT_PZ_HANDLE * );	/* pz_handle */
+
+extern DAT_RETURN DAT_API dapl_pz_query (
+	IN	DAT_PZ_HANDLE,		/* pz_handle */
+	IN	DAT_PZ_PARAM_MASK,	/* pz_args_mask */
+	OUT	DAT_PZ_PARAM * );	/* pz_args */
+
+extern DAT_RETURN DAT_API dapl_pz_free (
+	IN	DAT_PZ_HANDLE );	/* pz_handle */
+
+/* SRQ functions */
+
+extern DAT_RETURN DAT_API dapl_srq_create (
+        IN      DAT_IA_HANDLE,          /* ia_handle            */
+        IN      DAT_PZ_HANDLE,          /* pz_handle            */
+        IN      DAT_SRQ_ATTR *,         /* srq_attr             */
+        OUT     DAT_SRQ_HANDLE *);      /* srq_handle           */
+
+extern DAT_RETURN DAT_API dapl_srq_free (
+	IN      DAT_SRQ_HANDLE);        /* srq_handle           */
+
+extern DAT_RETURN DAT_API dapl_srq_post_recv (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT,              /* num_segments         */
+	IN      DAT_LMR_TRIPLET *,      /* local_iov            */
+	IN      DAT_DTO_COOKIE);        /* user_cookie          */
+
+extern DAT_RETURN DAT_API dapl_srq_query (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_SRQ_PARAM_MASK,     /* srq_param_mask       */
+	OUT     DAT_SRQ_PARAM *);       /* srq_param            */
+
+extern DAT_RETURN DAT_API dapl_srq_resize (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* srq_max_recv_dto     */
+
+extern DAT_RETURN DAT_API dapl_srq_set_lw (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* low_watermark        */
+
+/* CSP functions */
+extern DAT_RETURN DAT_API dapl_csp_create (
+	IN      DAT_IA_HANDLE,          /* ia_handle      */
+	IN      DAT_COMM *,             /* communicator   */
+	IN      DAT_IA_ADDRESS_PTR,     /* address        */
+	IN      DAT_EVD_HANDLE,         /* evd_handle     */
+	OUT     DAT_CSP_HANDLE *);      /* csp_handle     */
+
+extern DAT_RETURN DAT_API dapl_csp_query (
+	IN      DAT_CSP_HANDLE,         /* csp_handle     */
+	IN      DAT_CSP_PARAM_MASK,     /* csp_param_mask */
+	OUT     DAT_CSP_PARAM *);       /* csp_param      */
+
+extern DAT_RETURN DAT_API dapl_csp_free (
+	IN      DAT_CSP_HANDLE);        /* csp_handle     */
+
+/* HA functions */
+DAT_RETURN DAT_API dapl_ia_ha (
+	IN	 DAT_IA_HANDLE,         /* ia_handle */
+	IN const DAT_NAME_PTR,          /* provider  */
+	OUT	 DAT_BOOLEAN *);        /* answer    */
+
+#ifdef DAT_EXTENSIONS
+#include <stdarg.h>
+extern DAT_RETURN DAT_API dapl_extensions (
+	IN	DAT_HANDLE,		/* handle */
+	IN	DAT_EXTENDED_OP,	/* extended op */
+	IN	va_list);		/* argument list */
+#endif
+
+/*
+ * DAPL internal utility function prototpyes
+ */
+
+extern void dapl_llist_init_head (
+    DAPL_LLIST_HEAD * 	head);
+
+extern void dapl_llist_init_entry (
+    DAPL_LLIST_ENTRY * 	entry);
+
+extern DAT_BOOLEAN dapl_llist_is_empty (
+    DAPL_LLIST_HEAD * 	head);
+
+extern void dapl_llist_add_head (
+    DAPL_LLIST_HEAD * 	head,
+    DAPL_LLIST_ENTRY * 	entry,
+    void * 		data);
+
+extern void dapl_llist_add_tail (
+    DAPL_LLIST_HEAD *   head,
+    DAPL_LLIST_ENTRY *  entry,
+    void * 		data);
+
+extern void dapl_llist_add_entry (
+    DAPL_LLIST_HEAD * head,
+    DAPL_LLIST_ENTRY * entry,
+    DAPL_LLIST_ENTRY * new_entry,
+    void * data);
+
+extern void * dapl_llist_remove_head (
+    DAPL_LLIST_HEAD *	head);
+
+extern void * dapl_llist_remove_tail (
+    DAPL_LLIST_HEAD *	head);
+
+extern void * dapl_llist_remove_entry (
+    DAPL_LLIST_HEAD *	head,
+    DAPL_LLIST_ENTRY *	entry);
+
+extern void * dapl_llist_peek_head (
+    DAPL_LLIST_HEAD *	head);
+
+extern void * dapl_llist_next_entry (
+    IN    DAPL_LLIST_HEAD 	*head,
+    IN    DAPL_LLIST_ENTRY 	*cur_ent);
+
+extern void dapl_llist_debug_print_list (
+    DAPL_LLIST_HEAD *	head);
+
+
+#endif
diff --git a/dapl/include/dapl_debug.h b/dapl/include/dapl_debug.h
new file mode 100644
index 0000000..bb823d9
--- /dev/null
+++ b/dapl/include/dapl_debug.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_debug.h
+ *
+ * PURPOSE: defines common deuggging flags & data for the DAPL reference
+ * implemenation
+ *
+ * Description:
+ *
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _DAPL_DEBUG_H_
+#define _DAPL_DEBUG_H_
+
+/*
+ * Debug level switches
+ *
+ * Use these bits to enable various tracing/debug options. Each bit
+ * represents debugging in a particular subsystem or area of the code.
+ *
+ * The ERR bit should always be on unless someone disables it for a
+ * reason: The ERR flag is used sparingly and will print useful
+ * information if it fires.
+ */
+typedef enum
+{
+    DAPL_DBG_TYPE_ERR		= 0x0001,
+    DAPL_DBG_TYPE_WARN	  	= 0x0002,
+    DAPL_DBG_TYPE_EVD	  	= 0x0004,
+    DAPL_DBG_TYPE_CM		= 0x0008,
+    DAPL_DBG_TYPE_EP		= 0x0010,
+    DAPL_DBG_TYPE_UTIL	  	= 0x0020,
+    DAPL_DBG_TYPE_CALLBACK	= 0x0040,
+    DAPL_DBG_TYPE_DTO_COMP_ERR	= 0x0080,
+    DAPL_DBG_TYPE_API	  	= 0x0100,
+    DAPL_DBG_TYPE_RTN	  	= 0x0200,
+    DAPL_DBG_TYPE_EXCEPTION	= 0x0400,
+    DAPL_DBG_TYPE_SRQ		= 0x0800,
+    DAPL_DBG_TYPE_CNTR  	= 0x1000
+
+} DAPL_DBG_TYPE;
+
+typedef enum
+{
+    DAPL_DBG_DEST_STDOUT  	= 0x0001,
+    DAPL_DBG_DEST_SYSLOG  	= 0x0002,
+} DAPL_DBG_DEST;
+
+extern DAPL_DBG_TYPE 	g_dapl_dbg_type;
+extern DAPL_DBG_DEST 	g_dapl_dbg_dest;
+
+extern void dapl_internal_dbg_log(DAPL_DBG_TYPE type,  const char *fmt,  ...);
+
+#define dapl_log g_dapl_dbg_type==0 ? (void) 1 : dapl_internal_dbg_log
+
+#if defined(DAPL_DBG)
+#define dapl_dbg_log g_dapl_dbg_type==0 ? (void) 1 : dapl_internal_dbg_log
+#else
+#define dapl_dbg_log(...)
+#endif
+
+#include <dat2/dat_ib_extensions.h>
+
+#ifdef DAPL_COUNTERS
+
+#define DAPL_CNTR(h_ptr, cntr) ((DAT_UINT64*)h_ptr->cntrs)[cntr]++
+#define DAPL_CNTR_DATA(h_ptr, cntr, data) ((DAT_UINT64*)h_ptr->cntrs)[cntr]+= data
+
+DAT_RETURN dapl_query_counter(DAT_HANDLE dh, 
+			      int counter, 
+			      void *p_cntrs_out,
+			      int reset);
+char *dapl_query_counter_name(DAT_HANDLE dh, int counter);
+void dapl_print_counter(DAT_HANDLE dh, int counter, int reset);
+
+#else
+
+#define DAPL_CNTR(handle, cntr)
+#define DAPL_CNTR_DATA(handle, cntr, data)
+
+#endif /* DAPL_COUNTERS */
+
+#endif /* _DAPL_DEBUG_H_ */
diff --git a/dapl/include/dapl_ipoib_names.h b/dapl/include/dapl_ipoib_names.h
new file mode 100644
index 0000000..23df8d5
--- /dev/null
+++ b/dapl/include/dapl_ipoib_names.h
@@ -0,0 +1,262 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: ipoib_naming.h
+ *
+ * PURPOSE: Defines flags and prototypes for IPoIB API
+ *
+ * Description: 
+ *	This defines a simple naming interface for discovering
+ *      the IP addresses available to a provider, then a set
+ *      of query mechanisms useful to map an IP address to
+ *      a provider specific address; a GID in InfiniBand.
+ *
+ *      NOTE: As implementations mature this may not be necessary.
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _IPOIB_NAMING_H_
+#define _IPOIB_NAMING_H_
+
+typedef enum _ipoib_port_num {
+	HCA_PORT_1= 1,
+	HCA_PORT_2,
+	HCA_PORT_ANY
+} IPOIB_PORT_NUM;
+
+typedef struct if_query_info
+{
+	uint64_t	      guid;
+	uint32_t	      port_num;
+	uint32_t	      state;
+}IF_QUERY_INFO;
+
+/***********************************************************************
+ * ipoib_enum_if()
+ *
+ *    PURPOSE
+ *    Returns count of IP interfaces. 
+ *
+ *    ARGUMENTS
+ *    hca_index: index of HCA in the provider library. In general
+ *    terms, the index represents the HCA number, e.g. 
+ *    1 == First HCA, 2 == Second HCA, etc.
+ *
+ *    port: an enum of
+ *        HCA_PORT_0
+ *        HCA_PORT_1
+ *        HCA_PORT_ANY
+ *    HCA_PORT_ANY enum value returns all IP instances assigned to the HCA.
+ *
+ *    RETURNS
+ *    count of IP interfaces supported on physical port
+ *
+ ***********************************************************************/
+int
+ipoib_enum_if(
+	IN  uint32_t		hca_index, 
+	IN  IPOIB_PORT_NUM	port);
+
+ 
+/***********************************************************************
+ * ipoib_get_if()
+ *
+ *    PURPOSE
+ *    Returns array of IP Addresses of all instances. Port parameter may
+ *    restrict instances of interest.
+ * 
+ *    ARGUMENTS
+ *    hca_index: index of HCA in the provider library.
+ *
+ *    port: IPOIB_PORT_NUM as described above
+ *
+ *    ip_addr_list: pointer to user-allocated space in which an array of
+ *    IP addresses found for this hca and port will be returned
+ *
+ *    ip_addr_count: number of returned addresses
+ *
+ *    RETURNS
+ *    0 for SUCCESS
+ *    !0 for failure
+ *
+ ***********************************************************************/
+int
+ipoib_get_if(
+	IN  uint32_t			hca_index,
+	IN  IPOIB_PORT_NUM		port,
+	OUT struct sockaddr		**ip_addr_list,
+	OUT int				*ip_addr_count);
+
+/***********************************************************************
+ *
+ *    PURPOSE 
+ *    Returns a handle to this interface, to be used for subsequent
+ *    operations
+ * 
+ *    ARGUMENTS
+ *    ip_address: input IP address
+ *
+ *    ipoib_handle: handle to be used in subsequent operations.
+ *
+ *    RETURNS
+ *    0 for SUCCESS
+ *    !0 for failure
+ *
+ ***********************************************************************/
+int
+ipoib_open_if(
+	IN  struct sockaddr		*ip_address,
+	OUT void			*ipoib_handle);
+
+/***********************************************************************
+ * ipoib_query_if()
+ *
+ *    PURPOSE
+ *    if_query_if returns information on local ipoib_handle such as GID,
+ *    Port number, IPoIB state, anything interesting
+ *
+ *    ARGUMENTS
+ *    ipoib_handle: handle for instance
+ *
+ *    if_qry_info: info struct. Looks like:
+ *
+ *    RETURNS
+ *    0 for SUCCESS
+ *    !0 for failure
+ *
+ ***********************************************************************/
+int
+ipoib_query_if(
+	IN  void			*ipoib_handle, 
+	OUT IF_QUERY_INFO		*if_qry_info);
+
+/***********************************************************************
+ *
+ *
+ *    PURPOSE
+ *    Obtain a GID from an IP Address. Used by the active side of
+ *    a connection.
+ *
+ *    The behavior of this routine is specified to provide control
+ *    over the underlying implementation.
+ *    Returns immediately if the remote information is available. If
+ *    callback_routine_ptr is NULL then it will block until information is
+ *    available or known to be unavailable. If callback_routine_ptr is
+ *    specified then it will be invoked when remote information is
+ *    available or known to be unavailable. Remote_Addr_info contains
+ *    remote GID information.
+ *
+ *    ARGUMENTS
+ *    ipoib_handle: handle for instance
+ *
+ *    remote_ip_address: IP address of remote instance
+ *
+ *    callback_routine_ptr: routine to invoke for asynch callback. If
+ *    NULL ipoib_getaddrinfo() will block.
+ *
+ *    context: argument to pass to asynch callback_routine.
+ *
+ *    Remote_Addr_info: Remote GID
+ *
+ *    RETURNS
+ *    0 for SUCCESS
+ *    !0 for failure
+ *
+ ***********************************************************************/
+int
+ipoib_getaddrinfo(
+	IN  void				*ipoib_handle,
+	IN  struct sockaddr			*remote_ip_address,
+	IN  void				*callback_routine_ptr,
+	IN  void				*context,
+	OUT void				*Remote_Addr_info );
+
+/***********************************************************************
+ *
+ *
+ *    PURPOSE
+ *    Obtain an IP Address from a GID. Used by the passive side of a
+ *    connection.
+ *
+ *    The behavior of this routine is specified to provide control over
+ *    the underlying implementation.  Returns immediately if the remote
+ *    information is available. If callback_routine_ptr is NULL then it
+ *    will block until information is available or known to be
+ *    unavailable. If callback_routine_ptr is specified then it will be
+ *    invoked when remote information is available or known to be
+ *    unavailable.
+ *
+ *    ARGUMENTS
+ *    ipoib_handle:	handle for instance
+ *
+ *    remote_gidAddr: 	Remote GID. It is not defined on how the application
+ *		 	will obtain this GID from the connection manager.
+ *
+ *    callback_routine_ptr: 
+ *			routine to invoke for async callback. If NULL
+ *			ipoib_getgidinfo() will block.
+ *
+ *    context: 		argument to pass to asynch callback_routine.
+ *
+ *    remote_ip_address:
+ *			 IP address of remote instance
+ *
+ *    RETURNS
+ *    0 for SUCCESS
+ *    !0 for failure
+ *
+ ***********************************************************************/
+int
+ipoib_getgidinfo(
+	IN  void				*ipoib_handle,
+	IN  GID					*remote_gid,
+	IN  void				*callback_routine_ptr,
+	IN  void				*context,
+	OUT struct sockaddr			*remote_ip_address);
+
+/***********************************************************************
+ *
+ *    PURPOSE
+ *    Release handle.
+ *
+ *    ARGUMENTS
+ *    ipoib_handle: handle for instance
+ *
+ *    RETURNS
+ *    0 for SUCCESS
+ *    !0 for failure
+ *
+ ***********************************************************************/
+int
+ipoib_close(
+	IN  void				*ipoib_handle);
+ 
+
+#endif /* _IPOIB_NAMING_H_ */
diff --git a/dapl/include/dapl_vendor.h b/dapl/include/dapl_vendor.h
new file mode 100644
index 0000000..f6d3cc0
--- /dev/null
+++ b/dapl/include/dapl_vendor.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_vendor.h
+ *
+ * PURPOSE: 
+ *	Vendor provides values for their implementation. Most of
+ *	these values are returned in the DAT_IA_ATTR parameter of
+ *	dat_ia_query()
+ *
+ * $Id:$
+ **********************************************************************/
+
+/**********************************************************************
+ * DAT_IA_ATTR attributes
+ *
+ * These values are used in the provider support routine
+ * dapls_ib_query_hca (). Many of the values there are HW
+ * specific, the the vendor should look to make sure they are
+ * appropriate for their implementation. Specifically, 
+ * vendors are encouraged to update transport and vendor
+ * attributes: the reference implementation sets these to NULL.
+ */
+
+/*
+ * Product name of the adapter.
+ * Returned in DAT_IA_ATTR.adapter_name
+ */
+#define VN_ADAPTER_NAME		"Generic OpenFabrics HCA"
+
+
+/*
+ * Vendor name
+ * Returned in DAT_IA_ATTR.vendor_name
+ */
+#define VN_VENDOR_NAME		"DAPL OpenFabrics Implementation"
+
+
+/**********************************************************************
+ * PROVIDER Attributes
+ *
+ * These values are used in ./common/dapl_ia_query.c, in dapl_ia_query ().
+ * The values below are the most common for vendors to change, but
+ * there are several other values that may be updated once the
+ * implementation becomes mature.
+ *
+ */
+
+/*
+ * Provider Versions
+ * Returned in DAT_PROVIDER_ATTR.provider_version_major and
+ * DAT_PROVIDER_ATTR.provider_version_minor
+ */
+
+#define VN_PROVIDER_MAJOR	2
+#define VN_PROVIDER_MINOR	0
+
+/*
+ * Provider support for memory types. The reference implementation
+ * always supports DAT_MEM_TYPE_VIRTUAL and DAT_MEM_TYPE_LMR, so
+ * the vendor must indicate if they support DAT_MEM_TYPE_SHARED_VIRTUAL.
+ * Set this value to '1' if DAT_MEM_TYPE_SHARED_VIRTUAL is supported.
+ *
+ * Returned in DAT_PROVIDER_ATTR.lmr_mem_types_supported
+ */
+
+#define VN_MEM_SHARED_VIRTUAL_SUPPORT 1
+
+
+/**********************************************************************
+ *
+ * This value will be assigned to dev_name_prefix in ./udapl/dapl_init.c.
+ *
+ * DAT is designed to support multiple DAPL instances simultaneously,
+ * with different dapl libraries originating from different providers.
+ * There is always the possibility of name conflicts, so a dat name
+ * prefix is provided to make a vendor's adapter name unique. This is
+ * especially true of the IBM Access API, which returns adapter
+ * names that are simply ordinal numbers (e.g. 0, 1, 2). If
+ * a vendor doesn't need or want a prefix, it should be left
+ * as a NULL (use "").
+ *
+ * Values that might be used:
+ *  #define VN_PREFIX		"ia"    (generic prefix)
+ *  #define VN_PREFIX		"jni"	(JNI: OS Acces API)
+ *  #define VN_PREFIX		"ibm"	(IBM: OS Acces API)
+ *  #define VN_PREFIX		""      (Mellanox: VAPI)
+ *  #define VN_PREFIX		""      (Intel: IB Common API)
+ */
+#define VN_PREFIX		"ia"
diff --git a/dapl/openib_cma/dapl_ib_cm.c b/dapl/openib_cma/dapl_ib_cm.c
new file mode 100755
index 0000000..946cfbd
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_cm.c
@@ -0,0 +1,1297 @@
+/*
+ * Copyright (c) 2005 Voltaire Inc.  All rights reserved.
+ * Copyright (c) 2005-2007 Intel Corporation. All rights reserved.
+ * Copyright (c) 2004-2005, Mellanox Technologies, Inc. All rights reserved. 
+ * Copyright (c) 2003 Topspin Corporation.  All rights reserved. 
+ * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ib_cm.c
+ *
+ * PURPOSE: The OFED provider - uCMA, name and route resolution
+ *
+ * $Id: $
+ *
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_cr_util.h"
+#include "dapl_name_service.h"
+#include "dapl_ib_util.h"
+#include "dapl_vendor.h"
+#include "dapl_osd.h"
+
+extern struct rdma_event_channel *g_cm_events;
+
+/* local prototypes */
+static struct dapl_cm_id *dapli_req_recv(struct dapl_cm_id *conn,
+					 struct rdma_cm_event *event);
+static void dapli_cm_active_cb(struct dapl_cm_id *conn,
+			       struct rdma_cm_event *event);
+static void dapli_cm_passive_cb(struct dapl_cm_id *conn,
+				struct rdma_cm_event *event);
+static void dapli_addr_resolve(struct dapl_cm_id *conn);
+static void dapli_route_resolve(struct dapl_cm_id *conn);
+
+/* cma requires 16 bit SID, in network order */
+#define IB_PORT_MOD 32001
+#define IB_PORT_BASE (65535 - IB_PORT_MOD)
+#define SID_TO_PORT(SID) \
+    (SID > 0xffff ? \
+    htons((unsigned short)((SID % IB_PORT_MOD) + IB_PORT_BASE)) :\
+    htons((unsigned short)SID))
+
+#define PORT_TO_SID(p) ntohs(p)
+
+/* private data header to validate consumer rejects versus abnormal events */
+struct dapl_pdata_hdr {
+	DAT_UINT32 version;
+};
+
+static void dapli_addr_resolve(struct dapl_cm_id *conn)
+{
+	int ret;
+#ifdef DAPL_DBG
+	struct rdma_addr *ipaddr = &conn->cm_id->route.addr;
+#endif
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " addr_resolve: cm_id %p SRC %x DST %x\n",
+		     conn->cm_id, ntohl(((struct sockaddr_in *)
+					 &ipaddr->src_addr)->sin_addr.s_addr),
+		     ntohl(((struct sockaddr_in *)
+			    &ipaddr->dst_addr)->sin_addr.s_addr));
+
+	ret = rdma_resolve_route(conn->cm_id, conn->route_timeout);
+	if (ret) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " dapl_cma_connect: rdma_resolve_route ERR 0x%x %s\n",
+			 ret, strerror(errno));
+		dapl_evd_connection_callback(conn,
+					     IB_CME_LOCAL_FAILURE,
+					     NULL, conn->ep);
+	}
+}
+
+static void dapli_route_resolve(struct dapl_cm_id *conn)
+{
+	int ret;
+#ifdef DAPL_DBG
+	struct rdma_addr *ipaddr = &conn->cm_id->route.addr;
+	struct ib_addr *ibaddr = &conn->cm_id->route.addr.addr.ibaddr;
+#endif
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " route_resolve: cm_id %p SRC %x DST %x PORT %d\n",
+		     conn->cm_id, ntohl(((struct sockaddr_in *)
+					 &ipaddr->src_addr)->sin_addr.s_addr),
+		     ntohl(((struct sockaddr_in *)
+			    &ipaddr->dst_addr)->sin_addr.s_addr),
+		     ntohs(((struct sockaddr_in *)
+			    &ipaddr->dst_addr)->sin_port));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " route_resolve: SRC GID subnet %016llx id %016llx\n",
+		     (unsigned long long)
+		     ntohll(ibaddr->sgid.global.subnet_prefix),
+		     (unsigned long long)
+		     ntohll(ibaddr->sgid.global.interface_id));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " route_resolve: DST GID subnet %016llx id %016llx\n",
+		     (unsigned long long)
+		     ntohll(ibaddr->dgid.global.subnet_prefix),
+		     (unsigned long long)
+		     ntohll(ibaddr->dgid.global.interface_id));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " route_resolve: cm_id %p pdata %p plen %d rr %d ind %d\n",
+		     conn->cm_id,
+		     conn->params.private_data,
+		     conn->params.private_data_len,
+		     conn->params.responder_resources,
+		     conn->params.initiator_depth);
+
+	ret = rdma_connect(conn->cm_id, &conn->params);
+	if (ret) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " dapl_cma_connect: rdma_connect ERR %d %s\n",
+			 ret, strerror(errno));
+		goto bail;
+	}
+	return;
+
+      bail:
+	dapl_evd_connection_callback(conn,
+				     IB_CME_LOCAL_FAILURE, NULL, conn->ep);
+}
+
+/* 
+ * Called from consumer thread via dat_ep_free().
+ * CANNOT be called from the async event processing thread
+ * dapli_cma_event_cb() since a cm_id reference is held and
+ * a deadlock will occur.
+ */
+void dapli_destroy_conn(struct dapl_cm_id *conn)
+{
+	struct rdma_cm_id *cm_id;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " destroy_conn: conn %p id %d\n", conn, conn->cm_id);
+
+	dapl_os_lock(&conn->lock);
+	conn->destroy = 1;
+
+	if (conn->ep) {
+		conn->ep->cm_handle = IB_INVALID_HANDLE;
+		conn->ep->qp_handle = IB_INVALID_HANDLE;
+	}
+
+	cm_id = conn->cm_id;
+	conn->cm_id = NULL;
+	dapl_os_unlock(&conn->lock);
+
+	/* 
+	 * rdma_destroy_id will force synchronization with async CM event 
+	 * thread since it blocks until the in-process event reference
+	 * is cleared during our event processing call exit.
+	 */
+	if (cm_id) {
+		if (cm_id->qp)
+			rdma_destroy_qp(cm_id);
+
+		rdma_destroy_id(cm_id);
+	}
+	dapl_os_free(conn, sizeof(*conn));
+}
+
+static struct dapl_cm_id *dapli_req_recv(struct dapl_cm_id *conn,
+					 struct rdma_cm_event *event)
+{
+	struct dapl_cm_id *new_conn;
+#ifdef DAPL_DBG
+	struct rdma_addr *ipaddr = &event->id->route.addr;
+#endif
+
+	if (conn->sp == NULL) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " dapli_rep_recv: on invalid listen " "handle\n");
+		return NULL;
+	}
+
+	/* allocate new cm_id and merge listen parameters */
+	new_conn = dapl_os_alloc(sizeof(*new_conn));
+	if (new_conn) {
+		(void)dapl_os_memzero(new_conn, sizeof(*new_conn));
+		dapl_os_lock_init(&new_conn->lock);
+		new_conn->cm_id = event->id;	/* provided by uCMA */
+		event->id->context = new_conn;	/* update CM_ID context */
+		new_conn->sp = conn->sp;
+		new_conn->hca = conn->hca;
+
+		/* Get requesters connect data, setup for accept */
+		new_conn->params.responder_resources =
+		    DAPL_MIN(event->param.conn.responder_resources,
+			     conn->hca->ib_trans.max_rdma_rd_in);
+		new_conn->params.initiator_depth =
+		    DAPL_MIN(event->param.conn.initiator_depth,
+			     conn->hca->ib_trans.max_rdma_rd_out);
+
+		new_conn->params.flow_control = event->param.conn.flow_control;
+		new_conn->params.rnr_retry_count =
+		    event->param.conn.rnr_retry_count;
+		new_conn->params.retry_count = event->param.conn.retry_count;
+
+		/* save private data */
+		if (event->param.conn.private_data_len) {
+			dapl_os_memcpy(new_conn->p_data,
+				       event->param.conn.private_data,
+				       event->param.conn.private_data_len);
+			new_conn->params.private_data = new_conn->p_data;
+			new_conn->params.private_data_len =
+			    event->param.conn.private_data_len;
+		}
+
+		dapl_dbg_log(DAPL_DBG_TYPE_CM, " passive_cb: "
+			     "REQ: SP %p PORT %d LID %d "
+			     "NEW CONN %p ID %p pD %p,%d\n",
+			     new_conn->sp, ntohs(((struct sockaddr_in *)
+						  &ipaddr->src_addr)->sin_port),
+			     event->listen_id, new_conn, event->id,
+			     event->param.conn.private_data,
+			     event->param.conn.private_data_len);
+
+		dapl_dbg_log(DAPL_DBG_TYPE_CM, " passive_cb: "
+			     "REQ: IP SRC %x PORT %d DST %x PORT %d "
+			     "rr %d init %d\n", ntohl(((struct sockaddr_in *)
+						       &ipaddr->src_addr)->
+						      sin_addr.s_addr),
+			     ntohs(((struct sockaddr_in *)
+				    &ipaddr->src_addr)->sin_port),
+			     ntohl(((struct sockaddr_in *)
+				    &ipaddr->dst_addr)->sin_addr.s_addr),
+			     ntohs(((struct sockaddr_in *)
+				    &ipaddr->dst_addr)->sin_port),
+			     new_conn->params.responder_resources,
+			     new_conn->params.initiator_depth);
+	}
+	return new_conn;
+}
+
+static void dapli_cm_active_cb(struct dapl_cm_id *conn,
+			       struct rdma_cm_event *event)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " active_cb: conn %p id %d event %d\n",
+		     conn, conn->cm_id, event->event);
+
+	dapl_os_lock(&conn->lock);
+	if (conn->destroy) {
+		dapl_os_unlock(&conn->lock);
+		return;
+	}
+	dapl_os_unlock(&conn->lock);
+
+	/* There is a chance that we can get events after
+	 * the consumer calls disconnect in a pending state
+	 * since the IB CM and uDAPL states are not shared.
+	 * In some cases, IB CM could generate either a DCONN
+	 * or CONN_ERR after the consumer returned from
+	 * dapl_ep_disconnect with a DISCONNECTED event
+	 * already queued. Check state here and bail to
+	 * avoid any events after a disconnect.
+	 */
+	if (DAPL_BAD_HANDLE(conn->ep, DAPL_MAGIC_EP))
+		return;
+
+	dapl_os_lock(&conn->ep->header.lock);
+	if (conn->ep->param.ep_state == DAT_EP_STATE_DISCONNECTED) {
+		dapl_os_unlock(&conn->ep->header.lock);
+		return;
+	}
+	if (event->event == RDMA_CM_EVENT_DISCONNECTED)
+		conn->ep->param.ep_state = DAT_EP_STATE_DISCONNECTED;
+
+	dapl_os_unlock(&conn->ep->header.lock);
+
+	switch (event->event) {
+	case RDMA_CM_EVENT_UNREACHABLE:
+	case RDMA_CM_EVENT_CONNECT_ERROR:
+		{
+			dapl_log(DAPL_DBG_TYPE_WARN,
+				 "dapl_cma_active: CONN_ERR event=0x%x"
+				 " status=%d %s DST %s, %d\n",
+				 event->event, event->status,
+				 (event->status == -ETIMEDOUT) ? "TIMEOUT" : "",
+				 inet_ntoa(((struct sockaddr_in *)
+					    &conn->cm_id->route.addr.dst_addr)->
+					   sin_addr),
+				 ntohs(((struct sockaddr_in *)
+					&conn->cm_id->route.addr.dst_addr)->
+				       sin_port));
+
+			/* per DAT SPEC provider always returns UNREACHABLE */
+			dapl_evd_connection_callback(conn,
+						     IB_CME_DESTINATION_UNREACHABLE,
+						     NULL, conn->ep);
+			break;
+		}
+	case RDMA_CM_EVENT_REJECTED:
+		{
+			ib_cm_events_t cm_event;
+			unsigned char *pdata = NULL;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_CM,
+				     " dapli_cm_active_handler: REJECTED reason=%d\n",
+				     event->status);
+
+			/* valid REJ from consumer will always contain private data */
+			if (event->status == 28 &&
+			    event->param.conn.private_data_len) {
+				cm_event =
+				    IB_CME_DESTINATION_REJECT_PRIVATE_DATA;
+				pdata =
+				    (unsigned char *)event->param.conn.
+				    private_data +
+				    sizeof(struct dapl_pdata_hdr);
+			} else {
+				cm_event = IB_CME_DESTINATION_REJECT;
+				dapl_log(DAPL_DBG_TYPE_WARN,
+					 "dapl_cma_active: non-consumer REJ,"
+					 " reason=%d, DST %s, %d\n",
+					 event->status,
+					 inet_ntoa(((struct sockaddr_in *)
+						    &conn->cm_id->route.addr.
+						    dst_addr)->sin_addr),
+					 ntohs(((struct sockaddr_in *)
+						&conn->cm_id->route.addr.
+						dst_addr)->sin_port));
+			}
+			dapl_evd_connection_callback(conn, cm_event, pdata,
+						     conn->ep);
+			break;
+		}
+	case RDMA_CM_EVENT_ESTABLISHED:
+		dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			     " active_cb: cm_id %d PORT %d CONNECTED to %s!\n",
+			     conn->cm_id, ntohs(((struct sockaddr_in *)
+						 &conn->cm_id->route.addr.
+						 dst_addr)->sin_port),
+			     inet_ntoa(((struct sockaddr_in *)
+					&conn->cm_id->route.addr.dst_addr)->
+				       sin_addr));
+
+		/* setup local and remote ports for ep query */
+		conn->ep->param.remote_port_qual =
+		    PORT_TO_SID(rdma_get_dst_port(conn->cm_id));
+		conn->ep->param.local_port_qual =
+		    PORT_TO_SID(rdma_get_src_port(conn->cm_id));
+
+		dapl_evd_connection_callback(conn, IB_CME_CONNECTED,
+					     event->param.conn.private_data,
+					     conn->ep);
+		break;
+
+	case RDMA_CM_EVENT_DISCONNECTED:
+		rdma_disconnect(conn->cm_id);	/* required for DREP */
+		/* validate EP handle */
+		if (!DAPL_BAD_HANDLE(conn->ep, DAPL_MAGIC_EP))
+			dapl_evd_connection_callback(conn,
+						     IB_CME_DISCONNECTED,
+						     NULL, conn->ep);
+		break;
+	default:
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " dapli_cm_active_cb_handler: Unexpected CM "
+			     "event %d on ID 0x%p\n", event->event,
+			     conn->cm_id);
+		break;
+	}
+
+	return;
+}
+
+static void dapli_cm_passive_cb(struct dapl_cm_id *conn,
+				struct rdma_cm_event *event)
+{
+	struct dapl_cm_id *new_conn;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " passive_cb: conn %p id %d event %d\n",
+		     conn, event->id, event->event);
+
+	dapl_os_lock(&conn->lock);
+	if (conn->destroy) {
+		dapl_os_unlock(&conn->lock);
+		return;
+	}
+	dapl_os_unlock(&conn->lock);
+
+	switch (event->event) {
+	case RDMA_CM_EVENT_CONNECT_REQUEST:
+		/* create new conn object with new conn_id from event */
+		new_conn = dapli_req_recv(conn, event);
+
+		if (new_conn)
+			dapls_cr_callback(new_conn,
+					  IB_CME_CONNECTION_REQUEST_PENDING,
+					  event->param.conn.private_data,
+					  new_conn->sp);
+		break;
+	case RDMA_CM_EVENT_UNREACHABLE:
+	case RDMA_CM_EVENT_CONNECT_ERROR:
+		dapl_log(DAPL_DBG_TYPE_WARN,
+			 "dapl_cm_passive: CONN_ERR event=0x%x status=%d %s,"
+			 " DST %s,%d\n",
+			 event->event, event->status,
+			 (event->status == -ETIMEDOUT) ? "TIMEOUT" : "",
+			 inet_ntoa(((struct sockaddr_in *)
+				    &conn->cm_id->route.addr.dst_addr)->
+				   sin_addr), ntohs(((struct sockaddr_in *)
+						     &conn->cm_id->route.addr.
+						     dst_addr)->sin_port));
+
+		dapls_cr_callback(conn, IB_CME_DESTINATION_UNREACHABLE,
+				  NULL, conn->sp);
+		break;
+
+	case RDMA_CM_EVENT_REJECTED:
+		{
+			/* will alwasys be abnormal NON-consumer from active side */
+			dapl_log(DAPL_DBG_TYPE_WARN,
+				 "dapl_cm_passive: non-consumer REJ, reason=%d,"
+				 " DST %s, %d\n",
+				 event->status,
+				 inet_ntoa(((struct sockaddr_in *)
+					    &conn->cm_id->route.addr.dst_addr)->
+					   sin_addr),
+				 ntohs(((struct sockaddr_in *)
+					&conn->cm_id->route.addr.dst_addr)->
+				       sin_port));
+
+			dapls_cr_callback(conn, IB_CME_DESTINATION_REJECT,
+					  NULL, conn->sp);
+			break;
+		}
+	case RDMA_CM_EVENT_ESTABLISHED:
+		dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			     " passive_cb: cm_id %p PORT %d CONNECTED from 0x%x!\n",
+			     conn->cm_id, ntohs(((struct sockaddr_in *)
+						 &conn->cm_id->route.addr.
+						 src_addr)->sin_port),
+			     ntohl(((struct sockaddr_in *)
+				    &conn->cm_id->route.addr.dst_addr)->
+				   sin_addr.s_addr));
+
+		dapls_cr_callback(conn, IB_CME_CONNECTED, NULL, conn->sp);
+
+		break;
+	case RDMA_CM_EVENT_DISCONNECTED:
+		rdma_disconnect(conn->cm_id);	/* required for DREP */
+		/* validate SP handle context */
+		if (!DAPL_BAD_HANDLE(conn->sp, DAPL_MAGIC_PSP) ||
+		    !DAPL_BAD_HANDLE(conn->sp, DAPL_MAGIC_RSP))
+			dapls_cr_callback(conn,
+					  IB_CME_DISCONNECTED, NULL, conn->sp);
+		break;
+	default:
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR, " passive_cb: "
+			     "Unexpected CM event %d on ID 0x%p\n",
+			     event->event, conn->cm_id);
+		break;
+	}
+
+	return;
+}
+
+/************************ DAPL provider entry points **********************/
+
+/*
+ * dapls_ib_connect
+ *
+ * Initiate a connection with the passive listener on another node
+ *
+ * Input:
+ *	ep_handle,
+ *	remote_ia_address,
+ *	remote_conn_qual,
+ *	prd_size		size of private data and structure
+ *	prd_prt			pointer to private data structure
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN dapls_ib_connect(IN DAT_EP_HANDLE ep_handle,
+			    IN DAT_IA_ADDRESS_PTR r_addr,
+			    IN DAT_CONN_QUAL r_qual,
+			    IN DAT_COUNT p_size, IN void *p_data)
+{
+	struct dapl_ep *ep_ptr = ep_handle;
+	struct dapl_cm_id *conn;
+	int ret;
+
+	/* Sanity check */
+	if (NULL == ep_ptr)
+		return DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " connect: rSID 0x%llx rPort %d, pdata %p, ln %d\n",
+		     r_qual, ntohs(SID_TO_PORT(r_qual)), p_data, p_size);
+
+	/* rdma conn and cm_id pre-bound; reference via qp_handle */
+	conn = ep_ptr->cm_handle = ep_ptr->qp_handle;
+
+	/* Setup QP/CM parameters and private data in cm_id */
+	(void)dapl_os_memzero(&conn->params, sizeof(conn->params));
+	conn->params.responder_resources =
+	    ep_ptr->param.ep_attr.max_rdma_read_in;
+	conn->params.initiator_depth = ep_ptr->param.ep_attr.max_rdma_read_out;
+	conn->params.flow_control = 1;
+	conn->params.rnr_retry_count = IB_RNR_RETRY_COUNT;
+	conn->params.retry_count = IB_RC_RETRY_COUNT;
+	if (p_size) {
+		dapl_os_memcpy(conn->p_data, p_data, p_size);
+		conn->params.private_data = conn->p_data;
+		conn->params.private_data_len = p_size;
+	}
+
+	/* copy in remote address, need a copy for retry attempts */
+	dapl_os_memcpy(&conn->r_addr, r_addr, sizeof(*r_addr));
+
+	/* Resolve remote address, src already bound during QP create */
+	((struct sockaddr_in *)&conn->r_addr)->sin_port = SID_TO_PORT(r_qual);
+	((struct sockaddr_in *)&conn->r_addr)->sin_family = AF_INET;
+
+	ret = rdma_resolve_addr(conn->cm_id, NULL,
+				(struct sockaddr *)&conn->r_addr,
+				conn->arp_timeout);
+	if (ret) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " dapl_cma_connect: rdma_resolve_addr ERR 0x%x %s\n",
+			 ret, strerror(errno));
+		return dapl_convert_errno(errno, "ib_connect");
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " connect: resolve_addr: cm_id %p -> %s port %d\n",
+		     conn->cm_id,
+		     inet_ntoa(((struct sockaddr_in *)&conn->r_addr)->sin_addr),
+		     ((struct sockaddr_in *)&conn->r_addr)->sin_port);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_disconnect
+ *
+ * Disconnect an EP
+ *
+ * Input:
+ *	ep_handle,
+ *	disconnect_flags
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *
+ */
+DAT_RETURN
+dapls_ib_disconnect(IN DAPL_EP * ep_ptr, IN DAT_CLOSE_FLAGS close_flags)
+{
+	dp_ib_cm_handle_t conn = ep_ptr->cm_handle;
+	int ret;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " disconnect(ep %p, conn %p, id %d flags %x)\n",
+		     ep_ptr, conn, (conn ? conn->cm_id : 0), close_flags);
+
+	if ((conn == IB_INVALID_HANDLE) || (conn->cm_id == NULL))
+		return DAT_SUCCESS;
+
+	/* no graceful half-pipe disconnect option */
+	ret = rdma_disconnect(conn->cm_id);
+	if (ret)
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " disconnect: ID %p ret 0x%x\n",
+			     ep_ptr->cm_handle, ret);
+
+	/* 
+	 * DAT event notification occurs from the callback
+	 * Note: will fire even if DREQ goes unanswered on timeout 
+	 */
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_disconnect_clean
+ *
+ * Clean up outstanding connection data. This routine is invoked
+ * after the final disconnect callback has occurred. Only on the
+ * ACTIVE side of a connection.
+ *
+ * Input:
+ *	ep_ptr		DAPL_EP
+ *	active		Indicates active side of connection
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	void
+ *
+ */
+void
+dapls_ib_disconnect_clean(IN DAPL_EP * ep_ptr,
+			  IN DAT_BOOLEAN active,
+			  IN const ib_cm_events_t ib_cm_event)
+{
+	/* nothing to do */
+	return;
+}
+
+/*
+ * dapl_ib_setup_conn_listener
+ *
+ * Have the CM set up a connection listener.
+ *
+ * Input:
+ *	ibm_hca_handle		HCA handle
+ *	qp_handle			QP handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INTERNAL_ERROR
+ *	DAT_CONN_QUAL_UNAVAILBLE
+ *	DAT_CONN_QUAL_IN_USE
+ *
+ */
+DAT_RETURN
+dapls_ib_setup_conn_listener(IN DAPL_IA * ia_ptr,
+			     IN DAT_UINT64 ServiceID, IN DAPL_SP * sp_ptr)
+{
+	DAT_RETURN dat_status = DAT_SUCCESS;
+	ib_cm_srvc_handle_t conn;
+	DAT_SOCK_ADDR6 addr;	/* local binding address */
+
+	/* Allocate CM and initialize lock */
+	if ((conn = dapl_os_alloc(sizeof(*conn))) == NULL)
+		return DAT_INSUFFICIENT_RESOURCES;
+
+	dapl_os_memzero(conn, sizeof(*conn));
+	dapl_os_lock_init(&conn->lock);
+
+	/* create CM_ID, bind to local device, create QP */
+	if (rdma_create_id
+	    (g_cm_events, &conn->cm_id, (void *)conn, RDMA_PS_TCP)) {
+		dapl_os_free(conn, sizeof(*conn));
+		return (dapl_convert_errno(errno, "setup_listener"));
+	}
+
+	/* open identifies the local device; per DAT specification */
+	/* Get family and address then set port to consumer's ServiceID */
+	dapl_os_memcpy(&addr, &ia_ptr->hca_ptr->hca_address, sizeof(addr));
+	((struct sockaddr_in *)&addr)->sin_port = SID_TO_PORT(ServiceID);
+
+	if (rdma_bind_addr(conn->cm_id, (struct sockaddr *)&addr)) {
+		if ((errno == EBUSY) || (errno == EADDRINUSE))
+			dat_status = DAT_CONN_QUAL_IN_USE;
+		else
+			dat_status =
+			    dapl_convert_errno(errno, "setup_listener");
+		goto bail;
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " listen(ia_ptr %p SID 0x%llx Port %d sp %p conn %p id %d)\n",
+		     ia_ptr, ServiceID, ntohs(SID_TO_PORT(ServiceID)),
+		     sp_ptr, conn, conn->cm_id);
+
+	sp_ptr->cm_srvc_handle = conn;
+	conn->sp = sp_ptr;
+	conn->hca = ia_ptr->hca_ptr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " listen(conn=%p cm_id=%d)\n",
+		     sp_ptr->cm_srvc_handle, conn->cm_id);
+
+	if (rdma_listen(conn->cm_id, 0)) {	/* max cma backlog */
+
+		if ((errno == EBUSY) || (errno == EADDRINUSE))
+			dat_status = DAT_CONN_QUAL_IN_USE;
+		else
+			dat_status =
+			    dapl_convert_errno(errno, "setup_listener");
+		goto bail;
+	}
+
+	/* success */
+	return DAT_SUCCESS;
+
+      bail:
+	rdma_destroy_id(conn->cm_id);
+	dapl_os_free(conn, sizeof(*conn));
+	return dat_status;
+}
+
+/*
+ * dapl_ib_remove_conn_listener
+ *
+ * Have the CM remove a connection listener.
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	ServiceID		IB Channel Service ID
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN
+dapls_ib_remove_conn_listener(IN DAPL_IA * ia_ptr, IN DAPL_SP * sp_ptr)
+{
+	ib_cm_srvc_handle_t conn = sp_ptr->cm_srvc_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " remove_listen(ia_ptr %p sp_ptr %p cm_ptr %p)\n",
+		     ia_ptr, sp_ptr, conn);
+
+	if (conn != IB_INVALID_HANDLE) {
+		sp_ptr->cm_srvc_handle = NULL;
+		dapli_destroy_conn(conn);
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_accept_connection
+ *
+ * Perform necessary steps to accept a connection
+ *
+ * Input:
+ *	cr_handle
+ *	ep_handle
+ *	private_data_size
+ *	private_data
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INTERNAL_ERROR
+ *
+ */
+DAT_RETURN
+dapls_ib_accept_connection(IN DAT_CR_HANDLE cr_handle,
+			   IN DAT_EP_HANDLE ep_handle,
+			   IN DAT_COUNT p_size, IN const DAT_PVOID p_data)
+{
+	DAPL_CR *cr_ptr = (DAPL_CR *) cr_handle;
+	DAPL_EP *ep_ptr = (DAPL_EP *) ep_handle;
+	DAPL_IA *ia_ptr = ep_ptr->header.owner_ia;
+	struct dapl_cm_id *cr_conn = cr_ptr->ib_cm_handle;
+	int ret;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " accept(cr %p conn %p, id %p, p_data %p, p_sz=%d)\n",
+		     cr_ptr, cr_conn, cr_conn->cm_id, p_data, p_size);
+
+	/* Obtain size of private data structure & contents */
+	if (p_size > IB_MAX_REP_PDATA_SIZE) {
+		dat_status = DAT_ERROR(DAT_LENGTH_ERROR, DAT_NO_SUBTYPE);
+		goto bail;
+	}
+
+	if (ep_ptr->qp_state == DAPL_QP_STATE_UNATTACHED) {
+		/* 
+		 * If we are lazy attaching the QP then we may need to
+		 * hook it up here. Typically, we run this code only for
+		 * DAT_PSP_PROVIDER_FLAG
+		 */
+		dat_status = dapls_ib_qp_alloc(ia_ptr, ep_ptr, NULL);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_log(DAPL_DBG_TYPE_ERR,
+				 " dapl_cma_accept: qp_alloc ERR %d\n",
+				 dat_status);
+			goto bail;
+		}
+	}
+
+	/* 
+	 * Validate device and port in EP cm_id against inbound 
+	 * CR cm_id. The pre-allocated EP cm_id is already bound to 
+	 * a local device (cm_id and QP) when created. Move the QP
+	 * to the new cm_id only if device and port numbers match.
+	 */
+	if (ep_ptr->qp_handle->cm_id->verbs == cr_conn->cm_id->verbs &&
+	    ep_ptr->qp_handle->cm_id->port_num == cr_conn->cm_id->port_num) {
+		/* move QP to new cr_conn, remove QP ref in EP cm_id */
+		cr_conn->cm_id->qp = ep_ptr->qp_handle->cm_id->qp;
+		ep_ptr->qp_handle->cm_id->qp = NULL;
+		dapli_destroy_conn(ep_ptr->qp_handle);
+	} else {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " dapl_cma_accept: ERR dev(%p!=%p) or"
+			 " port mismatch(%d!=%d)\n",
+			 ep_ptr->qp_handle->cm_id->verbs, cr_conn->cm_id->verbs,
+			 ntohs(ep_ptr->qp_handle->cm_id->port_num),
+			 ntohs(cr_conn->cm_id->port_num));
+		dat_status = DAT_INTERNAL_ERROR;
+		goto bail;
+	}
+
+	cr_ptr->param.local_ep_handle = ep_handle;
+	cr_conn->params.private_data = p_data;
+	cr_conn->params.private_data_len = p_size;
+
+	ret = rdma_accept(cr_conn->cm_id, &cr_conn->params);
+	if (ret) {
+		dapl_log(DAPL_DBG_TYPE_ERR, " dapl_cma_accept: ERR %d %s\n",
+			 ret, strerror(errno));
+		dat_status = dapl_convert_errno(ret, "accept");
+		goto bail;
+	}
+
+	/* save accepted conn and EP reference */
+	ep_ptr->qp_handle = cr_conn;
+	ep_ptr->cm_handle = cr_conn;
+	cr_conn->ep = ep_ptr;
+
+	/* setup local and remote ports for ep query */
+	/* Note: port qual in network order */
+	ep_ptr->param.remote_port_qual =
+	    PORT_TO_SID(rdma_get_dst_port(cr_conn->cm_id));
+	ep_ptr->param.local_port_qual =
+	    PORT_TO_SID(rdma_get_src_port(cr_conn->cm_id));
+
+	return DAT_SUCCESS;
+      bail:
+	rdma_reject(cr_conn->cm_id, NULL, 0);
+	dapli_destroy_conn(cr_conn);
+	return dat_status;
+}
+
+/*
+ * dapls_ib_reject_connection
+ *
+ * Reject a connection
+ *
+ * Input:
+ *	cr_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INTERNAL_ERROR
+ *
+ */
+DAT_RETURN
+dapls_ib_reject_connection(IN dp_ib_cm_handle_t cm_handle,
+			   IN int reason,
+			   IN DAT_COUNT private_data_size,
+			   IN const DAT_PVOID private_data)
+{
+	int ret;
+	int offset = sizeof(struct dapl_pdata_hdr);
+	struct dapl_pdata_hdr pdata_hdr;
+
+	memset(&pdata_hdr, 0, sizeof pdata_hdr);
+	pdata_hdr.version = htonl((DAT_VERSION_MAJOR << 24) |
+				  (DAT_VERSION_MINOR << 16) |
+				  (VN_PROVIDER_MAJOR << 8) |
+				  (VN_PROVIDER_MINOR));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " reject: handle %p reason %x, ver=%x, data %p, sz=%d\n",
+		     cm_handle, reason, ntohl(pdata_hdr.version),
+		     private_data, private_data_size);
+
+	if (cm_handle == IB_INVALID_HANDLE) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " reject: invalid handle: reason %d\n", reason);
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+	}
+
+	if (private_data_size >
+	    dapls_ib_private_data_size(NULL, DAPL_PDATA_CONN_REJ,
+				       cm_handle->hca))
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+
+	/* setup pdata_hdr and users data, in CR pdata buffer */
+	dapl_os_memcpy(cm_handle->p_data, &pdata_hdr, offset);
+	if (private_data_size)
+		dapl_os_memcpy(cm_handle->p_data + offset,
+			       private_data, private_data_size);
+
+	/*
+	 * Always some private data with reject so active peer can
+	 * determine real application reject from an abnormal 
+	 * application termination
+	 */
+	ret = rdma_reject(cm_handle->cm_id,
+			  cm_handle->p_data, offset + private_data_size);
+
+	dapli_destroy_conn(cm_handle);
+	return dapl_convert_errno(ret, "reject");
+}
+
+/*
+ * dapls_ib_cm_remote_addr
+ *
+ * Obtain the remote IP address given a connection
+ *
+ * Input:
+ *	cr_handle
+ *
+ * Output:
+ *	remote_ia_address: where to place the remote address
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *
+ */
+DAT_RETURN
+dapls_ib_cm_remote_addr(IN DAT_HANDLE dat_handle, OUT DAT_SOCK_ADDR6 * raddr)
+{
+	DAPL_HEADER *header;
+	dp_ib_cm_handle_t ib_cm_handle;
+	struct rdma_addr *ipaddr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " remote_addr(cm_handle=%p, r_addr=%p)\n",
+		     dat_handle, raddr);
+
+	header = (DAPL_HEADER *) dat_handle;
+
+	if (header->magic == DAPL_MAGIC_EP)
+		ib_cm_handle = ((DAPL_EP *) dat_handle)->cm_handle;
+	else if (header->magic == DAPL_MAGIC_CR)
+		ib_cm_handle = ((DAPL_CR *) dat_handle)->ib_cm_handle;
+	else
+		return DAT_INVALID_HANDLE;
+
+	/* get remote IP address from cm_id route */
+	ipaddr = &ib_cm_handle->cm_id->route.addr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " remote_addr: conn %p id %p SRC %x DST %x PORT %d\n",
+		     ib_cm_handle, ib_cm_handle->cm_id,
+		     ntohl(((struct sockaddr_in *)
+			    &ipaddr->src_addr)->sin_addr.s_addr),
+		     ntohl(((struct sockaddr_in *)
+			    &ipaddr->dst_addr)->sin_addr.s_addr),
+		     ntohs(((struct sockaddr_in *)
+			    &ipaddr->dst_addr)->sin_port));
+
+	dapl_os_memcpy(raddr, &ipaddr->dst_addr, sizeof(DAT_SOCK_ADDR));
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_private_data_size
+ *
+ * Return the size of private data given a connection op type
+ *
+ * Input:
+ *	prd_ptr		private data pointer
+ *	conn_op		connection operation type
+ *      hca_ptr         hca pointer, needed for transport type
+ *
+ * If prd_ptr is NULL, this is a query for the max size supported by
+ * the provider, otherwise it is the actual size of the private data
+ * contained in prd_ptr.
+ *
+ *
+ * Output:
+ *	None
+ *
+ * Returns:
+ * 	length of private data
+ *
+ */
+int dapls_ib_private_data_size(IN DAPL_PRIVATE * prd_ptr,
+			       IN DAPL_PDATA_OP conn_op, IN DAPL_HCA * hca_ptr)
+{
+	int size;
+
+	if (hca_ptr->ib_hca_handle->device->transport_type
+	    == IBV_TRANSPORT_IWARP)
+		return (IWARP_MAX_PDATA_SIZE - sizeof(struct dapl_pdata_hdr));
+
+	switch (conn_op) {
+
+	case DAPL_PDATA_CONN_REQ:
+		size = IB_MAX_REQ_PDATA_SIZE;
+		break;
+	case DAPL_PDATA_CONN_REP:
+		size = IB_MAX_REP_PDATA_SIZE;
+		break;
+	case DAPL_PDATA_CONN_REJ:
+		size = IB_MAX_REJ_PDATA_SIZE - sizeof(struct dapl_pdata_hdr);
+		break;
+	case DAPL_PDATA_CONN_DREQ:
+		size = IB_MAX_DREQ_PDATA_SIZE;
+		break;
+	case DAPL_PDATA_CONN_DREP:
+		size = IB_MAX_DREP_PDATA_SIZE;
+		break;
+	default:
+		size = 0;
+
+	}			/* end case */
+
+	return size;
+}
+
+/*
+ * Map all CMA event codes to the DAT equivelent.
+ */
+#define DAPL_IB_EVENT_CNT	13
+
+static struct ib_cm_event_map {
+	const ib_cm_events_t ib_cm_event;
+	DAT_EVENT_NUMBER dat_event_num;
+} ib_cm_event_map[DAPL_IB_EVENT_CNT] = {
+	/* 00 */  {
+	IB_CME_CONNECTED, DAT_CONNECTION_EVENT_ESTABLISHED},
+	    /* 01 */  {
+	IB_CME_DISCONNECTED, DAT_CONNECTION_EVENT_DISCONNECTED},
+	    /* 02 */  {
+	IB_CME_DISCONNECTED_ON_LINK_DOWN,
+		    DAT_CONNECTION_EVENT_DISCONNECTED},
+	    /* 03 */  {
+	IB_CME_CONNECTION_REQUEST_PENDING, DAT_CONNECTION_REQUEST_EVENT},
+	    /* 04 */  {
+	IB_CME_CONNECTION_REQUEST_PENDING_PRIVATE_DATA,
+		    DAT_CONNECTION_REQUEST_EVENT},
+	    /* 05 */  {
+	IB_CME_CONNECTION_REQUEST_ACKED, DAT_CONNECTION_REQUEST_EVENT},
+	    /* 06 */  {
+	IB_CME_DESTINATION_REJECT,
+		    DAT_CONNECTION_EVENT_NON_PEER_REJECTED},
+	    /* 07 */  {
+	IB_CME_DESTINATION_REJECT_PRIVATE_DATA,
+		    DAT_CONNECTION_EVENT_PEER_REJECTED},
+	    /* 08 */  {
+	IB_CME_DESTINATION_UNREACHABLE, DAT_CONNECTION_EVENT_UNREACHABLE},
+	    /* 09 */  {
+	IB_CME_TOO_MANY_CONNECTION_REQUESTS,
+		    DAT_CONNECTION_EVENT_NON_PEER_REJECTED},
+	    /* 10 */  {
+	IB_CME_LOCAL_FAILURE, DAT_CONNECTION_EVENT_BROKEN},
+	    /* 11 */  {
+	IB_CME_BROKEN, DAT_CONNECTION_EVENT_BROKEN},
+	    /* 12 */  {
+IB_CME_TIMEOUT, DAT_CONNECTION_EVENT_TIMED_OUT},};
+
+/*
+ * dapls_ib_get_cm_event
+ *
+ * Return a DAT connection event given a provider CM event.
+ *
+ * Input:
+ *	dat_event_num	DAT event we need an equivelent CM event for
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	ib_cm_event of translated DAPL value
+ */
+DAT_EVENT_NUMBER
+dapls_ib_get_dat_event(IN const ib_cm_events_t ib_cm_event,
+		       IN DAT_BOOLEAN active)
+{
+	DAT_EVENT_NUMBER dat_event_num;
+	int i;
+
+	active = active;
+
+	dat_event_num = 0;
+	for (i = 0; i < DAPL_IB_EVENT_CNT; i++) {
+		if (ib_cm_event == ib_cm_event_map[i].ib_cm_event) {
+			dat_event_num = ib_cm_event_map[i].dat_event_num;
+			break;
+		}
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "dapls_ib_get_dat_event: event(%s) ib=0x%x dat=0x%x\n",
+		     active ? "active" : "passive", ib_cm_event, dat_event_num);
+
+	return dat_event_num;
+}
+
+/*
+ * dapls_ib_get_dat_event
+ *
+ * Return a DAT connection event given a provider CM event.
+ * 
+ * Input:
+ *	ib_cm_event	event provided to the dapl callback routine
+ *	active		switch indicating active or passive connection
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_EVENT_NUMBER of translated provider value
+ */
+ib_cm_events_t dapls_ib_get_cm_event(IN DAT_EVENT_NUMBER dat_event_num)
+{
+	ib_cm_events_t ib_cm_event;
+	int i;
+
+	ib_cm_event = 0;
+	for (i = 0; i < DAPL_IB_EVENT_CNT; i++) {
+		if (dat_event_num == ib_cm_event_map[i].dat_event_num) {
+			ib_cm_event = ib_cm_event_map[i].ib_cm_event;
+			break;
+		}
+	}
+	return ib_cm_event;
+}
+
+void dapli_cma_event_cb(void)
+{
+	struct rdma_cm_event *event;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cm_event()\n");
+
+	/* process one CM event, fairness */
+	if (!rdma_get_cm_event(g_cm_events, &event)) {
+		struct dapl_cm_id *conn;
+
+		/* set proper conn from cm_id context */
+		if (event->event == RDMA_CM_EVENT_CONNECT_REQUEST)
+			conn = (struct dapl_cm_id *)event->listen_id->context;
+		else
+			conn = (struct dapl_cm_id *)event->id->context;
+
+		dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			     " cm_event: EVENT=%d ID=%p LID=%p CTX=%p\n",
+			     event->event, event->id, event->listen_id, conn);
+
+		switch (event->event) {
+		case RDMA_CM_EVENT_ADDR_RESOLVED:
+			dapli_addr_resolve(conn);
+			break;
+
+		case RDMA_CM_EVENT_ROUTE_RESOLVED:
+			dapli_route_resolve(conn);
+			break;
+
+		case RDMA_CM_EVENT_ADDR_ERROR:
+			dapl_log(DAPL_DBG_TYPE_WARN,
+				 "dapl_cma_active: CM ADDR ERROR: ->"
+				 " DST %s retry (%d)..\n",
+				 inet_ntoa(((struct sockaddr_in *)
+					    &conn->r_addr)->sin_addr),
+				 conn->arp_retries);
+
+			/* retry address resolution */
+			if ((--conn->arp_retries) &&
+			    (event->status == -ETIMEDOUT)) {
+				int ret;
+				ret = rdma_resolve_addr(conn->cm_id, NULL,
+							(struct sockaddr *)
+							&conn->r_addr,
+							conn->arp_timeout);
+				if (!ret)
+					break;
+				else {
+					dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+						     " ERROR: rdma_resolve_addr = "
+						     "%d %s\n",
+						     ret, strerror(errno));
+				}
+			}
+			/* retries exhausted or resolve_addr failed */
+			dapl_log(DAPL_DBG_TYPE_ERR,
+				 "dapl_cma_active: ARP_ERR, retries(%d)"
+				 " exhausted -> DST %s,%d\n",
+				 IB_ARP_RETRY_COUNT,
+				 inet_ntoa(((struct sockaddr_in *)
+					    &conn->cm_id->route.addr.dst_addr)->
+					   sin_addr),
+				 ntohs(((struct sockaddr_in *)
+					&conn->cm_id->route.addr.dst_addr)->
+				       sin_port));
+
+			dapl_evd_connection_callback(conn,
+						     IB_CME_DESTINATION_UNREACHABLE,
+						     NULL, conn->ep);
+			break;
+
+		case RDMA_CM_EVENT_ROUTE_ERROR:
+			dapl_log(DAPL_DBG_TYPE_WARN,
+				 "dapl_cma_active: CM ROUTE ERROR: ->"
+				 " DST %s retry (%d)..\n",
+				 inet_ntoa(((struct sockaddr_in *)
+					    &conn->r_addr)->sin_addr),
+				 conn->route_retries);
+
+			/* retry route resolution */
+			if ((--conn->route_retries) &&
+			    (event->status == -ETIMEDOUT))
+				dapli_addr_resolve(conn);
+			else {
+				dapl_log(DAPL_DBG_TYPE_ERR,
+					 "dapl_cma_active: PATH_RECORD_ERR,"
+					 " retries(%d) exhausted, DST %s,%d\n",
+					 IB_ROUTE_RETRY_COUNT,
+					 inet_ntoa(((struct sockaddr_in *)
+						    &conn->cm_id->route.addr.
+						    dst_addr)->sin_addr),
+					 ntohs(((struct sockaddr_in *)
+						&conn->cm_id->route.addr.
+						dst_addr)->sin_port));
+
+				dapl_evd_connection_callback(conn,
+							     IB_CME_DESTINATION_UNREACHABLE,
+							     NULL, conn->ep);
+			}
+			break;
+
+		case RDMA_CM_EVENT_DEVICE_REMOVAL:
+			dapl_evd_connection_callback(conn,
+						     IB_CME_LOCAL_FAILURE,
+						     NULL, conn->ep);
+			break;
+		case RDMA_CM_EVENT_CONNECT_REQUEST:
+		case RDMA_CM_EVENT_CONNECT_ERROR:
+		case RDMA_CM_EVENT_UNREACHABLE:
+		case RDMA_CM_EVENT_REJECTED:
+		case RDMA_CM_EVENT_ESTABLISHED:
+		case RDMA_CM_EVENT_DISCONNECTED:
+			/* passive or active */
+			if (conn->sp)
+				dapli_cm_passive_cb(conn, event);
+			else
+				dapli_cm_active_cb(conn, event);
+			break;
+		case RDMA_CM_EVENT_CONNECT_RESPONSE:
+		default:
+			dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+				     " cm_event: UNEXPECTED EVENT=%p ID=%p CTX=%p\n",
+				     event->event, event->id,
+				     event->id->context);
+			break;
+		}
+		/* ack event, unblocks destroy_cm_id in consumer threads */
+		rdma_ack_cm_event(event);
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_cma/dapl_ib_cq.c b/dapl/openib_cma/dapl_ib_cq.c
new file mode 100755
index 0000000..7f67982
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_cq.c
@@ -0,0 +1,559 @@
+/*
+ * Copyright (c) 2005-2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ib_cq.c
+ *
+ * PURPOSE: completion queues for OFED IB Verbs
+ *
+ * $Id: $
+ *
+ **********************************************************************/
+
+#include "openib_osd.h"
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_lmr_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_ring_buffer_util.h"
+
+/* One CQ event channel per HCA */
+void dapli_cq_event_cb(struct _ib_hca_transport *hca)
+{
+	/* check all comp events on this device */
+	struct dapl_evd *evd_ptr = NULL;
+	struct ibv_cq *ibv_cq = NULL;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " dapli_cq_event_cb(%p)\n", hca);
+
+	if (!ibv_get_cq_event(hca->ib_cq, &ibv_cq, (void *)&evd_ptr)) {
+
+		if (DAPL_BAD_HANDLE(evd_ptr, DAPL_MAGIC_EVD)) {
+			ibv_ack_cq_events(ibv_cq, 1);
+			return;
+		}
+
+		/* process DTO event via callback */
+		dapl_evd_dto_callback(hca->cm_id->verbs,
+				      evd_ptr->ib_cq_handle, (void *)evd_ptr);
+
+		ibv_ack_cq_events(ibv_cq, 1);
+	}
+}
+
+/*
+ * Map all verbs DTO completion codes to the DAT equivelent.
+ *
+ * Not returned by verbs:     DAT_DTO_ERR_PARTIAL_PACKET
+ */
+static struct ib_status_map {
+	int ib_status;
+	DAT_DTO_COMPLETION_STATUS dat_status;
+} ib_status_map[] = {
+/* 00 */  {
+	IBV_WC_SUCCESS, DAT_DTO_SUCCESS},
+/* 01 */  {
+	IBV_WC_LOC_LEN_ERR, DAT_DTO_ERR_LOCAL_LENGTH},
+/* 02 */  {
+	IBV_WC_LOC_QP_OP_ERR, DAT_DTO_ERR_LOCAL_EP},
+/* 03 */  {
+	IBV_WC_LOC_EEC_OP_ERR, DAT_DTO_ERR_TRANSPORT},
+/* 04 */  {
+	IBV_WC_LOC_PROT_ERR, DAT_DTO_ERR_LOCAL_PROTECTION},
+/* 05 */  {
+	IBV_WC_WR_FLUSH_ERR, DAT_DTO_ERR_FLUSHED},
+/* 06 */  {
+	IBV_WC_MW_BIND_ERR, DAT_RMR_OPERATION_FAILED},
+/* 07 */  {
+	IBV_WC_BAD_RESP_ERR, DAT_DTO_ERR_BAD_RESPONSE},
+/* 08 */  {
+	IBV_WC_LOC_ACCESS_ERR, DAT_DTO_ERR_LOCAL_PROTECTION},
+/* 09 */  {
+	IBV_WC_REM_INV_REQ_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+/* 10 */  {
+	IBV_WC_REM_ACCESS_ERR, DAT_DTO_ERR_REMOTE_ACCESS},
+/* 11 */  {
+	IBV_WC_REM_OP_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+/* 12 */  {
+	IBV_WC_RETRY_EXC_ERR, DAT_DTO_ERR_TRANSPORT},
+/* 13 */  {
+	IBV_WC_RNR_RETRY_EXC_ERR, DAT_DTO_ERR_RECEIVER_NOT_READY},
+/* 14 */  {
+	IBV_WC_LOC_RDD_VIOL_ERR, DAT_DTO_ERR_LOCAL_PROTECTION},
+/* 15 */  {
+	IBV_WC_REM_INV_RD_REQ_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+/* 16 */  {
+	IBV_WC_REM_ABORT_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+/* 17 */  {
+	IBV_WC_INV_EECN_ERR, DAT_DTO_ERR_TRANSPORT},
+/* 18 */  {
+	IBV_WC_INV_EEC_STATE_ERR, DAT_DTO_ERR_TRANSPORT},
+/* 19 */  {
+	IBV_WC_FATAL_ERR, DAT_DTO_ERR_TRANSPORT},
+/* 20 */  {
+	IBV_WC_RESP_TIMEOUT_ERR, DAT_DTO_ERR_RECEIVER_NOT_READY},
+/* 21 */  {
+IBV_WC_GENERAL_ERR, DAT_DTO_ERR_TRANSPORT},};
+
+/*
+ * dapls_ib_get_dto_status
+ *
+ * Return the DAT status of a DTO operation
+ *
+ * Input:
+ *	cqe_ptr		pointer to completion queue entry
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	Value from ib_status_map table above
+ */
+
+DAT_DTO_COMPLETION_STATUS
+dapls_ib_get_dto_status(IN ib_work_completion_t * cqe_ptr)
+{
+	uint32_t ib_status;
+	int i;
+
+	ib_status = DAPL_GET_CQE_STATUS(cqe_ptr);
+
+	/*
+	 * Due to the implementation of verbs completion code, we need to
+	 * search the table for the correct value rather than assuming
+	 * linear distribution.
+	 */
+	for (i = 0; i <= IBV_WC_GENERAL_ERR; i++) {
+		if (ib_status == ib_status_map[i].ib_status) {
+			if (ib_status != IBV_WC_SUCCESS) {
+				dapl_dbg_log(DAPL_DBG_TYPE_DTO_COMP_ERR,
+					     " DTO completion ERROR: %d: op %#x\n",
+					     ib_status,
+					     DAPL_GET_CQE_OPTYPE(cqe_ptr));
+			}
+			return ib_status_map[i].dat_status;
+		}
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_DTO_COMP_ERR,
+		     " DTO completion ERROR: %d: op %#x\n",
+		     ib_status, DAPL_GET_CQE_OPTYPE(cqe_ptr));
+
+	return DAT_DTO_FAILURE;
+}
+
+DAT_RETURN dapls_ib_get_async_event(IN ib_error_record_t * err_record,
+				    OUT DAT_EVENT_NUMBER * async_event)
+{
+	DAT_RETURN dat_status = DAT_SUCCESS;
+	int err_code = err_record->event_type;
+
+	switch (err_code) {
+		/* OVERFLOW error */
+	case IBV_EVENT_CQ_ERR:
+		*async_event = DAT_ASYNC_ERROR_EVD_OVERFLOW;
+		break;
+		/* INTERNAL errors */
+	case IBV_EVENT_DEVICE_FATAL:
+		*async_event = DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR;
+		break;
+		/* CATASTROPHIC errors */
+	case IBV_EVENT_PORT_ERR:
+		*async_event = DAT_ASYNC_ERROR_IA_CATASTROPHIC;
+		break;
+		/* BROKEN QP error */
+	case IBV_EVENT_SQ_DRAINED:
+	case IBV_EVENT_QP_FATAL:
+	case IBV_EVENT_QP_REQ_ERR:
+	case IBV_EVENT_QP_ACCESS_ERR:
+		*async_event = DAT_ASYNC_ERROR_EP_BROKEN;
+		break;
+		/* connection completion */
+	case IBV_EVENT_COMM_EST:
+		*async_event = DAT_CONNECTION_EVENT_ESTABLISHED;
+		break;
+		/* TODO: process HW state changes */
+	case IBV_EVENT_PATH_MIG:
+	case IBV_EVENT_PATH_MIG_ERR:
+	case IBV_EVENT_PORT_ACTIVE:
+	case IBV_EVENT_LID_CHANGE:
+	case IBV_EVENT_PKEY_CHANGE:
+	case IBV_EVENT_SM_CHANGE:
+	default:
+		dat_status = DAT_ERROR(DAT_NOT_IMPLEMENTED, 0);
+	}
+	return dat_status;
+}
+
+/*
+ * dapl_ib_cq_alloc
+ *
+ * Alloc a CQ
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	evd_ptr			pointer to EVD struct
+ *	cqlen			minimum QLen
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_cq_alloc(IN DAPL_IA * ia_ptr,
+		  IN DAPL_EVD * evd_ptr, IN DAT_COUNT * cqlen)
+{
+	struct ibv_comp_channel *channel = ia_ptr->hca_ptr->ib_trans.ib_cq;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     "dapls_ib_cq_alloc: evd %p cqlen=%d \n", evd_ptr, *cqlen);
+
+#ifdef CQ_WAIT_OBJECT
+	if (evd_ptr->cq_wait_obj_handle)
+		channel = evd_ptr->cq_wait_obj_handle->events;
+#endif
+
+	/* Call IB verbs to create CQ */
+	evd_ptr->ib_cq_handle = ibv_create_cq(ia_ptr->hca_ptr->ib_hca_handle,
+					      *cqlen, evd_ptr, channel, 0);
+
+	if (evd_ptr->ib_cq_handle == IB_INVALID_HANDLE)
+		return (dapl_convert_errno(errno, "create_cq"));
+
+	/* arm cq for events */
+	dapls_set_cq_notify(ia_ptr, evd_ptr);
+
+	/* update with returned cq entry size */
+	*cqlen = evd_ptr->ib_cq_handle->cqe;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     "dapls_ib_cq_alloc: new_cq %p cqlen=%d \n",
+		     evd_ptr->ib_cq_handle, *cqlen);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_cq_resize
+ *
+ * Alloc a CQ
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	evd_ptr			pointer to EVD struct
+ *	cqlen			minimum QLen
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN
+dapls_ib_cq_resize(IN DAPL_IA * ia_ptr,
+		   IN DAPL_EVD * evd_ptr, IN DAT_COUNT * cqlen)
+{
+	ib_cq_handle_t new_cq;
+	struct ibv_comp_channel *channel = ia_ptr->hca_ptr->ib_trans.ib_cq;
+
+	/* IB verbs doe not support resize. Try to re-create CQ
+	 * with new size. Can only be done if QP is not attached. 
+	 * destroy EBUSY == QP still attached.
+	 */
+
+#ifdef CQ_WAIT_OBJECT
+	if (evd_ptr->cq_wait_obj_handle)
+		channel = evd_ptr->cq_wait_obj_handle->events;
+#endif
+
+	/* Call IB verbs to create CQ */
+	new_cq = ibv_create_cq(ia_ptr->hca_ptr->ib_hca_handle, *cqlen,
+			       evd_ptr, channel, 0);
+
+	if (new_cq == IB_INVALID_HANDLE)
+		return DAT_INSUFFICIENT_RESOURCES;
+
+	/* destroy the original and replace if successful */
+	if (ibv_destroy_cq(evd_ptr->ib_cq_handle)) {
+		ibv_destroy_cq(new_cq);
+		return (dapl_convert_errno(errno, "resize_cq"));
+	}
+
+	/* update EVD with new cq handle and size */
+	evd_ptr->ib_cq_handle = new_cq;
+	*cqlen = new_cq->cqe;
+
+	/* arm cq for events */
+	dapls_set_cq_notify(ia_ptr, evd_ptr);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_cq_free
+ *
+ * destroy a CQ
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	evd_ptr			pointer to EVD struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN dapls_ib_cq_free(IN DAPL_IA * ia_ptr, IN DAPL_EVD * evd_ptr)
+{
+	if (evd_ptr->ib_cq_handle != IB_INVALID_HANDLE) {
+		/* copy all entries on CQ to EVD before destroying */
+		dapls_evd_copy_cq(evd_ptr);
+		if (ibv_destroy_cq(evd_ptr->ib_cq_handle))
+			return (dapl_convert_errno(errno, "destroy_cq"));
+		evd_ptr->ib_cq_handle = IB_INVALID_HANDLE;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_set_cq_notify
+ *
+ * Set the CQ notification for next
+ *
+ * Input:
+ *	hca_handl		hca handle
+ *	DAPL_EVD		evd handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	dapl_convert_errno 
+ */
+DAT_RETURN dapls_set_cq_notify(IN DAPL_IA * ia_ptr, IN DAPL_EVD * evd_ptr)
+{
+	if (ibv_req_notify_cq(evd_ptr->ib_cq_handle, 0))
+		return (dapl_convert_errno(errno, "notify_cq"));
+	else
+		return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_completion_notify
+ *
+ * Set the CQ notification type
+ *
+ * Input:
+ *	hca_handl		hca handle
+ *	evd_ptr			evd handle
+ *	type			notification type
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	dapl_convert_errno
+ */
+DAT_RETURN dapls_ib_completion_notify(IN ib_hca_handle_t hca_handle,
+				      IN DAPL_EVD * evd_ptr,
+				      IN ib_notification_type_t type)
+{
+	if (ibv_req_notify_cq(evd_ptr->ib_cq_handle, type))
+		return (dapl_convert_errno(errno, "notify_cq_type"));
+	else
+		return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_completion_poll
+ *
+ * CQ poll for completions
+ *
+ * Input:
+ *	hca_handl		hca handle
+ *	evd_ptr			evd handle
+ *	wc_ptr			work completion
+ *
+ * Output:
+ * 	none
+ *
+ * Returns: 
+ * 	DAT_SUCCESS
+ *	DAT_QUEUE_EMPTY
+ *	
+ */
+DAT_RETURN dapls_ib_completion_poll(IN DAPL_HCA * hca_ptr,
+				    IN DAPL_EVD * evd_ptr,
+				    IN ib_work_completion_t * wc_ptr)
+{
+	if (ibv_poll_cq(evd_ptr->ib_cq_handle, 1, wc_ptr) == 1)
+		return DAT_SUCCESS;
+
+	return DAT_QUEUE_EMPTY;
+}
+
+#ifdef CQ_WAIT_OBJECT
+
+/* NEW common wait objects for providers with direct CQ wait objects */
+DAT_RETURN
+dapls_ib_wait_object_create(IN DAPL_EVD * evd_ptr,
+			    IN ib_wait_obj_handle_t * p_cq_wait_obj_handle)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_create: (%p,%p)\n",
+		     evd_ptr, p_cq_wait_obj_handle);
+
+	*p_cq_wait_obj_handle =
+	    dapl_os_alloc(sizeof(struct _ib_wait_obj_handle));
+
+	if (*p_cq_wait_obj_handle == NULL)
+		return (dapl_convert_errno(ENOMEM, " wait_object_create"));
+
+	dapl_os_memzero(*p_cq_wait_obj_handle,
+			sizeof(struct _ib_wait_obj_handle));
+
+	/* create pipe for waking up work thread */
+	if (pipe((*p_cq_wait_obj_handle)->pipe))
+		goto bail;
+
+	/* set cq_wait object to evd_ptr */
+	(*p_cq_wait_obj_handle)->events =
+	    ibv_create_comp_channel(evd_ptr->header.owner_ia->hca_ptr->
+				    ib_hca_handle);
+
+	if ((*p_cq_wait_obj_handle)->events == NULL)
+		goto bail;
+
+	return DAT_SUCCESS;
+      bail:
+	dapl_os_free(*p_cq_wait_obj_handle, sizeof(struct _ib_wait_obj_handle));
+	*p_cq_wait_obj_handle = NULL;
+	return (dapl_convert_errno(errno, " wait_object_create"));
+}
+
+DAT_RETURN
+dapls_ib_wait_object_destroy(IN ib_wait_obj_handle_t p_cq_wait_obj_handle)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_destroy: wait_obj=%p\n", p_cq_wait_obj_handle);
+
+	ibv_destroy_comp_channel(p_cq_wait_obj_handle->events);
+
+	dapl_os_free(p_cq_wait_obj_handle, sizeof(struct _ib_wait_obj_handle));
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_ib_wait_object_wakeup(IN ib_wait_obj_handle_t p_cq_wait_obj_handle)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wakeup: wait_obj=%p\n", p_cq_wait_obj_handle);
+
+	/* write to pipe for wake up */
+	if (write(p_cq_wait_obj_handle->pipe[1], "w", sizeof "w") == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " wait object wakeup write error = %s\n",
+			 strerror(errno));
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_ib_wait_object_wait(IN ib_wait_obj_handle_t p_cq_wait_obj_handle,
+			  IN u_int32_t timeout)
+{
+	struct dapl_evd *evd_ptr;
+	struct ibv_cq *ibv_cq = NULL;
+	int status = 0;
+	int timeout_ms = -1;
+	struct pollfd ufds[2];
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wait: CQ channel %p time %d\n",
+		     p_cq_wait_obj_handle, timeout);
+
+	/* setup cq event channel and pipe fd for consumer wakeup */
+	ufds[0].fd = p_cq_wait_obj_handle->events->fd;
+	ufds[0].events = POLLIN;
+	ufds[0].revents = 0;
+	ufds[1].fd = p_cq_wait_obj_handle->pipe[0];
+	ufds[1].events = POLLIN;
+	ufds[1].revents = 0;
+
+	/* uDAPL timeout values in usecs */
+	if (timeout != DAT_TIMEOUT_INFINITE)
+		timeout_ms = timeout / 1000;
+
+	/* restart syscall */
+	while ((status = poll(ufds, 2, timeout_ms)) == -1)
+		if (errno == EINTR)
+			continue;
+
+	/* returned event */
+	if (status > 0) {
+		if (ufds[0].revents == POLLIN) {
+			if (!ibv_get_cq_event(p_cq_wait_obj_handle->events,
+					      &ibv_cq, (void *)&evd_ptr)) {
+				ibv_ack_cq_events(ibv_cq, 1);
+			}
+		}
+		status = 0;
+
+		/* timeout */
+	} else if (status == 0)
+		status = ETIMEDOUT;
+	else
+		status = errno;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wait: RET evd %p ibv_cq %p %s\n",
+		     evd_ptr, ibv_cq, strerror(errno));
+
+	return (dapl_convert_errno(status, "cq_wait_object_wait"));
+
+}
+#endif
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_cma/dapl_ib_dto.h b/dapl/openib_cma/dapl_ib_dto.h
new file mode 100644
index 0000000..d97c26b
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_dto.h
@@ -0,0 +1,472 @@
+/*
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/***************************************************************************
+ *
+ *   Module:		 uDAPL
+ *
+ *   Filename:		 dapl_ib_dto.h
+ *
+ *   Author:		 Arlin Davis
+ *
+ *   Created:		 3/10/2005
+ *
+ *   Description: 
+ *
+ *   The OpenIB uCMA provider - DTO operations and CQE macros 
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ *	Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ *
+ **************************************************************************/
+#ifndef _DAPL_IB_DTO_H_
+#define _DAPL_IB_DTO_H_
+
+#include "dapl_ib_util.h"
+
+#ifdef DAT_EXTENSIONS
+#include <dat2/dat_ib_extensions.h>
+#endif
+
+STATIC _INLINE_ int dapls_cqe_opcode(ib_work_completion_t *cqe_p);
+
+/*
+ * dapls_ib_post_recv
+ *
+ * Provider specific Post RECV function
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_post_recv (
+	IN  DAPL_EP		*ep_ptr,
+	IN  DAPL_COOKIE		*cookie,
+	IN  DAT_COUNT		segments,
+	IN  DAT_LMR_TRIPLET	*local_iov )
+{
+	struct ibv_recv_wr wr;
+	struct ibv_recv_wr *bad_wr;
+	ib_data_segment_t *ds = (ib_data_segment_t *)local_iov;
+	DAT_COUNT i, total_len;
+	int ret;
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " post_rcv: ep %p cookie %p segs %d l_iov %p\n",
+		     ep_ptr, cookie, segments, local_iov);
+
+	/* setup work request */
+	total_len = 0;
+	wr.next = 0;
+	wr.num_sge = segments;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds;
+
+	if (cookie != NULL) { 
+		for (i = 0; i < segments; i++) {
+			dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+				     " post_rcv: l_key 0x%x va %p len %d\n",
+				     ds->lkey, ds->addr, ds->length);
+			total_len += ds->length;
+			ds++;
+		}
+		cookie->val.dto.size = total_len;
+	}
+
+	ret = ibv_post_recv(ep_ptr->qp_handle->cm_id->qp, &wr, &bad_wr);
+	
+	if (ret)
+		return( dapl_convert_errno(errno,"ibv_recv") );
+
+	DAPL_CNTR(ep_ptr, DCNT_EP_POST_RECV);
+	DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_RECV_DATA, total_len);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_post_send
+ *
+ * Provider specific Post SEND function
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_post_send (
+	IN  DAPL_EP			*ep_ptr,
+	IN  ib_send_op_type_t		op_type,
+	IN  DAPL_COOKIE			*cookie,
+	IN  DAT_COUNT			segments,
+	IN  DAT_LMR_TRIPLET		*local_iov,
+	IN  const DAT_RMR_TRIPLET	*remote_iov,
+	IN  DAT_COMPLETION_FLAGS	completion_flags)
+{
+	struct ibv_send_wr wr;
+	struct ibv_send_wr *bad_wr;
+	ib_data_segment_t *ds = (ib_data_segment_t *)local_iov;
+	ib_hca_transport_t *ibt_ptr = 
+		&ep_ptr->header.owner_ia->hca_ptr->ib_trans;
+	DAT_COUNT i, total_len;
+	int ret;
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " post_snd: ep %p op %d ck %p sgs",
+		     "%d l_iov %p r_iov %p f %d\n",
+		     ep_ptr, op_type, cookie, segments, local_iov, 
+		     remote_iov, completion_flags);
+
+	/* setup the work request */
+	wr.next = 0;
+	wr.opcode = op_type;
+	wr.num_sge = segments;
+	wr.send_flags = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds;
+	total_len = 0;
+
+	if (cookie != NULL) {
+		for (i = 0; i < segments; i++ ) {
+			dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+				     " post_snd: lkey 0x%x va %p len %d\n",
+				     ds->lkey, ds->addr, ds->length );
+			total_len += ds->length;
+			ds++;
+		}
+		cookie->val.dto.size = total_len;
+	}
+
+	if (wr.num_sge && 
+	    (op_type == OP_RDMA_WRITE || op_type == OP_RDMA_READ)) {
+		wr.wr.rdma.remote_addr = remote_iov->virtual_address;
+		wr.wr.rdma.rkey = remote_iov->rmr_context;
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_snd_rdma: rkey 0x%x va %#016Lx\n",
+			     wr.wr.rdma.rkey, wr.wr.rdma.remote_addr);
+	}
+
+	/* inline data for send or write ops */
+	if ((total_len <= ibt_ptr->max_inline_send) && 
+	   ((op_type == OP_SEND) || (op_type == OP_RDMA_WRITE))) 
+		wr.send_flags |= IBV_SEND_INLINE;
+	
+	/* set completion flags in work request */
+	wr.send_flags |= (DAT_COMPLETION_SUPPRESS_FLAG & 
+				completion_flags) ? 0 : IBV_SEND_SIGNALED;
+	wr.send_flags |= (DAT_COMPLETION_BARRIER_FENCE_FLAG & 
+				completion_flags) ? IBV_SEND_FENCE : 0;
+	wr.send_flags |= (DAT_COMPLETION_SOLICITED_WAIT_FLAG & 
+				completion_flags) ? IBV_SEND_SOLICITED : 0;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+		     " post_snd: op 0x%x flags 0x%x sglist %p, %d\n", 
+		     wr.opcode, wr.send_flags, wr.sg_list, wr.num_sge);
+
+	ret = ibv_post_send(ep_ptr->qp_handle->cm_id->qp, &wr, &bad_wr);
+
+	if (ret)
+		return( dapl_convert_errno(errno,"ibv_send") );
+
+#ifdef DAPL_COUNTERS
+	switch (op_type) {
+	case OP_SEND:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_SEND);
+		DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_SEND_DATA,total_len);
+		break;
+	case OP_RDMA_WRITE:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_WRITE);
+		DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_WRITE_DATA,total_len);
+		break;	
+	case OP_RDMA_READ:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_READ);
+		DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_READ_DATA,total_len);
+		break;
+	default:
+		break;
+	}
+#endif /* DAPL_COUNTERS */
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP," post_snd: returned\n");
+	return DAT_SUCCESS;
+}
+
+/* map Work Completions to DAPL WR operations */
+STATIC _INLINE_ DAT_DTOS dapls_cqe_dtos_opcode(ib_work_completion_t *cqe_p)
+{
+	switch (cqe_p->opcode) {
+
+	case IBV_WC_SEND:
+		return (DAT_DTO_SEND);
+	case IBV_WC_RDMA_READ:
+		return (DAT_DTO_RDMA_READ);
+	case IBV_WC_BIND_MW:
+		return (DAT_DTO_BIND_MW);
+#ifdef DAT_EXTENSIONS
+	case IBV_WC_RDMA_WRITE:
+		if (cqe_p->wc_flags & IBV_WC_WITH_IMM)
+			return (DAT_IB_DTO_RDMA_WRITE_IMMED);
+		else
+			return (DAT_DTO_RDMA_WRITE);
+	case IBV_WC_COMP_SWAP:
+		return (DAT_IB_DTO_CMP_SWAP);
+	case IBV_WC_FETCH_ADD:
+		return (DAT_IB_DTO_FETCH_ADD);
+	case IBV_WC_RECV_RDMA_WITH_IMM:
+		return (DAT_IB_DTO_RECV_IMMED);
+#else
+	case IBV_WC_RDMA_WRITE:
+		return (DAT_DTO_RDMA_WRITE);
+#endif
+	case IBV_WC_RECV:
+		return (DAT_DTO_RECEIVE);
+	default:
+		return (0xff);
+	}
+}
+#define DAPL_GET_CQE_DTOS_OPTYPE(cqe_p) dapls_cqe_dtos_opcode(cqe_p)
+
+
+#ifdef DAT_EXTENSIONS
+/*
+ * dapls_ib_post_ext_send
+ *
+ * Provider specific extended Post SEND function for atomics
+ *	OP_COMP_AND_SWAP and OP_FETCH_AND_ADD
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_post_ext_send (
+	IN  DAPL_EP			*ep_ptr,
+	IN  ib_send_op_type_t		op_type,
+	IN  DAPL_COOKIE			*cookie,
+	IN  DAT_COUNT			segments,
+	IN  DAT_LMR_TRIPLET		*local_iov,
+	IN  const DAT_RMR_TRIPLET	*remote_iov,
+	IN  DAT_UINT32			immed_data,
+	IN  DAT_UINT64			compare_add,
+	IN  DAT_UINT64			swap,
+	IN  DAT_COMPLETION_FLAGS	completion_flags)
+{
+	struct ibv_send_wr wr;
+	struct ibv_send_wr *bad_wr;
+	ib_data_segment_t *ds = (ib_data_segment_t *)local_iov;
+	DAT_COUNT i, total_len;
+	int ret;
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " post_ext_snd: ep %p op %d ck %p sgs",
+		     "%d l_iov %p r_iov %p f %d\n",
+		     ep_ptr, op_type, cookie, segments, local_iov, 
+		     remote_iov, completion_flags);
+
+	/* setup the work request */
+	wr.next = 0;
+	wr.opcode = op_type;
+	wr.num_sge = segments;
+	wr.send_flags = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds;
+	total_len = 0;
+
+	if (cookie != NULL) {
+		for (i = 0; i < segments; i++ ) {
+			dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+				     " post_ext_snd: lkey 0x%x va %p ln %d\n",
+				     ds->lkey, ds->addr, ds->length);
+			total_len += ds->length;
+			ds++;
+		}
+		cookie->val.dto.size = total_len;
+	}
+
+	switch (op_type) {
+	case OP_RDMA_WRITE_IMM:
+		/* OP_RDMA_WRITE)IMMED has direct IB wr_type mapping */
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_ext: rkey 0x%x va %#016Lx immed=0x%x\n",
+			     remote_iov?remote_iov->rmr_context:0, 
+			     remote_iov?remote_iov->virtual_address:0,
+			     immed_data);
+
+		wr.imm_data = immed_data;
+	        if (wr.num_sge) {
+			wr.wr.rdma.remote_addr = remote_iov->virtual_address;
+			wr.wr.rdma.rkey = remote_iov->rmr_context;
+		}
+		break;
+	case OP_COMP_AND_SWAP:
+		/* OP_COMP_AND_SWAP has direct IB wr_type mapping */
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_ext: OP_COMP_AND_SWAP=%lx,"
+			     "%lx rkey 0x%x va %#016Lx\n",
+			     compare_add, swap, remote_iov->rmr_context,
+			     remote_iov->virtual_address);
+		
+		wr.wr.atomic.compare_add = compare_add;
+		wr.wr.atomic.swap = swap;
+		wr.wr.atomic.remote_addr = remote_iov->virtual_address;
+		wr.wr.atomic.rkey = remote_iov->rmr_context;
+		break;
+	case OP_FETCH_AND_ADD:
+		/* OP_FETCH_AND_ADD has direct IB wr_type mapping */
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_ext: OP_FETCH_AND_ADD=%lx,"
+			     "%lx rkey 0x%x va %#016Lx\n",
+			     compare_add, remote_iov->rmr_context,
+			     remote_iov->virtual_address);
+
+		wr.wr.atomic.compare_add = compare_add;
+		wr.wr.atomic.remote_addr = remote_iov->virtual_address;
+		wr.wr.atomic.rkey = remote_iov->rmr_context;
+		break;
+	default:
+		break;
+	}
+
+	/* set completion flags in work request */
+	wr.send_flags |= (DAT_COMPLETION_SUPPRESS_FLAG & 
+				completion_flags) ? 0 : IBV_SEND_SIGNALED;
+	wr.send_flags |= (DAT_COMPLETION_BARRIER_FENCE_FLAG & 
+				completion_flags) ? IBV_SEND_FENCE : 0;
+	wr.send_flags |= (DAT_COMPLETION_SOLICITED_WAIT_FLAG & 
+				completion_flags) ? IBV_SEND_SOLICITED : 0;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+		     " post_snd: op 0x%x flags 0x%x sglist %p, %d\n", 
+		     wr.opcode, wr.send_flags, wr.sg_list, wr.num_sge);
+
+	ret = ibv_post_send(ep_ptr->qp_handle->cm_id->qp, &wr, &bad_wr);
+
+	if (ret)
+		return( dapl_convert_errno(errno,"ibv_send") );
+
+#ifdef DAPL_COUNTERS
+	switch (op_type) {
+	case OP_RDMA_WRITE_IMM:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_WRITE_IMM);
+		DAPL_CNTR_DATA(ep_ptr, 
+			       DCNT_EP_POST_WRITE_IMM_DATA, total_len);
+		break;
+	case OP_COMP_AND_SWAP:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_CMP_SWAP);
+		break;	
+	case OP_FETCH_AND_ADD:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_FETCH_ADD);
+		break;
+	default:
+		break;
+	}
+#endif /* DAPL_COUNTERS */
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP," post_snd: returned\n");
+	return DAT_SUCCESS;
+}
+#endif
+
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_optional_prv_dat(
+	IN  DAPL_CR		*cr_ptr,
+	IN  const void		*event_data,
+	OUT   DAPL_CR		**cr_pp)
+{
+    return DAT_SUCCESS;
+}
+
+/* map Work Completions to DAPL WR operations */
+STATIC _INLINE_ int dapls_cqe_opcode(ib_work_completion_t *cqe_p)
+{
+#ifdef DAPL_COUNTERS
+	DAPL_COOKIE *cookie = (DAPL_COOKIE *)(uintptr_t)cqe_p->wr_id;
+#endif /* DAPL_COUNTERS */
+
+	switch (cqe_p->opcode) {
+	case IBV_WC_SEND:
+		return (OP_SEND);
+	case IBV_WC_RDMA_WRITE:
+		if (cqe_p->wc_flags & IBV_WC_WITH_IMM)
+			return (OP_RDMA_WRITE_IMM);
+		else
+			return (OP_RDMA_WRITE);
+	case IBV_WC_RDMA_READ:
+		return (OP_RDMA_READ);
+	case IBV_WC_COMP_SWAP:
+		return (OP_COMP_AND_SWAP);
+	case IBV_WC_FETCH_ADD:
+		return (OP_FETCH_AND_ADD);
+	case IBV_WC_BIND_MW:
+		return (OP_BIND_MW);
+	case IBV_WC_RECV:
+		if (cqe_p->wc_flags & IBV_WC_WITH_IMM) {
+			DAPL_CNTR(cookie->ep, DCNT_EP_RECV_IMM);
+			DAPL_CNTR_DATA(cookie->ep, DCNT_EP_RECV_IMM_DATA, 
+				       cqe_p->byte_len);
+			return (OP_RECEIVE_IMM);
+		} else {
+			DAPL_CNTR(cookie->ep, DCNT_EP_RECV);
+			DAPL_CNTR_DATA(cookie->ep, DCNT_EP_RECV_DATA, 
+				       cqe_p->byte_len);
+			return (OP_RECEIVE);
+		}
+	case IBV_WC_RECV_RDMA_WITH_IMM:
+		DAPL_CNTR(cookie->ep, DCNT_EP_RECV_RDMA_IMM);
+		DAPL_CNTR_DATA(cookie->ep, DCNT_EP_RECV_RDMA_IMM_DATA, 
+			       cqe_p->byte_len);
+		return (OP_RECEIVE_IMM);
+	default:
+		return (OP_INVALID);
+	}
+}
+
+#define DAPL_GET_CQE_OPTYPE(cqe_p) dapls_cqe_opcode(cqe_p)
+#define DAPL_GET_CQE_WRID(cqe_p) ((ib_work_completion_t*)cqe_p)->wr_id
+#define DAPL_GET_CQE_STATUS(cqe_p) ((ib_work_completion_t*)cqe_p)->status
+#define DAPL_GET_CQE_VENDOR_ERR(cqe_p) ((ib_work_completion_t*)cqe_p)->vendor_err
+#define DAPL_GET_CQE_BYTESNUM(cqe_p) ((ib_work_completion_t*)cqe_p)->byte_len
+#define DAPL_GET_CQE_IMMED_DATA(cqe_p) ((ib_work_completion_t*)cqe_p)->imm_data
+
+STATIC _INLINE_ char * dapls_dto_op_str(int op)
+{
+    static char *optable[] =
+    {
+        "OP_RDMA_WRITE",
+        "OP_RDMA_WRITE_IMM",
+        "OP_SEND",
+        "OP_SEND_IMM",
+        "OP_RDMA_READ",
+        "OP_COMP_AND_SWAP",
+        "OP_FETCH_AND_ADD",
+        "OP_RECEIVE",
+        "OP_RECEIVE_IMM",
+        "OP_BIND_MW"
+    };
+    return ((op < 0 || op > 9) ? "Invalid CQE OP?" : optable[op]);
+}
+
+static _INLINE_ char *
+dapls_cqe_op_str(IN ib_work_completion_t *cqe_ptr)
+{
+    return dapls_dto_op_str(DAPL_GET_CQE_OPTYPE(cqe_ptr));
+}
+
+#define DAPL_GET_CQE_OP_STR(cqe) dapls_cqe_op_str(cqe)
+
+#endif	/*  _DAPL_IB_DTO_H_ */
diff --git a/dapl/openib_cma/dapl_ib_extensions.c b/dapl/openib_cma/dapl_ib_extensions.c
new file mode 100755
index 0000000..3bcde58
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_extensions.c
@@ -0,0 +1,329 @@
+/*
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ib_extensions.c
+ *
+ * PURPOSE:  Extensions routines for OpenIB uCMA provider
+ *
+ * $Id: $
+ *
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_ib_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_cookie.h"
+#include <stdarg.h>
+
+DAT_RETURN
+dapli_post_ext(IN DAT_EP_HANDLE ep_handle,
+	       IN DAT_UINT64 cmp_add,
+	       IN DAT_UINT64 swap,
+	       IN DAT_UINT32 immed_data,
+	       IN DAT_COUNT segments,
+	       IN DAT_LMR_TRIPLET * local_iov,
+	       IN DAT_DTO_COOKIE user_cookie,
+	       IN const DAT_RMR_TRIPLET * remote_iov,
+	       IN int op_type, IN DAT_COMPLETION_FLAGS flags);
+
+/*
+ * dapl_extensions
+ *
+ * Process extension requests
+ *
+ * Input:
+ *	ext_type,
+ *	...
+ *
+ * Output:
+ * 	Depends....
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_NOT_IMPLEMENTED
+ *      .....
+ *
+ */
+DAT_RETURN
+dapl_extensions(IN DAT_HANDLE dat_handle,
+		IN DAT_EXTENDED_OP ext_op, IN va_list args)
+{
+	DAT_EP_HANDLE ep;
+	DAT_LMR_TRIPLET *lmr_p;
+	DAT_DTO_COOKIE cookie;
+	const DAT_RMR_TRIPLET *rmr_p;
+	DAT_UINT64 dat_uint64a, dat_uint64b;
+	DAT_UINT32 dat_uint32;
+	DAT_COUNT segments = 1;
+	DAT_COMPLETION_FLAGS comp_flags;
+	DAT_RETURN status = DAT_NOT_IMPLEMENTED;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_extensions(hdl %p operation %d, ...)\n",
+		     dat_handle, ext_op);
+
+	switch ((int)ext_op) {
+
+	case DAT_IB_RDMA_WRITE_IMMED_OP:
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     " WRITE_IMMED_DATA extension call\n");
+
+		ep = dat_handle;	/* ep_handle */
+		segments = va_arg(args, DAT_COUNT);	/* num segments */
+		lmr_p = va_arg(args, DAT_LMR_TRIPLET *);
+		cookie = va_arg(args, DAT_DTO_COOKIE);
+		rmr_p = va_arg(args, const DAT_RMR_TRIPLET *);
+		dat_uint32 = va_arg(args, DAT_UINT32);	/* immed data */
+		comp_flags = va_arg(args, DAT_COMPLETION_FLAGS);
+
+		status = dapli_post_ext(ep, 0, 0, dat_uint32, segments, lmr_p,
+					cookie, rmr_p, OP_RDMA_WRITE_IMM,
+					comp_flags);
+		break;
+
+	case DAT_IB_CMP_AND_SWAP_OP:
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     " CMP_AND_SWAP extension call\n");
+
+		ep = dat_handle;	/* ep_handle */
+		dat_uint64a = va_arg(args, DAT_UINT64);	/* cmp_value */
+		dat_uint64b = va_arg(args, DAT_UINT64);	/* swap_value */
+		lmr_p = va_arg(args, DAT_LMR_TRIPLET *);
+		cookie = va_arg(args, DAT_DTO_COOKIE);
+		rmr_p = va_arg(args, const DAT_RMR_TRIPLET *);
+		comp_flags = va_arg(args, DAT_COMPLETION_FLAGS);
+
+		status = dapli_post_ext(ep, dat_uint64a, dat_uint64b,
+					0, segments, lmr_p, cookie, rmr_p,
+					OP_COMP_AND_SWAP, comp_flags);
+		break;
+
+	case DAT_IB_FETCH_AND_ADD_OP:
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     " FETCH_AND_ADD extension call\n");
+
+		ep = dat_handle;	/* ep_handle */
+		dat_uint64a = va_arg(args, DAT_UINT64);	/* add value */
+		lmr_p = va_arg(args, DAT_LMR_TRIPLET *);
+		cookie = va_arg(args, DAT_DTO_COOKIE);
+		rmr_p = va_arg(args, const DAT_RMR_TRIPLET *);
+		comp_flags = va_arg(args, DAT_COMPLETION_FLAGS);
+
+		status = dapli_post_ext(ep, dat_uint64a, 0, 0, segments,
+					lmr_p, cookie, rmr_p,
+					OP_FETCH_AND_ADD, comp_flags);
+
+		break;
+
+#ifdef DAPL_COUNTERS
+	case DAT_QUERY_COUNTERS_OP:
+		{
+			int cntr, reset;
+			DAT_UINT64 *p_cntr_out;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+				     " Query counter extension call\n");
+
+			cntr = va_arg(args, int);
+			p_cntr_out = va_arg(args, DAT_UINT64 *);
+			reset = va_arg(args, int);
+
+			status = dapl_query_counter(dat_handle, cntr,
+						    p_cntr_out, reset);
+			break;
+		}
+	case DAT_PRINT_COUNTERS_OP:
+		{
+			int cntr, reset;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+				     " Print counter extension call\n");
+
+			cntr = va_arg(args, int);
+			reset = va_arg(args, int);
+
+			dapl_print_counter(dat_handle, cntr, reset);
+			status = DAT_SUCCESS;
+			break;
+		}
+#endif				/* DAPL_COUNTERS */
+
+	default:
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "unsupported extension(%d)\n", (int)ext_op);
+	}
+
+	return (status);
+}
+
+DAT_RETURN
+dapli_post_ext(IN DAT_EP_HANDLE ep_handle,
+	       IN DAT_UINT64 cmp_add,
+	       IN DAT_UINT64 swap,
+	       IN DAT_UINT32 immed_data,
+	       IN DAT_COUNT segments,
+	       IN DAT_LMR_TRIPLET * local_iov,
+	       IN DAT_DTO_COOKIE user_cookie,
+	       IN const DAT_RMR_TRIPLET * remote_iov,
+	       IN int op_type, IN DAT_COMPLETION_FLAGS flags)
+{
+	DAPL_EP *ep_ptr;
+	ib_qp_handle_t qp_ptr;
+	DAPL_COOKIE *cookie = NULL;
+	DAT_RETURN dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     " post_ext_op: ep %p cmp_val %d "
+		     "swap_val %d cookie 0x%x, r_iov %p, flags 0x%x\n",
+		     ep_handle, (unsigned)cmp_add, (unsigned)swap,
+		     (unsigned)user_cookie.as_64, remote_iov, flags);
+
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP))
+		return (DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP));
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+	qp_ptr = ep_ptr->qp_handle;
+
+	/*
+	 * Synchronization ok since this buffer is only used for send
+	 * requests, which aren't allowed to race with each other.
+	 */
+	dat_status = dapls_dto_cookie_alloc(&ep_ptr->req_buffer,
+					    DAPL_DTO_TYPE_EXTENSION,
+					    user_cookie, &cookie);
+	if (dat_status != DAT_SUCCESS)
+		goto bail;
+
+	/*
+	 * Take reference before posting to avoid race conditions with
+	 * completions
+	 */
+	dapl_os_atomic_inc(&ep_ptr->req_count);
+
+	/*
+	 * Invoke provider specific routine to post DTO
+	 */
+	dat_status = dapls_ib_post_ext_send(ep_ptr, op_type, cookie, segments,	/* data segments */
+					    local_iov, remote_iov, immed_data,	/* immed data */
+					    cmp_add,	/* compare or add */
+					    swap,	/* swap */
+					    flags);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_os_atomic_dec(&ep_ptr->req_count);
+		dapls_cookie_dealloc(&ep_ptr->req_buffer, cookie);
+	}
+
+      bail:
+	return dat_status;
+
+}
+
+/* 
+ * New provider routine to process extended DTO events 
+ */
+void
+dapls_cqe_to_event_extension(IN DAPL_EP * ep_ptr,
+			     IN DAPL_COOKIE * cookie,
+			     IN ib_work_completion_t * cqe_ptr,
+			     IN DAT_EVENT * event_ptr)
+{
+	uint32_t ibtype;
+	DAT_DTO_COMPLETION_EVENT_DATA *dto =
+	    &event_ptr->event_data.dto_completion_event_data;
+	DAT_IB_EXTENSION_EVENT_DATA *ext_data = (DAT_IB_EXTENSION_EVENT_DATA *)
+	    & event_ptr->event_extension_data[0];
+	DAT_DTO_COMPLETION_STATUS dto_status;
+
+	/* Get status from cqe */
+	dto_status = dapls_ib_get_dto_status(cqe_ptr);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+		     " cqe_to_event_ext: dto_ptr %p ext_ptr %p status %d\n",
+		     dto, ext_data, dto_status);
+
+	event_ptr->event_number = DAT_IB_DTO_EVENT;
+	dto->ep_handle = cookie->ep;
+	dto->user_cookie = cookie->val.dto.cookie;
+	dto->operation = DAPL_GET_CQE_DTOS_OPTYPE(cqe_ptr);	/* new for 2.0 */
+	dto->status = ext_data->status = dto_status;
+
+	if (dto_status != DAT_DTO_SUCCESS)
+		return;
+
+	/* 
+	 * Get operation type from CQ work completion entry and
+	 * if extented operation then set extended event data
+	 */
+	ibtype = DAPL_GET_CQE_OPTYPE(cqe_ptr);
+
+	switch (ibtype) {
+
+	case OP_RDMA_WRITE_IMM:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: OP_RDMA_WRITE_IMMED\n");
+
+		/* type and outbound rdma write transfer size */
+		dto->transfered_length = cookie->val.dto.size;
+		ext_data->type = DAT_IB_RDMA_WRITE_IMMED;
+		break;
+	case OP_RECEIVE_IMM:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: OP_RECEIVE_RDMA_IMMED\n");
+
+		/* immed recvd, type and inbound rdma write transfer size */
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		ext_data->type = DAT_IB_RDMA_WRITE_IMMED_DATA;
+		ext_data->val.immed.data = DAPL_GET_CQE_IMMED_DATA(cqe_ptr);
+		break;
+	case OP_COMP_AND_SWAP:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: COMP_AND_SWAP_RESP\n");
+
+		/* original data is returned in LMR provided with post */
+		ext_data->type = DAT_IB_CMP_AND_SWAP;
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		break;
+	case OP_FETCH_AND_ADD:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: FETCH_AND_ADD_RESP\n");
+
+		/* original data is returned in LMR provided with post */
+		ext_data->type = DAT_IB_FETCH_AND_ADD;
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		break;
+	default:
+		/* not extended operation */
+		ext_data->status = DAT_IB_OP_ERR;
+		dto->status = DAT_DTO_ERR_TRANSPORT;
+		break;
+	}
+}
diff --git a/dapl/openib_cma/dapl_ib_mem.c b/dapl/openib_cma/dapl_ib_mem.c
new file mode 100755
index 0000000..7e73044
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_mem.c
@@ -0,0 +1,380 @@
+/*
+ * Copyright (c) 2005-2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ib_mem.c
+ *
+ * PURPOSE: Memory windows, registration, and protection domain 
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_lmr_util.h"
+
+/*
+ * dapls_convert_privileges
+ *
+ * Convert LMR privileges to provider  
+ *
+ * Input:
+ *	DAT_MEM_PRIV_FLAGS
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	ibv_access_flags
+ *
+ */
+STATIC _INLINE_ int dapls_convert_privileges(IN DAT_MEM_PRIV_FLAGS privileges)
+{
+	int access = 0;
+
+	/*
+	 * if (DAT_MEM_PRIV_LOCAL_READ_FLAG & privileges) do nothing
+	 */
+	if (DAT_MEM_PRIV_LOCAL_WRITE_FLAG & privileges)
+		access |= IBV_ACCESS_LOCAL_WRITE;
+	if (DAT_MEM_PRIV_REMOTE_WRITE_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_WRITE;
+	if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_READ;
+	if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_READ;
+	if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_READ;
+#ifdef DAT_EXTENSIONS
+	if (DAT_IB_MEM_PRIV_REMOTE_ATOMIC & privileges)
+		access |= IBV_ACCESS_REMOTE_ATOMIC;
+#endif
+
+	return access;
+}
+
+/*
+ * dapl_ib_pd_alloc
+ *
+ * Alloc a PD
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	pz		pointer to PZ struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN dapls_ib_pd_alloc(IN DAPL_IA * ia_ptr, IN DAPL_PZ * pz)
+{
+	/* get a protection domain */
+	pz->pd_handle = ibv_alloc_pd(ia_ptr->hca_ptr->ib_hca_handle);
+	if (!pz->pd_handle)
+		return (dapl_convert_errno(ENOMEM, "alloc_pd"));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " pd_alloc: pd_handle=%p\n", pz->pd_handle);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_pd_free
+ *
+ * Free a PD
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	PZ_ptr		pointer to PZ struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *      DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN dapls_ib_pd_free(IN DAPL_PZ * pz)
+{
+	if (pz->pd_handle != IB_INVALID_HANDLE) {
+		if (ibv_dealloc_pd(pz->pd_handle))
+			return (dapl_convert_errno(errno, "dealloc_pd"));
+		pz->pd_handle = IB_INVALID_HANDLE;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_mr_register
+ *
+ * Register a virtual memory region
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	lmr		pointer to dapl_lmr struct
+ *	virt_addr	virtual address of beginning of mem region
+ *	length		length of memory region
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mr_register(IN DAPL_IA * ia_ptr,
+		     IN DAPL_LMR * lmr,
+		     IN DAT_PVOID virt_addr,
+		     IN DAT_VLEN length,
+		     IN DAT_MEM_PRIV_FLAGS privileges, IN DAT_VA_TYPE va_type)
+{
+	ib_pd_handle_t ib_pd_handle;
+
+	ib_pd_handle = ((DAPL_PZ *) lmr->param.pz_handle)->pd_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " mr_register: ia=%p, lmr=%p va=%p ln=%d pv=0x%x\n",
+		     ia_ptr, lmr, virt_addr, length, privileges);
+
+	/* TODO: shared memory */
+	if (lmr->param.mem_type == DAT_MEM_TYPE_SHARED_VIRTUAL) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " mr_register_shared: NOT IMPLEMENTED\n");
+		return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+	}
+
+	/* IB verbs does not support */
+	if (va_type == DAT_VA_TYPE_ZB) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " va_type == DAT_VA_TYPE_ZB: NOT SUPPORTED\n");
+		return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+	}
+
+	/* local read is default on IB */
+	lmr->mr_handle =
+	    ibv_reg_mr(((DAPL_PZ *) lmr->param.pz_handle)->pd_handle,
+		       virt_addr, length, dapls_convert_privileges(privileges));
+
+	if (!lmr->mr_handle)
+		return (dapl_convert_errno(ENOMEM, "reg_mr"));
+
+	lmr->param.lmr_context = lmr->mr_handle->lkey;
+	lmr->param.rmr_context = lmr->mr_handle->rkey;
+	lmr->param.registered_size = length;
+	lmr->param.registered_address = (DAT_VADDR) (uintptr_t) virt_addr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " mr_register: mr=%p addr=%p pd %p ctx %p "
+		     "lkey=0x%x rkey=0x%x priv=%x\n",
+		     lmr->mr_handle, lmr->mr_handle->addr,
+		     lmr->mr_handle->pd, lmr->mr_handle->context,
+		     lmr->mr_handle->lkey, lmr->mr_handle->rkey,
+		     length, dapls_convert_privileges(privileges));
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_mr_deregister
+ *
+ * Free a memory region
+ *
+ * Input:
+ *	lmr			pointer to dapl_lmr struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN dapls_ib_mr_deregister(IN DAPL_LMR * lmr)
+{
+	if (lmr->mr_handle != IB_INVALID_HANDLE) {
+		if (ibv_dereg_mr(lmr->mr_handle))
+			return (dapl_convert_errno(errno, "dereg_pd"));
+		lmr->mr_handle = IB_INVALID_HANDLE;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_mr_register_shared
+ *
+ * Register a virtual memory region
+ *
+ * Input:
+ *	ia_ptr		IA handle
+ *	lmr		pointer to dapl_lmr struct
+ *	virt_addr	virtual address of beginning of mem region
+ *	length		length of memory region
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mr_register_shared(IN DAPL_IA * ia_ptr,
+			    IN DAPL_LMR * lmr,
+			    IN DAT_MEM_PRIV_FLAGS privileges,
+			    IN DAT_VA_TYPE va_type)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+		     " mr_register_shared: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_alloc
+ *
+ * Bind a protection domain to a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN dapls_ib_mw_alloc(IN DAPL_RMR * rmr)
+{
+
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_alloc: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_free
+ *
+ * Release bindings of a protection domain to a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN dapls_ib_mw_free(IN DAPL_RMR * rmr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_free: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_bind
+ *
+ * Bind a protection domain to a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER;
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mw_bind(IN DAPL_RMR * rmr,
+		 IN DAPL_LMR * lmr,
+		 IN DAPL_EP * ep,
+		 IN DAPL_COOKIE * cookie,
+		 IN DAT_VADDR virtual_address,
+		 IN DAT_VLEN length,
+		 IN DAT_MEM_PRIV_FLAGS mem_priv, IN DAT_BOOLEAN is_signaled)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_bind: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_unbind
+ *
+ * Unbind a protection domain from a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *    	DAT_INVALID_PARAMETER;
+ *   	DAT_INVALID_STATE;
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mw_unbind(IN DAPL_RMR * rmr,
+		   IN DAPL_EP * ep,
+		   IN DAPL_COOKIE * cookie, IN DAT_BOOLEAN is_signaled)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_unbind: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_cma/dapl_ib_qp.c b/dapl/openib_cma/dapl_ib_qp.c
new file mode 100755
index 0000000..c9a61c3
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_qp.c
@@ -0,0 +1,331 @@
+/*
+ * Copyright (c) 2005-2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ib_qp.c
+ *
+ * PURPOSE: QP routines for access to OFED IB Verbs
+ *
+ * $Id: $
+ *
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+extern struct rdma_event_channel *g_cm_events;
+
+/*
+ * dapl_ib_qp_alloc
+ *
+ * Alloc a QP
+ *
+ * Input:
+ *	*ep_ptr		pointer to EP INFO
+ *	ib_hca_handle	provider HCA handle
+ *	ib_pd_handle	provider protection domain handle
+ *	cq_recv		provider recv CQ handle
+ *	cq_send		provider send CQ handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INTERNAL_ERROR
+ *
+ */
+DAT_RETURN dapls_ib_qp_alloc(IN DAPL_IA * ia_ptr,
+			     IN DAPL_EP * ep_ptr, IN DAPL_EP * ep_ctx_ptr)
+{
+	DAT_EP_ATTR *attr;
+	DAPL_EVD *rcv_evd, *req_evd;
+	ib_cq_handle_t rcv_cq, req_cq;
+	ib_pd_handle_t ib_pd_handle;
+	struct ibv_qp_init_attr qp_create;
+	dp_ib_cm_handle_t conn;
+	struct rdma_cm_id *cm_id;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " qp_alloc: ia_ptr %p ep_ptr %p ep_ctx_ptr %p\n",
+		     ia_ptr, ep_ptr, ep_ctx_ptr);
+
+	attr = &ep_ptr->param.ep_attr;
+	ib_pd_handle = ((DAPL_PZ *) ep_ptr->param.pz_handle)->pd_handle;
+	rcv_evd = (DAPL_EVD *) ep_ptr->param.recv_evd_handle;
+	req_evd = (DAPL_EVD *) ep_ptr->param.request_evd_handle;
+
+	/* 
+	 * DAT allows usage model of EP's with no EVD's but IB does not. 
+	 * Create a CQ with zero entries under the covers to support and 
+	 * catch any invalid posting. 
+	 */
+	if (rcv_evd != DAT_HANDLE_NULL)
+		rcv_cq = rcv_evd->ib_cq_handle;
+	else if (!ia_ptr->hca_ptr->ib_trans.ib_cq_empty)
+		rcv_cq = ia_ptr->hca_ptr->ib_trans.ib_cq_empty;
+	else {
+		struct ibv_comp_channel *channel =
+		    ia_ptr->hca_ptr->ib_trans.ib_cq;
+#ifdef CQ_WAIT_OBJECT
+		if (rcv_evd->cq_wait_obj_handle)
+			channel = rcv_evd->cq_wait_obj_handle->events;
+#endif
+		/* Call IB verbs to create CQ */
+		rcv_cq = ibv_create_cq(ia_ptr->hca_ptr->ib_hca_handle,
+				       0, NULL, channel, 0);
+
+		if (rcv_cq == IB_INVALID_HANDLE)
+			return (dapl_convert_errno(ENOMEM, "create_cq"));
+
+		ia_ptr->hca_ptr->ib_trans.ib_cq_empty = rcv_cq;
+	}
+	if (req_evd != DAT_HANDLE_NULL)
+		req_cq = req_evd->ib_cq_handle;
+	else
+		req_cq = ia_ptr->hca_ptr->ib_trans.ib_cq_empty;
+
+	/* 
+	 * IMPLEMENTATION NOTE:
+	 * uDAPL allows consumers to post buffers on the EP after creation
+	 * and before a connect request (outbound and inbound). This forces
+	 * a binding to a device during the hca_open call and requires the
+	 * consumer to predetermine which device to listen on or connect from.
+	 * This restriction eliminates any option of listening or connecting 
+	 * over multiple devices. uDAPL should add API's to resolve addresses 
+	 * and bind to the device at the approriate time (before connect 
+	 * and after CR arrives). Discovery should happen at connection time 
+	 * based on addressing and not on static configuration during open.
+	 */
+
+	/* Allocate CM and initialize lock */
+	if ((conn = dapl_os_alloc(sizeof(*conn))) == NULL)
+		return (dapl_convert_errno(ENOMEM, "create_cq"));
+
+	dapl_os_memzero(conn, sizeof(*conn));
+	dapl_os_lock_init(&conn->lock);
+
+	/* create CM_ID, bind to local device, create QP */
+	if (rdma_create_id(g_cm_events, &cm_id, (void *)conn, RDMA_PS_TCP)) {
+		dapl_os_free(conn, sizeof(*conn));
+		return (dapl_convert_errno(errno, "create_qp"));
+	}
+
+	/* open identifies the local device; per DAT specification */
+	if (rdma_bind_addr(cm_id,
+			   (struct sockaddr *)&ia_ptr->hca_ptr->hca_address))
+		goto bail;
+
+	/* Setup attributes and create qp */
+	dapl_os_memzero((void *)&qp_create, sizeof(qp_create));
+	qp_create.cap.max_send_wr = attr->max_request_dtos;
+	qp_create.cap.max_send_sge = attr->max_request_iov;
+	qp_create.cap.max_inline_data =
+	    ia_ptr->hca_ptr->ib_trans.max_inline_send;
+	qp_create.send_cq = req_cq;
+
+	/* ibv assumes rcv_cq is never NULL, set to req_cq */
+	if (rcv_cq == NULL) {
+		qp_create.recv_cq = req_cq;
+		qp_create.cap.max_recv_wr = 0;
+		qp_create.cap.max_recv_sge = 0;
+	} else {
+		qp_create.recv_cq = rcv_cq;
+		qp_create.cap.max_recv_wr = attr->max_recv_dtos;
+		qp_create.cap.max_recv_sge = attr->max_recv_iov;
+	}
+	qp_create.qp_type = IBV_QPT_RC;
+	qp_create.qp_context = (void *)ep_ptr;
+
+	/* Let uCMA transition QP states */
+	if (rdma_create_qp(cm_id, ib_pd_handle, &qp_create))
+		goto bail;
+
+	conn->cm_id = cm_id;
+	conn->ep = ep_ptr;
+	conn->hca = ia_ptr->hca_ptr;
+
+	/* setup timers for address and route resolution */
+	conn->arp_timeout = dapl_os_get_env_val("DAPL_CM_ARP_TIMEOUT_MS",
+						IB_ARP_TIMEOUT);
+	conn->arp_retries = dapl_os_get_env_val("DAPL_CM_ARP_RETRY_COUNT",
+						IB_ARP_RETRY_COUNT);
+	conn->route_timeout = dapl_os_get_env_val("DAPL_CM_ROUTE_TIMEOUT_MS",
+						  IB_ROUTE_TIMEOUT);
+	conn->route_retries = dapl_os_get_env_val("DAPL_CM_ROUTE_RETRY_COUNT",
+						  IB_ROUTE_RETRY_COUNT);
+
+	/* setup up ep->param to reference the bound local address and port */
+	ep_ptr->param.local_ia_address_ptr = &cm_id->route.addr.src_addr;
+	ep_ptr->param.local_port_qual = rdma_get_src_port(cm_id);
+
+	ep_ptr->qp_handle = conn;
+	ep_ptr->qp_state = IB_QP_STATE_INIT;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " qp_alloc: qpn %p sq %d,%d rq %d,%d port=%d\n",
+		     ep_ptr->qp_handle->cm_id->qp->qp_num,
+		     qp_create.cap.max_send_wr, qp_create.cap.max_send_sge,
+		     qp_create.cap.max_recv_wr, qp_create.cap.max_recv_sge,
+		     ep_ptr->param.local_port_qual);
+
+	return DAT_SUCCESS;
+      bail:
+	rdma_destroy_id(cm_id);
+	dapl_os_free(conn, sizeof(*conn));
+	return (dapl_convert_errno(errno, "create_qp"));
+}
+
+/*
+ * dapl_ib_qp_free
+ *
+ * Free a QP
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	*ep_ptr		pointer to EP INFO
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *  dapl_convert_errno
+ *
+ */
+DAT_RETURN dapls_ib_qp_free(IN DAPL_IA * ia_ptr, IN DAPL_EP * ep_ptr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " qp_free:  ep_ptr %p qp %p\n",
+		     ep_ptr, ep_ptr->qp_handle);
+
+	if (ep_ptr->qp_handle != IB_INVALID_HANDLE) {
+		/* qp_handle is conn object with reference to cm_id and qp */
+		dapli_destroy_conn(ep_ptr->qp_handle);
+		ep_ptr->qp_handle = IB_INVALID_HANDLE;
+		ep_ptr->qp_state = IB_QP_STATE_ERROR;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_qp_modify
+ *
+ * Set the QP to the parameters specified in an EP_PARAM
+ *
+ * The EP_PARAM structure that is provided has been
+ * sanitized such that only non-zero values are valid.
+ *
+ * Input:
+ *	ib_hca_handle		HCA handle
+ *	qp_handle		QP handle
+ *	ep_attr		        Sanitized EP Params
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN dapls_ib_qp_modify(IN DAPL_IA * ia_ptr,
+			      IN DAPL_EP * ep_ptr, IN DAT_EP_ATTR * attr)
+{
+	struct ibv_qp_attr qp_attr;
+
+	if (ep_ptr->qp_handle == IB_INVALID_HANDLE)
+		return DAT_INVALID_PARAMETER;
+
+	/*
+	 * Check if we have the right qp_state to modify attributes
+	 */
+	if ((ep_ptr->qp_handle->cm_id->qp->state != IBV_QPS_RTR) &&
+	    (ep_ptr->qp_handle->cm_id->qp->state != IBV_QPS_RTS))
+		return DAT_INVALID_STATE;
+
+	/* Adjust to current EP attributes */
+	dapl_os_memzero((void *)&qp_attr, sizeof(qp_attr));
+	qp_attr.cap.max_send_wr = attr->max_request_dtos;
+	qp_attr.cap.max_recv_wr = attr->max_recv_dtos;
+	qp_attr.cap.max_send_sge = attr->max_request_iov;
+	qp_attr.cap.max_recv_sge = attr->max_recv_iov;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     "modify_qp: qp %p sq %d,%d, rq %d,%d\n",
+		     ep_ptr->qp_handle->cm_id->qp,
+		     qp_attr.cap.max_send_wr, qp_attr.cap.max_send_sge,
+		     qp_attr.cap.max_recv_wr, qp_attr.cap.max_recv_sge);
+
+	if (ibv_modify_qp(ep_ptr->qp_handle->cm_id->qp, &qp_attr, IBV_QP_CAP)) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "modify_qp: modify ep %p qp %p failed\n",
+			     ep_ptr, ep_ptr->qp_handle->cm_id->qp);
+		return (dapl_convert_errno(errno, "modify_qp_state"));
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_reinit_ep
+ *
+ * Move the QP to INIT state again.
+ *
+ * Input:
+ *	ep_ptr		DAPL_EP
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	void
+ *
+ */
+void dapls_ib_reinit_ep(IN DAPL_EP * ep_ptr)
+{
+	/* uCMA does not allow reuse of CM_ID, destroy and create new one */
+	if (ep_ptr->qp_handle != IB_INVALID_HANDLE) {
+
+		/* destroy */
+		dapli_destroy_conn(ep_ptr->qp_handle);
+
+		/* create new CM_ID and QP */
+		ep_ptr->qp_handle = IB_INVALID_HANDLE;
+		dapls_ib_qp_alloc(ep_ptr->header.owner_ia, ep_ptr, ep_ptr);
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_cma/dapl_ib_util.c b/dapl/openib_cma/dapl_ib_util.c
new file mode 100755
index 0000000..3b83ab8
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_util.c
@@ -0,0 +1,1094 @@
+/*
+ * Copyright (c) 2005-2008 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ib_util.c
+ *
+ * PURPOSE: OFED provider - init, open, close, utilities, work thread
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#ifdef RCSID
+static const char rcsid[] = "$Id:  $";
+#endif
+
+#include "openib_osd.h"
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ib_util.h"
+#include "dapl_osd.h"
+
+#include <stdlib.h>
+
+int g_dapl_loopback_connection = 0;
+struct rdma_event_channel *g_cm_events = NULL;
+ib_thread_state_t g_ib_thread_state = 0;
+DAPL_OS_THREAD g_ib_thread;
+DAPL_OS_LOCK g_hca_lock;
+struct dapl_llist_entry *g_hca_list;
+
+#if defined(_WIN64) || defined(_WIN32)
+#include "..\..\..\..\..\etc\user\comp_channel.cpp"
+#include "..\..\..\..\..\etc\user\dlist.c"
+
+#define getipaddr_netdev(x,y,z) -1
+struct ibvw_windata windata;
+
+static int dapls_os_init(void)
+{
+	return ibvw_get_windata(&windata, IBVW_WINDATA_VERSION);
+}
+
+static void dapls_os_release(void)
+{
+	if (windata.comp_mgr)
+		ibvw_release_windata(&windata, IBVW_WINDATA_VERSION);
+	windata.comp_mgr = NULL;
+}
+
+static int dapls_config_comp_channel(struct ibv_comp_channel *channel)
+{
+	channel->comp_channel.Milliseconds = 0;
+	return 0;
+}
+
+static int dapls_config_cm_channel(struct rdma_event_channel *channel)
+{
+	channel->channel.Milliseconds = 0;
+	return 0;
+}
+
+static int dapls_config_verbs(struct ibv_context *verbs)
+{
+	verbs->channel.Milliseconds = 0;
+	return 0;
+}
+
+static int dapls_thread_signal(void)
+{
+	CompManagerCancel(windata.comp_mgr);
+	return 0;
+}
+#else				// _WIN64 || WIN32
+int g_ib_pipe[2];
+
+static int dapls_os_init(void)
+{
+	/* create pipe for waking up work thread */
+	return pipe(g_ib_pipe);
+}
+
+static void dapls_os_release(void)
+{
+	/* close pipe? */
+}
+
+/* Get IP address using network device name */
+static int getipaddr_netdev(char *name, char *addr, int addr_len)
+{
+	struct ifreq ifr;
+	int skfd, ret, len;
+
+	/* Fill in the structure */
+	snprintf(ifr.ifr_name, IFNAMSIZ, "%s", name);
+	ifr.ifr_hwaddr.sa_family = ARPHRD_INFINIBAND;
+
+	/* Create a socket fd */
+	skfd = socket(PF_INET, SOCK_STREAM, 0);
+	ret = ioctl(skfd, SIOCGIFADDR, &ifr);
+	if (ret)
+		goto bail;
+
+	switch (ifr.ifr_addr.sa_family) {
+#ifdef	AF_INET6
+	case AF_INET6:
+		len = sizeof(struct sockaddr_in6);
+		break;
+#endif
+	case AF_INET:
+	default:
+		len = sizeof(struct sockaddr);
+		break;
+	}
+
+	if (len <= addr_len)
+		memcpy(addr, &ifr.ifr_addr, len);
+	else
+		ret = EINVAL;
+
+      bail:
+	close(skfd);
+	return ret;
+}
+
+static int dapls_config_fd(int fd)
+{
+	int opts;
+
+	opts = fcntl(fd, F_GETFL);
+	if (opts < 0 || fcntl(fd, F_SETFL, opts | O_NONBLOCK) < 0) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " dapls_config_fd: fcntl on fd %d ERR %d %s\n",
+			 fd, opts, strerror(errno));
+		return errno;
+	}
+
+	return 0;
+}
+
+static int dapls_config_comp_channel(struct ibv_comp_channel *channel)
+{
+	return dapls_config_fd(channel->fd);
+}
+
+static int dapls_config_cm_channel(struct rdma_event_channel *channel)
+{
+	return dapls_config_fd(channel->fd);
+}
+
+static int dapls_config_verbs(struct ibv_context *verbs)
+{
+	return dapls_config_fd(verbs->async_fd);
+}
+
+static int dapls_thread_signal(void)
+{
+	return write(g_ib_pipe[1], "w", sizeof "w");
+}
+#endif
+
+/* Get IP address using network name, address, or device name */
+static int getipaddr(char *name, char *addr, int len)
+{
+	struct addrinfo *res;
+
+	/* assume netdev for first attempt, then network and address type */
+	if (getipaddr_netdev(name, addr, len)) {
+		if (getaddrinfo(name, NULL, NULL, &res)) {
+			dapl_log(DAPL_DBG_TYPE_ERR,
+				 " open_hca: getaddr_netdev ERROR:"
+				 " %s. Is %s configured?\n",
+				 strerror(errno), name);
+			return 1;
+		} else {
+			if (len >= res->ai_addrlen)
+				memcpy(addr, res->ai_addr, res->ai_addrlen);
+			else {
+				freeaddrinfo(res);
+				return 1;
+			}
+			freeaddrinfo(res);
+		}
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " getipaddr: family %d port %d addr %d.%d.%d.%d\n",
+		     ((struct sockaddr_in *)addr)->sin_family,
+		     ((struct sockaddr_in *)addr)->sin_port,
+		     ((struct sockaddr_in *)addr)->sin_addr.s_addr >> 0 & 0xff,
+		     ((struct sockaddr_in *)addr)->sin_addr.s_addr >> 8 & 0xff,
+		     ((struct sockaddr_in *)addr)->sin_addr.s_addr >> 16 & 0xff,
+		     ((struct sockaddr_in *)addr)->sin_addr.
+		     s_addr >> 24 & 0xff);
+
+	return 0;
+}
+
+/*
+ * dapls_ib_init, dapls_ib_release
+ *
+ * Initialize Verb related items for device open
+ *
+ * Input:
+ * 	none
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ * 	0 success, -1 error
+ *
+ */
+int32_t dapls_ib_init(void)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " dapl_ib_init: \n");
+
+	/* initialize hca_list lock */
+	dapl_os_lock_init(&g_hca_lock);
+
+	/* initialize hca list for CQ events */
+	dapl_llist_init_head(&g_hca_list);
+
+	if (dapls_os_init())
+		return 1;
+
+	return 0;
+}
+
+int32_t dapls_ib_release(void)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " dapl_ib_release: \n");
+	dapli_ib_thread_destroy();
+	if (g_cm_events != NULL)
+		rdma_destroy_event_channel(g_cm_events);
+	dapls_os_release();
+	return 0;
+}
+
+/*
+ * dapls_ib_open_hca
+ *
+ * Open HCA
+ *
+ * Input:
+ *      *hca_name         pointer to provider device name
+ *      *ib_hca_handle_p  pointer to provide HCA handle
+ *
+ * Output:
+ *      none
+ *
+ * Return:
+ *      DAT_SUCCESS
+ *      dapl_convert_errno
+ *
+ */
+DAT_RETURN dapls_ib_open_hca(IN IB_HCA_NAME hca_name, IN DAPL_HCA * hca_ptr)
+{
+	struct rdma_cm_id *cm_id = NULL;
+	union ibv_gid *gid;
+	int ret;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " open_hca: %s - %p\n", hca_name, hca_ptr);
+
+	/* Setup the global cm event channel */
+	dapl_os_lock(&g_hca_lock);
+	if (g_cm_events == NULL) {
+		g_cm_events = rdma_create_event_channel();
+		if (g_cm_events == NULL) {
+			dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+				     " open_hca: ERR - RDMA channel %s\n",
+				     strerror(errno));
+			return DAT_INTERNAL_ERROR;
+		}
+	}
+	dapl_os_unlock(&g_hca_lock);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " open_hca: RDMA channel created (%p)\n", g_cm_events);
+
+	dat_status = dapli_ib_thread_init();
+	if (dat_status != DAT_SUCCESS)
+		return dat_status;
+
+	/* HCA name will be hostname or IP address */
+	if (getipaddr((char *)hca_name,
+		      (char *)&hca_ptr->hca_address, sizeof(DAT_SOCK_ADDR6)))
+		return DAT_INVALID_ADDRESS;
+
+	/* cm_id will bind local device/GID based on IP address */
+	if (rdma_create_id(g_cm_events, &cm_id, (void *)hca_ptr, RDMA_PS_TCP)) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: rdma_create_id ERR %s\n", strerror(errno));
+		return DAT_INTERNAL_ERROR;
+	}
+	ret = rdma_bind_addr(cm_id, (struct sockaddr *)&hca_ptr->hca_address);
+	if ((ret) || (cm_id->verbs == NULL)) {
+		rdma_destroy_id(cm_id);
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: rdma_bind ERR %s."
+			 " Is %s configured?\n", strerror(errno), hca_name);
+		return DAT_INVALID_ADDRESS;
+	}
+
+	/* keep reference to IB device and cm_id */
+	hca_ptr->ib_trans.cm_id = cm_id;
+	hca_ptr->ib_hca_handle = cm_id->verbs;
+	dapls_config_verbs(cm_id->verbs);
+	hca_ptr->port_num = cm_id->port_num;
+	gid = &cm_id->route.addr.addr.ibaddr.sgid;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " open_hca: ctx=%p port=%d GID subnet %016llx id %016llx\n",
+		     cm_id->verbs, cm_id->port_num,
+		     (unsigned long long)ntohll(gid->global.subnet_prefix),
+		     (unsigned long long)ntohll(gid->global.interface_id));
+
+	/* set inline max with env or default, get local lid and gid 0 */
+	if (hca_ptr->ib_hca_handle->device->transport_type
+	    == IBV_TRANSPORT_IWARP)
+		hca_ptr->ib_trans.max_inline_send =
+		    dapl_os_get_env_val("DAPL_MAX_INLINE",
+					INLINE_SEND_IWARP_DEFAULT);
+	else
+		hca_ptr->ib_trans.max_inline_send =
+		    dapl_os_get_env_val("DAPL_MAX_INLINE",
+					INLINE_SEND_IB_DEFAULT);
+
+	/* set CM timer defaults */
+	hca_ptr->ib_trans.max_cm_timeout =
+	    dapl_os_get_env_val("DAPL_MAX_CM_RESPONSE_TIME",
+				IB_CM_RESPONSE_TIMEOUT);
+	hca_ptr->ib_trans.max_cm_retries =
+	    dapl_os_get_env_val("DAPL_MAX_CM_RETRIES", IB_CM_RETRIES);
+
+	/* EVD events without direct CQ channels, non-blocking */
+	hca_ptr->ib_trans.ib_cq =
+	    ibv_create_comp_channel(hca_ptr->ib_hca_handle);
+	if (hca_ptr->ib_trans.ib_cq == NULL) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: ibv_create_comp_channel ERR %s\n",
+			 strerror(errno));
+		goto bail;
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " open_hca: CQ channel created\n");
+
+	if (dapls_config_comp_channel(hca_ptr->ib_trans.ib_cq)) {
+		goto bail;
+	}
+
+	/* 
+	 * Put new hca_transport on list for async and CQ event processing 
+	 * Wakeup work thread to add to polling list
+	 */
+	dapl_llist_init_entry((DAPL_LLIST_ENTRY *) & hca_ptr->ib_trans.entry);
+	dapl_os_lock(&g_hca_lock);
+	dapl_llist_add_tail(&g_hca_list,
+			    (DAPL_LLIST_ENTRY *) & hca_ptr->ib_trans.entry,
+			    &hca_ptr->ib_trans.entry);
+	if (dapls_thread_signal() == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " open_hca: thread wakeup error = %s\n",
+			 strerror(errno));
+	dapl_os_unlock(&g_hca_lock);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " open_hca: %s, %s %d.%d.%d.%d INLINE_MAX=%d\n", hca_name,
+		     ((struct sockaddr_in *)
+		      &hca_ptr->hca_address)->sin_family == AF_INET ?
+		     "AF_INET" : "AF_INET6", ((struct sockaddr_in *)
+					      &hca_ptr->hca_address)->sin_addr.
+		     s_addr >> 0 & 0xff, ((struct sockaddr_in *)
+					  &hca_ptr->hca_address)->sin_addr.
+		     s_addr >> 8 & 0xff, ((struct sockaddr_in *)
+					  &hca_ptr->hca_address)->sin_addr.
+		     s_addr >> 16 & 0xff, ((struct sockaddr_in *)
+					   &hca_ptr->hca_address)->sin_addr.
+		     s_addr >> 24 & 0xff, hca_ptr->ib_trans.max_inline_send);
+
+	hca_ptr->ib_trans.d_hca = hca_ptr;
+	return DAT_SUCCESS;
+      bail:
+	rdma_destroy_id(hca_ptr->ib_trans.cm_id);
+	hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
+	return DAT_INTERNAL_ERROR;
+}
+
+/*
+ * dapls_ib_close_hca
+ *
+ * Open HCA
+ *
+ * Input:
+ *      DAPL_HCA   provide CA handle
+ *
+ * Output:
+ *      none
+ *
+ * Return:
+ *      DAT_SUCCESS
+ *	dapl_convert_errno 
+ *
+ */
+DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " close_hca: %p->%p\n",
+		     hca_ptr, hca_ptr->ib_hca_handle);
+
+	if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {
+		if (rdma_destroy_id(hca_ptr->ib_trans.cm_id))
+			return (dapl_convert_errno(errno, "ib_close_device"));
+		hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
+	}
+
+	dapl_os_lock(&g_hca_lock);
+	if (g_ib_thread_state != IB_THREAD_RUN) {
+		dapl_os_unlock(&g_hca_lock);
+		goto bail;
+	}
+	dapl_os_unlock(&g_hca_lock);
+
+	/* 
+	 * Remove hca from async and CQ event processing list
+	 * Wakeup work thread to remove from polling list
+	 */
+	hca_ptr->ib_trans.destroy = 1;
+	if (dapls_thread_signal() == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " destroy: thread wakeup error = %s\n",
+			 strerror(errno));
+
+	/* wait for thread to remove HCA references */
+	while (hca_ptr->ib_trans.destroy != 2) {
+		if (dapls_thread_signal() == -1)
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " destroy: thread wakeup error = %s\n",
+				 strerror(errno));
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " ib_thread_destroy: wait on hca %p destroy\n");
+		dapl_os_sleep_usec(10000);
+	}
+      bail:
+	return (DAT_SUCCESS);
+}
+
+/*
+ * dapls_ib_query_hca
+ *
+ * Query the hca attribute
+ *
+ * Input:
+ *	hca_handl		hca handle	
+ *	ia_attr			attribute of the ia
+ *	ep_attr			attribute of the ep
+ *	ip_addr			ip address of DET NIC
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ */
+
+DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA * hca_ptr,
+			      OUT DAT_IA_ATTR * ia_attr,
+			      OUT DAT_EP_ATTR * ep_attr,
+			      OUT DAT_SOCK_ADDR6 * ip_addr)
+{
+	struct ibv_device_attr dev_attr;
+	struct ibv_port_attr port_attr;
+
+	if (hca_ptr->ib_hca_handle == NULL) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR, " query_hca: BAD handle\n");
+		return (DAT_INVALID_HANDLE);
+	}
+
+	/* local IP address of device, set during ia_open */
+	if (ip_addr != NULL)
+		memcpy(ip_addr, &hca_ptr->hca_address, sizeof(DAT_SOCK_ADDR6));
+
+	if (ia_attr == NULL && ep_attr == NULL)
+		return DAT_SUCCESS;
+
+	/* query verbs for this device and port attributes */
+	if (ibv_query_device(hca_ptr->ib_hca_handle, &dev_attr) ||
+	    ibv_query_port(hca_ptr->ib_hca_handle,
+			   hca_ptr->port_num, &port_attr))
+		return (dapl_convert_errno(errno, "ib_query_hca"));
+
+	/*
+	 * There is no query for inline data so there is no way to 
+	 * calculate the impact on sge nor the max inline send. Most 
+	 * implementions consume 1 or none so just reduce by 1 until 
+	 * we are provided with a query mechanism from verbs.
+	 */
+	if (hca_ptr->ib_trans.max_inline_send)
+		dev_attr.max_sge--;
+
+	if (ia_attr != NULL) {
+		(void)dapl_os_memzero(ia_attr, sizeof(*ia_attr));
+		ia_attr->adapter_name[DAT_NAME_MAX_LENGTH - 1] = '\0';
+		ia_attr->vendor_name[DAT_NAME_MAX_LENGTH - 1] = '\0';
+		ia_attr->ia_address_ptr =
+		    (DAT_IA_ADDRESS_PTR) & hca_ptr->hca_address;
+
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 "dapl_query_hca: %s %s %s\n", hca_ptr->name,
+			 ((struct sockaddr_in *)
+			  ia_attr->ia_address_ptr)->sin_family == AF_INET ?
+			 "AF_INET" : "AF_INET6",
+			 inet_ntoa(((struct sockaddr_in *)
+				    ia_attr->ia_address_ptr)->sin_addr));
+
+		ia_attr->hardware_version_major = dev_attr.hw_ver;
+		ia_attr->max_eps = dev_attr.max_qp;
+		ia_attr->max_dto_per_ep = dev_attr.max_qp_wr;
+		ia_attr->max_rdma_read_in = dev_attr.max_res_rd_atom;
+		ia_attr->max_rdma_read_out = dev_attr.max_qp_init_rd_atom;
+		ia_attr->max_rdma_read_per_ep_in = dev_attr.max_qp_rd_atom;
+		ia_attr->max_rdma_read_per_ep_out =
+		    dev_attr.max_qp_init_rd_atom;
+		ia_attr->max_rdma_read_per_ep_in_guaranteed = DAT_TRUE;
+		ia_attr->max_rdma_read_per_ep_out_guaranteed = DAT_TRUE;
+		ia_attr->max_evds = dev_attr.max_cq;
+		ia_attr->max_evd_qlen = dev_attr.max_cqe;
+		ia_attr->max_iov_segments_per_dto = dev_attr.max_sge;
+		ia_attr->max_lmrs = dev_attr.max_mr;
+		/* 32bit attribute from 64bit, 4G-1 limit, DAT v2 needs fix */
+		ia_attr->max_lmr_block_size = 
+		    (dev_attr.max_mr_size >> 32) ? ~0 : dev_attr.max_mr_size;
+		ia_attr->max_rmrs = dev_attr.max_mw;
+		ia_attr->max_lmr_virtual_address = dev_attr.max_mr_size;
+		ia_attr->max_rmr_target_address = dev_attr.max_mr_size;
+		ia_attr->max_pzs = dev_attr.max_pd;
+		ia_attr->max_mtu_size = port_attr.max_msg_sz;
+		ia_attr->max_rdma_size = port_attr.max_msg_sz;
+		ia_attr->num_transport_attr = 0;
+		ia_attr->transport_attr = NULL;
+		ia_attr->num_vendor_attr = 0;
+		ia_attr->vendor_attr = NULL;
+		/* iWARP spec. - 1 sge for RDMA reads */
+		if (hca_ptr->ib_hca_handle->device->transport_type
+		    == IBV_TRANSPORT_IWARP)
+			ia_attr->max_iov_segments_per_rdma_read = 1;
+		else
+			ia_attr->max_iov_segments_per_rdma_read =
+			    dev_attr.max_sge;
+
+		ia_attr->max_iov_segments_per_rdma_write = dev_attr.max_sge;
+		/* save rd_atom for peer validation during connect requests */
+		hca_ptr->ib_trans.max_rdma_rd_in = dev_attr.max_qp_rd_atom;
+		hca_ptr->ib_trans.max_rdma_rd_out =
+		    dev_attr.max_qp_init_rd_atom;
+#ifdef DAT_EXTENSIONS
+		ia_attr->extension_supported = DAT_EXTENSION_IB;
+		ia_attr->extension_version = DAT_IB_EXTENSION_VERSION;
+#endif
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 "dapl_query_hca: (ver=%x) ep's %d ep_q %d"
+			 " evd's %d evd_q %d mr %u\n",
+			 ia_attr->hardware_version_major,
+			 ia_attr->max_eps, ia_attr->max_dto_per_ep,
+			 ia_attr->max_evds, ia_attr->max_evd_qlen, 
+			 ia_attr->max_lmr_block_size);
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 "dapl_query_hca: msg %llu rdma %llu iov's %d"
+			 " lmr %d rmr %d rd_in,out %d,%d inline=%d\n",
+			 ia_attr->max_mtu_size, ia_attr->max_rdma_size,
+			 ia_attr->max_iov_segments_per_dto, ia_attr->max_lmrs,
+			 ia_attr->max_rmrs, ia_attr->max_rdma_read_per_ep_in,
+			 ia_attr->max_rdma_read_per_ep_out,
+			 hca_ptr->ib_trans.max_inline_send);
+	}
+
+	if (ep_attr != NULL) {
+		(void)dapl_os_memzero(ep_attr, sizeof(*ep_attr));
+		ep_attr->max_mtu_size = port_attr.max_msg_sz;
+		ep_attr->max_rdma_size = port_attr.max_msg_sz;
+		ep_attr->max_recv_dtos = dev_attr.max_qp_wr;
+		ep_attr->max_request_dtos = dev_attr.max_qp_wr;
+		ep_attr->max_recv_iov = dev_attr.max_sge;
+		ep_attr->max_request_iov = dev_attr.max_sge;
+		ep_attr->max_rdma_read_in = dev_attr.max_qp_rd_atom;
+		ep_attr->max_rdma_read_out = dev_attr.max_qp_init_rd_atom;
+		/* iWARP spec. - 1 sge for RDMA reads */
+		if (hca_ptr->ib_hca_handle->device->transport_type
+		    == IBV_TRANSPORT_IWARP)
+			ep_attr->max_rdma_read_iov = 1;
+		else
+			ep_attr->max_rdma_read_iov = dev_attr.max_sge;
+
+		ep_attr->max_rdma_write_iov = dev_attr.max_sge;
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 "dapl_query_hca: MAX msg %llu dto %d iov %d"
+			 " rdma i%d,o%d\n",
+			 ep_attr->max_mtu_size,
+			 ep_attr->max_recv_dtos, ep_attr->max_recv_iov,
+			 ep_attr->max_rdma_read_in, ep_attr->max_rdma_read_out);
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_setup_async_callback
+ *
+ * Set up an asynchronous callbacks of various kinds
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	handler_type		type of handler to set up
+ *	callback_handle 	handle param for completion callbacks
+ *	callback		callback routine pointer
+ *	context 		argument for callback routine
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN dapls_ib_setup_async_callback(IN DAPL_IA * ia_ptr,
+					 IN DAPL_ASYNC_HANDLER_TYPE type,
+					 IN DAPL_EVD * evd_ptr,
+					 IN ib_async_handler_t callback,
+					 IN void *context)
+{
+	ib_hca_transport_t *hca_ptr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " setup_async_cb: ia %p type %d hdl %p cb %p ctx %p\n",
+		     ia_ptr, type, evd_ptr, callback, context);
+
+	hca_ptr = &ia_ptr->hca_ptr->ib_trans;
+	switch (type) {
+	case DAPL_ASYNC_UNAFILIATED:
+		hca_ptr->async_unafiliated = (ib_async_handler_t) callback;
+		hca_ptr->async_un_ctx = context;
+		break;
+	case DAPL_ASYNC_CQ_ERROR:
+		hca_ptr->async_cq_error = (ib_async_cq_handler_t) callback;
+		break;
+	case DAPL_ASYNC_CQ_COMPLETION:
+		hca_ptr->async_cq = (ib_async_dto_handler_t) callback;
+		break;
+	case DAPL_ASYNC_QP_ERROR:
+		hca_ptr->async_qp_error = (ib_async_qp_handler_t) callback;
+		break;
+	default:
+		break;
+	}
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN dapli_ib_thread_init(void)
+{
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " ib_thread_init(%d)\n", dapl_os_getpid());
+
+	dapl_os_lock(&g_hca_lock);
+	if (g_ib_thread_state != IB_THREAD_INIT) {
+		dapl_os_unlock(&g_hca_lock);
+		return DAT_SUCCESS;
+	}
+
+	/* uCMA events non-blocking */
+	if (dapls_config_cm_channel(g_cm_events)) {
+		dapl_os_unlock(&g_hca_lock);
+		return (dapl_convert_errno(errno, "create_thread ERR: cm_fd"));
+	}
+
+	g_ib_thread_state = IB_THREAD_CREATE;
+	dapl_os_unlock(&g_hca_lock);
+
+	/* create thread to process inbound connect request */
+	dat_status = dapl_os_thread_create(dapli_thread, NULL, &g_ib_thread);
+	if (dat_status != DAT_SUCCESS)
+		return (dapl_convert_errno(errno,
+					   "create_thread ERR:"
+					   " check resource limits"));
+
+	/* wait for thread to start */
+	dapl_os_lock(&g_hca_lock);
+	while (g_ib_thread_state != IB_THREAD_RUN) {
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " ib_thread_init: waiting for ib_thread\n");
+		dapl_os_unlock(&g_hca_lock);
+		dapl_os_sleep_usec(2000);
+		dapl_os_lock(&g_hca_lock);
+	}
+	dapl_os_unlock(&g_hca_lock);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " ib_thread_init(%d) exit\n", dapl_os_getpid());
+
+	return DAT_SUCCESS;
+}
+
+void dapli_ib_thread_destroy(void)
+{
+	int retries = 10;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " ib_thread_destroy(%d)\n", dapl_os_getpid());
+	/* 
+	 * wait for async thread to terminate. 
+	 * pthread_join would be the correct method
+	 * but some applications have some issues
+	 */
+
+	/* destroy ib_thread, wait for termination, if not already */
+	dapl_os_lock(&g_hca_lock);
+	if (g_ib_thread_state != IB_THREAD_RUN)
+		goto bail;
+
+	g_ib_thread_state = IB_THREAD_CANCEL;
+	if (dapls_thread_signal() == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " destroy: thread wakeup error = %s\n",
+			 strerror(errno));
+	while ((g_ib_thread_state != IB_THREAD_EXIT) && (retries--)) {
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " ib_thread_destroy: waiting for ib_thread\n");
+		if (dapls_thread_signal() == -1)
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " destroy: thread wakeup error = %s\n",
+				 strerror(errno));
+		dapl_os_unlock(&g_hca_lock);
+		dapl_os_sleep_usec(2000);
+		dapl_os_lock(&g_hca_lock);
+	}
+
+      bail:
+	dapl_os_unlock(&g_hca_lock);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " ib_thread_destroy(%d) exit\n", dapl_os_getpid());
+}
+
+void dapli_async_event_cb(struct _ib_hca_transport *hca)
+{
+	struct ibv_async_event event;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " async_event(%p)\n", hca);
+
+	if (hca->destroy)
+		return;
+
+	if (!ibv_get_async_event(hca->cm_id->verbs, &event)) {
+
+		switch (event.event_type) {
+		case IBV_EVENT_CQ_ERR:
+			{
+				struct dapl_ep *evd_ptr =
+				    event.element.cq->cq_context;
+
+				dapl_log(DAPL_DBG_TYPE_ERR,
+					 "dapl async_event CQ (%p) ERR %d\n",
+					 evd_ptr, event.event_type);
+
+				/* report up if async callback still setup */
+				if (hca->async_cq_error)
+					hca->async_cq_error(hca->cm_id->verbs,
+							    event.element.cq,
+							    &event,
+							    (void *)evd_ptr);
+				break;
+			}
+		case IBV_EVENT_COMM_EST:
+			{
+				/* Received msgs on connected QP before RTU */
+				dapl_log(DAPL_DBG_TYPE_UTIL,
+					 " async_event COMM_EST(%p) rdata beat RTU\n",
+					 event.element.qp);
+
+				break;
+			}
+		case IBV_EVENT_QP_FATAL:
+		case IBV_EVENT_QP_REQ_ERR:
+		case IBV_EVENT_QP_ACCESS_ERR:
+		case IBV_EVENT_QP_LAST_WQE_REACHED:
+		case IBV_EVENT_SRQ_ERR:
+		case IBV_EVENT_SRQ_LIMIT_REACHED:
+		case IBV_EVENT_SQ_DRAINED:
+			{
+				struct dapl_ep *ep_ptr =
+				    event.element.qp->qp_context;
+
+				dapl_log(DAPL_DBG_TYPE_ERR,
+					 "dapl async_event QP (%p) ERR %d\n",
+					 ep_ptr, event.event_type);
+
+				/* report up if async callback still setup */
+				if (hca->async_qp_error)
+					hca->async_qp_error(hca->cm_id->verbs,
+							    ep_ptr->qp_handle,
+							    &event,
+							    (void *)ep_ptr);
+				break;
+			}
+		case IBV_EVENT_PATH_MIG:
+		case IBV_EVENT_PATH_MIG_ERR:
+		case IBV_EVENT_DEVICE_FATAL:
+		case IBV_EVENT_PORT_ACTIVE:
+		case IBV_EVENT_PORT_ERR:
+		case IBV_EVENT_LID_CHANGE:
+		case IBV_EVENT_PKEY_CHANGE:
+		case IBV_EVENT_SM_CHANGE:
+			{
+				dapl_log(DAPL_DBG_TYPE_WARN,
+					 "dapl async_event: DEV ERR %d\n",
+					 event.event_type);
+
+				/* report up if async callback still setup */
+				if (hca->async_unafiliated)
+					hca->async_unafiliated(hca->cm_id->
+							       verbs, &event,
+							       hca->
+							       async_un_ctx);
+				break;
+			}
+		case IBV_EVENT_CLIENT_REREGISTER:
+			/* no need to report this event this time */
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " async_event: IBV_EVENT_CLIENT_REREGISTER\n");
+			break;
+
+		default:
+			dapl_log(DAPL_DBG_TYPE_WARN,
+				 "dapl async_event: %d UNKNOWN\n",
+				 event.event_type);
+			break;
+
+		}
+		ibv_ack_async_event(&event);
+	}
+}
+
+#if defined(_WIN64) || defined(_WIN32)
+/* work thread for uAT, uCM, CQ, and async events */
+void dapli_thread(void *arg)
+{
+	struct _ib_hca_transport *hca;
+	struct _ib_hca_transport *uhca[8];
+	COMP_CHANNEL *channel;
+	int ret, idx, cnt;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " ib_thread(%d,0x%x): ENTER: \n",
+		     dapl_os_getpid(), g_ib_thread);
+
+	dapl_os_lock(&g_hca_lock);
+	for (g_ib_thread_state = IB_THREAD_RUN;
+	     g_ib_thread_state == IB_THREAD_RUN; dapl_os_lock(&g_hca_lock)) {
+
+		idx = 0;
+		hca = dapl_llist_is_empty(&g_hca_list) ? NULL :
+		    dapl_llist_peek_head(&g_hca_list);
+
+		while (hca) {
+			uhca[idx++] = hca;
+			hca = dapl_llist_next_entry(&g_hca_list,
+						    (DAPL_LLIST_ENTRY *) & hca->
+						    entry);
+		}
+		cnt = idx;
+
+		dapl_os_unlock(&g_hca_lock);
+		ret = CompManagerPoll(windata.comp_mgr, INFINITE, &channel);
+
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " ib_thread(%d) poll_event 0x%x\n",
+			     dapl_os_getpid(), ret);
+
+		dapli_cma_event_cb();
+
+		/* check and process CQ and ASYNC events, per device */
+		for (idx = 0; idx < cnt; idx++) {
+			if (uhca[idx]->destroy == 1) {
+				dapl_os_lock(&g_hca_lock);
+				dapl_llist_remove_entry(&g_hca_list,
+							(DAPL_LLIST_ENTRY *) &
+							uhca[idx]->entry);
+				dapl_os_unlock(&g_hca_lock);
+				uhca[idx]->destroy = 2;
+			} else {
+				dapli_cq_event_cb(uhca[idx]);
+				dapli_async_event_cb(uhca[idx]);
+			}
+		}
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " ib_thread(%d) EXIT\n",
+		     dapl_os_getpid());
+	g_ib_thread_state = IB_THREAD_EXIT;
+	dapl_os_unlock(&g_hca_lock);
+}
+#else				// _WIN64 || WIN32
+/* work thread for uAT, uCM, CQ, and async events */
+void dapli_thread(void *arg)
+{
+	struct pollfd ufds[__FD_SETSIZE];
+	struct _ib_hca_transport *uhca[__FD_SETSIZE] = { NULL };
+	struct _ib_hca_transport *hca;
+	int ret, idx, fds;
+	char rbuf[2];
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " ib_thread(%d,0x%x): ENTER: pipe %d ucma %d\n",
+		     dapl_os_getpid(), g_ib_thread, g_ib_pipe[0],
+		     g_cm_events->fd);
+
+	/* Poll across pipe, CM, AT never changes */
+	dapl_os_lock(&g_hca_lock);
+	g_ib_thread_state = IB_THREAD_RUN;
+
+	ufds[0].fd = g_ib_pipe[0];	/* pipe */
+	ufds[0].events = POLLIN;
+	ufds[1].fd = g_cm_events->fd;	/* uCMA */
+	ufds[1].events = POLLIN;
+
+	while (g_ib_thread_state == IB_THREAD_RUN) {
+
+		/* build ufds after pipe and uCMA events */
+		ufds[0].revents = 0;
+		ufds[1].revents = 0;
+		idx = 1;
+
+		/*  Walk HCA list and setup async and CQ events */
+		if (!dapl_llist_is_empty(&g_hca_list))
+			hca = dapl_llist_peek_head(&g_hca_list);
+		else
+			hca = NULL;
+
+		while (hca) {
+
+			/* uASYNC events */
+			ufds[++idx].fd = hca->cm_id->verbs->async_fd;
+			ufds[idx].events = POLLIN;
+			ufds[idx].revents = 0;
+			uhca[idx] = hca;
+
+			/* uCQ, non-direct events */
+			ufds[++idx].fd = hca->ib_cq->fd;
+			ufds[idx].events = POLLIN;
+			ufds[idx].revents = 0;
+			uhca[idx] = hca;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+				     " ib_thread(%d) poll_fd: hca[%d]=%p, async=%d"
+				     " pipe=%d cm=%d cq=d\n",
+				     dapl_os_getpid(), hca, ufds[idx - 1].fd,
+				     ufds[0].fd, ufds[1].fd, ufds[idx].fd);
+
+			hca = dapl_llist_next_entry(&g_hca_list,
+						    (DAPL_LLIST_ENTRY *) & hca->
+						    entry);
+		}
+
+		/* unlock, and setup poll */
+		fds = idx + 1;
+		dapl_os_unlock(&g_hca_lock);
+		ret = poll(ufds, fds, -1);
+		if (ret <= 0) {
+			dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+				     " ib_thread(%d): ERR %s poll\n",
+				     dapl_os_getpid(), strerror(errno));
+			dapl_os_lock(&g_hca_lock);
+			continue;
+		}
+
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " ib_thread(%d) poll_event: "
+			     " async=0x%x pipe=0x%x cm=0x%x cq=0x%x\n",
+			     dapl_os_getpid(), ufds[idx - 1].revents,
+			     ufds[0].revents, ufds[1].revents,
+			     ufds[idx].revents);
+
+		/* uCMA events */
+		if (ufds[1].revents == POLLIN)
+			dapli_cma_event_cb();
+
+		/* check and process CQ and ASYNC events, per device */
+		for (idx = 2; idx < fds; idx++) {
+			if (ufds[idx].revents == POLLIN) {
+				dapli_cq_event_cb(uhca[idx]);
+				dapli_async_event_cb(uhca[idx]);
+			}
+		}
+
+		/* check and process user events, PIPE */
+		if (ufds[0].revents == POLLIN) {
+			if (read(g_ib_pipe[0], rbuf, 2) == -1)
+				dapl_log(DAPL_DBG_TYPE_UTIL,
+					 " cr_thread: pipe rd err= %s\n",
+					 strerror(errno));
+
+			/* cleanup any device on list marked for destroy */
+			for (idx = 3; idx < fds; idx++) {
+				if (uhca[idx] && uhca[idx]->destroy == 1) {
+					dapl_os_lock(&g_hca_lock);
+					dapl_llist_remove_entry(&g_hca_list,
+								(DAPL_LLIST_ENTRY
+								 *)
+								& uhca[idx]->
+								entry);
+					dapl_os_unlock(&g_hca_lock);
+					uhca[idx]->destroy = 2;
+				}
+			}
+		}
+		dapl_os_lock(&g_hca_lock);
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " ib_thread(%d) EXIT\n",
+		     dapl_os_getpid());
+	g_ib_thread_state = IB_THREAD_EXIT;
+	dapl_os_unlock(&g_hca_lock);
+}
+#endif
+
+/*
+ * dapls_set_provider_specific_attr
+ *
+ * Input:
+ *	attr_ptr	Pointer provider specific attributes
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	void
+ */
+DAT_NAMED_ATTR ib_attrs[] = {
+#ifdef DAT_EXTENSIONS
+	{
+	 "DAT_EXTENSION_INTERFACE", "TRUE"}
+	,
+	{
+	 DAT_IB_ATTR_FETCH_AND_ADD, "TRUE"}
+	,
+	{
+	 DAT_IB_ATTR_CMP_AND_SWAP, "TRUE"}
+	,
+	{
+	 DAT_IB_ATTR_IMMED_DATA, "TRUE"}
+	,
+#ifdef DAPL_COUNTERS
+	{
+	 DAT_ATTR_COUNTERS, "TRUE"}
+	,
+#endif				/* DAPL_COUNTERS */
+#endif
+};
+
+#define SPEC_ATTR_SIZE( x )	(sizeof( x ) / sizeof( DAT_NAMED_ATTR))
+
+void dapls_query_provider_specific_attr(IN DAPL_IA * ia_ptr,
+					IN DAT_PROVIDER_ATTR * attr_ptr)
+{
+	attr_ptr->num_provider_specific_attr = SPEC_ATTR_SIZE(ib_attrs);
+	attr_ptr->provider_specific_attr = ib_attrs;
+}
diff --git a/dapl/openib_cma/dapl_ib_util.h b/dapl/openib_cma/dapl_ib_util.h
new file mode 100755
index 0000000..46c9b35
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_util.h
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2005-2008 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ib_util.h
+ *
+ * PURPOSE: The OFED provider - definitions, prototypes,
+ *
+ * $Id: $
+ *
+ **********************************************************************/
+
+#ifndef _DAPL_IB_UTIL_H_
+#define _DAPL_IB_UTIL_H_
+
+#include "openib_osd.h"
+#include <infiniband/verbs.h>
+#include <rdma/rdma_cma.h>
+
+/* Typedefs to map common DAPL provider types to IB verbs */
+typedef	struct dapl_cm_id	*ib_qp_handle_t;
+typedef	struct ibv_cq		*ib_cq_handle_t;
+typedef	struct ibv_pd		*ib_pd_handle_t;
+typedef	struct ibv_mr		*ib_mr_handle_t;
+typedef	struct ibv_mw		*ib_mw_handle_t;
+typedef	struct ibv_wc		ib_work_completion_t;
+
+/* HCA context type maps to IB verbs  */
+typedef	struct ibv_context	*ib_hca_handle_t;
+typedef ib_hca_handle_t		dapl_ibal_ca_t;
+
+#define IB_RC_RETRY_COUNT      7
+#define IB_RNR_RETRY_COUNT     7
+#define IB_CM_RESPONSE_TIMEOUT  23	/* 16 sec */
+#define IB_CM_RETRIES           15	/* 240 sec total default */
+#define IB_ARP_TIMEOUT		4000	/* 4 sec */
+#define IB_ARP_RETRY_COUNT	15	/* 60 sec total */
+#define IB_ROUTE_TIMEOUT	4000	/* 4 sec */
+#define IB_ROUTE_RETRY_COUNT	15	/* 60 sec total */
+#define IB_MAX_AT_RETRY		3
+
+typedef enum {
+	IB_CME_CONNECTED,
+	IB_CME_DISCONNECTED,
+	IB_CME_DISCONNECTED_ON_LINK_DOWN,
+	IB_CME_CONNECTION_REQUEST_PENDING,
+	IB_CME_CONNECTION_REQUEST_PENDING_PRIVATE_DATA,
+	IB_CME_CONNECTION_REQUEST_ACKED,
+	IB_CME_DESTINATION_REJECT,
+	IB_CME_DESTINATION_REJECT_PRIVATE_DATA,
+	IB_CME_DESTINATION_UNREACHABLE,
+	IB_CME_TOO_MANY_CONNECTION_REQUESTS,
+	IB_CME_LOCAL_FAILURE,
+	IB_CME_BROKEN,
+	IB_CME_TIMEOUT
+} ib_cm_events_t;
+
+/* CQ notifications */
+typedef enum
+{
+	IB_NOTIFY_ON_NEXT_COMP,
+	IB_NOTIFY_ON_SOLIC_COMP
+
+} ib_notification_type_t;
+
+/* other mappings */
+typedef int			ib_bool_t;
+typedef union ibv_gid		GID;
+typedef char			*IB_HCA_NAME;
+typedef uint16_t		ib_hca_port_t;
+typedef uint32_t		ib_comp_handle_t;
+
+#ifdef CQ_WAIT_OBJECT
+
+/* CQ event channel, plus pipe to enable consumer wakeup */
+typedef struct _ib_wait_obj_handle
+{ 
+	struct ibv_comp_channel *events;
+	int			pipe[2];
+
+} *ib_wait_obj_handle_t;
+
+#endif
+
+/* Definitions */
+#define IB_INVALID_HANDLE	NULL
+
+/* inline send rdma threshold */
+#define	INLINE_SEND_IWARP_DEFAULT	64
+#define	INLINE_SEND_IB_DEFAULT		200
+
+/* CMA private data areas */
+#define CMA_PDATA_HDR		36
+#define	IB_MAX_REQ_PDATA_SIZE	(92-CMA_PDATA_HDR)
+#define	IB_MAX_REP_PDATA_SIZE	(196-CMA_PDATA_HDR)
+#define	IB_MAX_REJ_PDATA_SIZE	(148-CMA_PDATA_HDR)
+#define	IB_MAX_DREQ_PDATA_SIZE	(220-CMA_PDATA_HDR)
+#define	IB_MAX_DREP_PDATA_SIZE	(224-CMA_PDATA_HDR)
+#define	IWARP_MAX_PDATA_SIZE	(512-CMA_PDATA_HDR)
+
+/* DTO OPs, ordered for DAPL ENUM definitions */
+#define OP_RDMA_WRITE           IBV_WR_RDMA_WRITE
+#define OP_RDMA_WRITE_IMM       IBV_WR_RDMA_WRITE_WITH_IMM
+#define OP_SEND                 IBV_WR_SEND
+#define OP_SEND_IMM             IBV_WR_SEND_WITH_IMM
+#define OP_RDMA_READ            IBV_WR_RDMA_READ
+#define OP_COMP_AND_SWAP        IBV_WR_ATOMIC_CMP_AND_SWP
+#define OP_FETCH_AND_ADD        IBV_WR_ATOMIC_FETCH_AND_ADD
+#define OP_RECEIVE              7   /* internal op */
+#define OP_RECEIVE_IMM		8   /* internel op */
+#define OP_BIND_MW              9   /* internal op */
+#define OP_INVALID		0xff
+
+/* Definitions to map QP state */
+#define IB_QP_STATE_RESET	IBV_QPS_RESET
+#define IB_QP_STATE_INIT	IBV_QPS_INIT
+#define IB_QP_STATE_RTR		IBV_QPS_RTR
+#define IB_QP_STATE_RTS		IBV_QPS_RTS
+#define IB_QP_STATE_SQD		IBV_QPS_SQD
+#define IB_QP_STATE_SQE		IBV_QPS_SQE
+#define IB_QP_STATE_ERROR	IBV_QPS_ERR
+
+typedef enum
+{
+	IB_THREAD_INIT,
+	IB_THREAD_CREATE,
+	IB_THREAD_RUN,
+	IB_THREAD_CANCEL,
+	IB_THREAD_EXIT
+
+} ib_thread_state_t;
+
+struct dapl_cm_id {
+	DAPL_OS_LOCK			lock;
+	int				destroy;
+	int				arp_retries;
+	int				arp_timeout;
+	int				route_retries;
+	int				route_timeout;
+	int				in_callback;
+	struct rdma_cm_id		*cm_id;
+	struct dapl_hca			*hca;
+	struct dapl_sp			*sp;
+	struct dapl_ep			*ep;
+	struct rdma_conn_param		params;
+	DAT_SOCK_ADDR6			r_addr;
+	int				p_len;
+	unsigned char			p_data[256]; /* dapl max private data size */
+};
+
+typedef struct dapl_cm_id	*dp_ib_cm_handle_t;
+typedef struct dapl_cm_id	*ib_cm_srvc_handle_t;
+
+/* Operation and state mappings */
+typedef int	ib_send_op_type_t;
+typedef	struct	ibv_sge		ib_data_segment_t;
+typedef enum	ibv_qp_state	ib_qp_state_t;
+typedef	enum	ibv_event_type	ib_async_event_type;
+typedef struct	ibv_async_event	ib_error_record_t;
+
+/* Definitions for ibverbs/mthca return codes, should be defined in verbs.h */
+/* some are errno and some are -n values */
+
+/**
+ * ibv_get_device_name - Return kernel device name
+ * ibv_get_device_guid - Return device's node GUID
+ * ibv_open_device - Return ibv_context or NULL
+ * ibv_close_device - Return 0, (errno?)
+ * ibv_get_async_event - Return 0, -1 
+ * ibv_alloc_pd - Return ibv_pd, NULL
+ * ibv_dealloc_pd - Return 0, errno 
+ * ibv_reg_mr - Return ibv_mr, NULL
+ * ibv_dereg_mr - Return 0, errno
+ * ibv_create_cq - Return ibv_cq, NULL
+ * ibv_destroy_cq - Return 0, errno
+ * ibv_get_cq_event - Return 0 & ibv_cq/context, int
+ * ibv_poll_cq - Return n & ibv_wc, 0 ok, -1 empty, -2 error 
+ * ibv_req_notify_cq - Return 0 (void?)
+ * ibv_create_qp - Return ibv_qp, NULL
+ * ibv_modify_qp - Return 0, errno
+ * ibv_destroy_qp - Return 0, errno
+ * ibv_post_send - Return 0, -1 & bad_wr
+ * ibv_post_recv - Return 0, -1 & bad_wr 
+ */
+
+/* async handlers for DTO, CQ, QP, and unafiliated */
+typedef void (*ib_async_dto_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+typedef void (*ib_async_cq_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_cq_handle_t     ib_cq_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+typedef void (*ib_async_qp_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_qp_handle_t     ib_qp_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+typedef void (*ib_async_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+
+/* ib_hca_transport_t, specific to this implementation */
+typedef struct _ib_hca_transport
+{ 
+	struct dapl_llist_entry	entry;
+	int			destroy;
+	struct dapl_hca		*d_hca;
+	struct rdma_cm_id 	*cm_id;
+	struct ibv_comp_channel *ib_cq;
+	ib_cq_handle_t		ib_cq_empty;
+	int			max_inline_send;
+	ib_async_handler_t	async_unafiliated;
+	void			*async_un_ctx;
+	ib_async_cq_handler_t	async_cq_error;
+	ib_async_dto_handler_t	async_cq;
+	ib_async_qp_handler_t	async_qp_error;
+	uint8_t			max_cm_timeout;
+	uint8_t			max_cm_retries;
+	/* device attributes */
+	int			max_rdma_rd_in;
+	int			max_rdma_rd_out;
+
+} ib_hca_transport_t;
+
+/* provider specfic fields for shared memory support */
+typedef uint32_t ib_shm_transport_t;
+
+/* prototypes */
+int32_t	dapls_ib_init (void);
+int32_t	dapls_ib_release (void);
+void dapli_thread(void *arg);
+DAT_RETURN  dapli_ib_thread_init(void);
+void dapli_ib_thread_destroy(void);
+void dapli_cma_event_cb(void);
+void dapli_cq_event_cb(struct _ib_hca_transport *hca);
+void dapli_async_event_cb(struct _ib_hca_transport *hca);
+void dapli_destroy_conn(struct dapl_cm_id *conn);
+
+DAT_RETURN
+dapls_modify_qp_state ( IN ib_qp_handle_t	qp_handle,
+			IN ib_qp_state_t	qp_state,
+			IN struct dapl_cm_id	*conn );
+
+/* inline functions */
+STATIC _INLINE_ IB_HCA_NAME dapl_ib_convert_name (IN char *name)
+{
+	/* use ascii; name of local device */
+	return dapl_os_strdup(name);
+}
+
+STATIC _INLINE_ void dapl_ib_release_name (IN IB_HCA_NAME name)
+{
+	return;
+}
+
+/*
+ *  Convert errno to DAT_RETURN values
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapl_convert_errno( IN int err, IN const char *str )
+{
+    if (!err)	return DAT_SUCCESS;
+    	
+#if DAPL_DBG
+    if ((err != EAGAIN) && (err != ETIMEDOUT))
+	dapl_dbg_log (DAPL_DBG_TYPE_ERR," %s %s\n", str, strerror(err));
+#endif 
+
+    switch( err )
+    {
+	case EOVERFLOW	: return DAT_LENGTH_ERROR;
+	case EACCES	: return DAT_PRIVILEGES_VIOLATION;
+	case EPERM	: return DAT_PROTECTION_VIOLATION;		  
+	case EINVAL	: return DAT_INVALID_HANDLE;
+    	case EISCONN	: return DAT_INVALID_STATE | DAT_INVALID_STATE_EP_CONNECTED;
+    	case ECONNREFUSED : return DAT_INVALID_STATE | DAT_INVALID_STATE_EP_NOTREADY;
+	case ETIMEDOUT	: return DAT_TIMEOUT_EXPIRED;
+    	case ENETUNREACH: return DAT_INVALID_ADDRESS | DAT_INVALID_ADDRESS_UNREACHABLE;
+    	case EADDRINUSE	: return DAT_CONN_QUAL_IN_USE;
+    	case EALREADY	: return DAT_INVALID_STATE | DAT_INVALID_STATE_EP_ACTCONNPENDING;
+	case ENOMEM	: return DAT_INSUFFICIENT_RESOURCES;
+        case EAGAIN	: return DAT_QUEUE_EMPTY;
+	case EINTR	: return DAT_INTERRUPTED_CALL;
+    	case EAFNOSUPPORT : return DAT_INVALID_ADDRESS | DAT_INVALID_ADDRESS_MALFORMED;
+    	case EFAULT	: 
+	default		: return DAT_INTERNAL_ERROR;
+    }
+ }
+
+#endif /*  _DAPL_IB_UTIL_H_ */
diff --git a/dapl/openib_cma/linux/openib_osd.h b/dapl/openib_cma/linux/openib_osd.h
new file mode 100644
index 0000000..309972f
--- /dev/null
+++ b/dapl/openib_cma/linux/openib_osd.h
@@ -0,0 +1,15 @@
+#ifndef OPENIB_OSD_H
+#define OPENIB_OSD_H
+
+#include <byteswap.h>
+#include <sys/poll.h>
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define htonll(x) (x)
+#define ntohll(x) (x)
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define htonll(x)  bswap_64(x)
+#define ntohll(x)  bswap_64(x)
+#endif
+
+#endif // OPENIB_OSD_H
diff --git a/dapl/openib_scm/dapl_ib_cm.c b/dapl/openib_scm/dapl_ib_cm.c
new file mode 100644
index 0000000..a2b02eb
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_cm.c
@@ -0,0 +1,1681 @@
+/*
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/***************************************************************************
+ *
+ *   Module:		 uDAPL
+ *
+ *   Filename:		 dapl_ib_cm.c
+ *
+ *   Author:		 Arlin Davis
+ *
+ *   Created:		 3/10/2005
+ *
+ *   Description: 
+ *
+ *   The uDAPL openib provider - connection management
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ *	Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ *
+ **************************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_cr_util.h"
+#include "dapl_name_service.h"
+#include "dapl_ib_util.h"
+#include "dapl_osd.h"
+
+extern DAPL_SOCKET g_scm[2];
+
+#if defined(_WIN32) || defined(_WIN64)
+enum DAPL_FD_EVENTS {
+	DAPL_FD_READ = 0x1,
+	DAPL_FD_WRITE = 0x2,
+	DAPL_FD_ERROR = 0x4
+};
+
+static int dapl_config_socket(DAPL_SOCKET s)
+{
+	unsigned long nonblocking = 1;
+	return ioctlsocket(s, FIONBIO, &nonblocking);
+}
+
+static int dapl_connect_socket(DAPL_SOCKET s, struct sockaddr *addr,
+			       int addrlen)
+{
+	int err;
+
+	err = connect(s, addr, addrlen);
+	if (err == SOCKET_ERROR)
+		err = WSAGetLastError();
+	return (err == WSAEWOULDBLOCK) ? EAGAIN : err;
+}
+
+struct dapl_fd_set {
+	struct fd_set set[3];
+};
+
+static struct dapl_fd_set *dapl_alloc_fd_set(void)
+{
+	return dapl_os_alloc(sizeof(struct dapl_fd_set));
+}
+
+static void dapl_fd_zero(struct dapl_fd_set *set)
+{
+	FD_ZERO(&set->set[0]);
+	FD_ZERO(&set->set[1]);
+	FD_ZERO(&set->set[2]);
+}
+
+static int dapl_fd_set(DAPL_SOCKET s, struct dapl_fd_set *set,
+		       enum DAPL_FD_EVENTS event)
+{
+	FD_SET(s, &set->set[(event == DAPL_FD_READ) ? 0 : 1]);
+	FD_SET(s, &set->set[2]);
+	return 0;
+}
+
+static enum DAPL_FD_EVENTS dapl_poll(DAPL_SOCKET s, enum DAPL_FD_EVENTS event)
+{
+	struct fd_set rw_fds;
+	struct fd_set err_fds;
+	struct timeval tv;
+	int ret;
+
+	FD_ZERO(&rw_fds);
+	FD_ZERO(&err_fds);
+	FD_SET(s, &rw_fds);
+	FD_SET(s, &err_fds);
+
+	tv.tv_sec = 0;
+	tv.tv_usec = 0;
+
+	if (event == DAPL_FD_READ)
+		ret = select(1, &rw_fds, NULL, &err_fds, &tv);
+	else
+		ret = select(1, NULL, &rw_fds, &err_fds, &tv);
+
+	if (ret == 0)
+		return 0;
+	else if (ret == SOCKET_ERROR)
+		return WSAGetLastError();
+	else if (FD_ISSET(s, &rw_fds))
+		return event;
+	else
+		return DAPL_FD_ERROR;
+}
+
+static int dapl_select(struct dapl_fd_set *set)
+{
+	int ret;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " dapl_select: sleep\n");
+	ret = select(0, &set->set[0], &set->set[1], &set->set[2], NULL);
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " dapl_select: wakeup\n");
+
+	if (ret == SOCKET_ERROR)
+		dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			     " dapl_select: error 0x%x\n", WSAGetLastError());
+
+	return ret;
+}
+#else				// _WIN32 || _WIN64
+enum DAPL_FD_EVENTS {
+	DAPL_FD_READ = POLLIN,
+	DAPL_FD_WRITE = POLLOUT,
+	DAPL_FD_ERROR = POLLERR
+};
+
+static int dapl_config_socket(DAPL_SOCKET s)
+{
+	int ret;
+
+	ret = fcntl(s, F_GETFL);
+	if (ret >= 0)
+		ret = fcntl(s, F_SETFL, ret | O_NONBLOCK);
+	return ret;
+}
+
+static int dapl_connect_socket(DAPL_SOCKET s, struct sockaddr *addr,
+			       int addrlen)
+{
+	int ret;
+
+	ret = connect(s, addr, addrlen);
+
+	return (errno == EINPROGRESS) ? EAGAIN : ret;
+}
+
+struct dapl_fd_set {
+	int index;
+	struct pollfd set[DAPL_FD_SETSIZE];
+};
+
+static struct dapl_fd_set *dapl_alloc_fd_set(void)
+{
+	return dapl_os_alloc(sizeof(struct dapl_fd_set));
+}
+
+static void dapl_fd_zero(struct dapl_fd_set *set)
+{
+	set->index = 0;
+}
+
+static int dapl_fd_set(DAPL_SOCKET s, struct dapl_fd_set *set,
+		       enum DAPL_FD_EVENTS event)
+{
+	if (set->index == DAPL_FD_SETSIZE - 1) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 "SCM ERR: cm_thread exceeded FD_SETSIZE %d\n",
+			 set->index + 1);
+		return -1;
+	}
+
+	set->set[set->index].fd = s;
+	set->set[set->index].revents = 0;
+	set->set[set->index++].events = event;
+	return 0;
+}
+
+static enum DAPL_FD_EVENTS dapl_poll(DAPL_SOCKET s, enum DAPL_FD_EVENTS event)
+{
+	struct pollfd fds;
+	int ret;
+
+	fds.fd = s;
+	fds.events = event;
+	fds.revents = 0;
+	ret = poll(&fds, 1, 0);
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " dapl_poll: ret=%d, events=0x%x\n",
+		     ret, fds.revents);
+	if (ret <= 0)
+		return ret;
+
+	return fds.revents;
+}
+
+static int dapl_select(struct dapl_fd_set *set)
+{
+	int ret;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " dapl_select: sleep, fds=%d\n",
+		     set->index);
+	ret = poll(set->set, set->index, -1);
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " dapl_select: wakeup, ret=0x%x\n", ret);
+	return ret;
+}
+#endif
+
+static struct ib_cm_handle *dapli_cm_create(void)
+{
+	struct ib_cm_handle *cm_ptr;
+
+	/* Allocate CM, init lock, and initialize */
+	if ((cm_ptr = dapl_os_alloc(sizeof(*cm_ptr))) == NULL)
+		return NULL;
+
+	(void)dapl_os_memzero(cm_ptr, sizeof(*cm_ptr));
+	if (dapl_os_lock_init(&cm_ptr->lock))
+		goto bail;
+
+	cm_ptr->dst.ver = htons(DSCM_VER);
+	cm_ptr->socket = DAPL_INVALID_SOCKET;
+	return cm_ptr;
+      bail:
+	dapl_os_free(cm_ptr, sizeof(*cm_ptr));
+	return NULL;
+}
+
+/* mark for destroy, remove all references, schedule cleanup */
+static void dapli_cm_destroy(struct ib_cm_handle *cm_ptr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " cm_destroy: cm %p ep %p\n", cm_ptr, cm_ptr->ep);
+
+	/* cleanup, never made it to work queue */
+	if (cm_ptr->state == SCM_INIT) {
+		if (cm_ptr->socket != DAPL_INVALID_SOCKET)
+			closesocket(cm_ptr->socket);
+		dapl_os_free(cm_ptr, sizeof(*cm_ptr));
+		return;
+	}
+
+	dapl_os_lock(&cm_ptr->lock);
+	cm_ptr->state = SCM_DESTROY;
+	if ((cm_ptr->ep) && (cm_ptr->ep->cm_handle == cm_ptr))
+		cm_ptr->ep->cm_handle = IB_INVALID_HANDLE;
+
+	/* close socket if still active */
+	if (cm_ptr->socket != DAPL_INVALID_SOCKET) {
+		closesocket(cm_ptr->socket);
+		cm_ptr->socket = DAPL_INVALID_SOCKET;
+	}
+	dapl_os_unlock(&cm_ptr->lock);
+
+	/* wakeup work thread */
+	if (send(g_scm[1], "w", sizeof "w", 0) == -1)
+		dapl_log(DAPL_DBG_TYPE_CM,
+			 " cm_destroy: thread wakeup error = %s\n",
+			 strerror(errno));
+}
+
+/* queue socket for processing CM work */
+static void dapli_cm_queue(struct ib_cm_handle *cm_ptr)
+{
+	/* add to work queue for cr thread processing */
+	dapl_llist_init_entry((DAPL_LLIST_ENTRY *) & cm_ptr->entry);
+	dapl_os_lock(&cm_ptr->hca->ib_trans.lock);
+	dapl_llist_add_tail(&cm_ptr->hca->ib_trans.list,
+			    (DAPL_LLIST_ENTRY *) & cm_ptr->entry, cm_ptr);
+	dapl_os_unlock(&cm_ptr->hca->ib_trans.lock);
+
+	/* wakeup CM work thread */
+	if (send(g_scm[1], "w", sizeof "w", 0) == -1)
+		dapl_log(DAPL_DBG_TYPE_CM,
+			 " cm_queue: thread wakeup error = %s\n",
+			 strerror(errno));
+}
+
+/*
+ * ACTIVE/PASSIVE: called from CR thread or consumer via ep_disconnect
+ */
+static DAT_RETURN dapli_socket_disconnect(dp_ib_cm_handle_t cm_ptr)
+{
+	DAPL_EP *ep_ptr = cm_ptr->ep;
+	DAT_UINT32 disc_data = htonl(0xdead);
+
+	if (ep_ptr == NULL)
+		return DAT_SUCCESS;
+
+	dapl_os_lock(&cm_ptr->lock);
+	if ((cm_ptr->state == SCM_INIT) ||
+	    (cm_ptr->state == SCM_DISCONNECTED) ||
+	    (cm_ptr->state == SCM_DESTROY)) {
+		dapl_os_unlock(&cm_ptr->lock);
+		return DAT_SUCCESS;
+	} else {
+		/* send disc date, close socket, schedule destroy */
+		if (cm_ptr->socket != DAPL_INVALID_SOCKET) {
+			if (send(cm_ptr->socket, (char *)&disc_data,
+				 sizeof(disc_data), 0) == -1)
+				dapl_log(DAPL_DBG_TYPE_WARN,
+					 " cm_disc: write error = %s\n",
+					 strerror(errno));
+			closesocket(cm_ptr->socket);
+			cm_ptr->socket = DAPL_INVALID_SOCKET;
+		}
+		cm_ptr->state = SCM_DISCONNECTED;
+	}
+	dapl_os_unlock(&cm_ptr->lock);
+
+	/* disconnect events for RC's only */
+	if (ep_ptr->param.ep_attr.service_type == DAT_SERVICE_TYPE_RC) {
+		if (ep_ptr->cr_ptr) {
+			dapls_cr_callback(cm_ptr,
+					  IB_CME_DISCONNECTED,
+					  NULL,
+					  ((DAPL_CR *) ep_ptr->cr_ptr)->sp_ptr);
+		} else {
+			dapl_evd_connection_callback(ep_ptr->cm_handle,
+						     IB_CME_DISCONNECTED,
+						     NULL, ep_ptr);
+		}
+	}
+
+	/* scheduled destroy via disconnect clean in callback */
+	return DAT_SUCCESS;
+}
+
+/*
+ * ACTIVE: socket connected, send QP information to peer 
+ */
+static void dapli_socket_connected(dp_ib_cm_handle_t cm_ptr, int err)
+{
+	int len, opt = 1;
+	struct iovec iov[2];
+	struct dapl_ep *ep_ptr = cm_ptr->ep;
+
+	if (err) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " CONN_PENDING: socket ERR %s -> %s\n",
+			 strerror(err), inet_ntoa(((struct sockaddr_in *)
+						   ep_ptr->param.
+						   remote_ia_address_ptr)->
+						  sin_addr));
+		goto bail;
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " socket connected, write QP and private data\n");
+
+	/* no delay for small packets */
+	setsockopt(cm_ptr->socket, IPPROTO_TCP, TCP_NODELAY,
+		   (char *)&opt, sizeof(opt));
+
+	/* send qp info and pdata to remote peer */
+	iov[0].iov_base = (void *)&cm_ptr->dst;
+	iov[0].iov_len = sizeof(ib_qp_cm_t);
+	if (cm_ptr->dst.p_size) {
+		iov[1].iov_base = cm_ptr->p_data;
+		iov[1].iov_len = ntohl(cm_ptr->dst.p_size);
+		len = writev(cm_ptr->socket, iov, 2);
+	} else {
+		len = writev(cm_ptr->socket, iov, 1);
+	}
+
+	if (len != (ntohl(cm_ptr->dst.p_size) + sizeof(ib_qp_cm_t))) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " CONN_PENDING write: ERR %s, wcnt=%d -> %s\n",
+			 strerror(errno), len, inet_ntoa(((struct sockaddr_in *)
+							  ep_ptr->param.
+							  remote_ia_address_ptr)->
+							 sin_addr));
+		goto bail;
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " connected: sending SRC port=0x%x lid=0x%x,"
+		     " qpn=0x%x, psize=%d\n",
+		     ntohs(cm_ptr->dst.port), ntohs(cm_ptr->dst.lid),
+		     ntohl(cm_ptr->dst.qpn), ntohl(cm_ptr->dst.p_size));
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " connected: sending SRC GID subnet %016llx id %016llx\n",
+		     (unsigned long long)
+		     htonll(cm_ptr->dst.gid.global.subnet_prefix),
+		     (unsigned long long)
+		     htonll(cm_ptr->dst.gid.global.interface_id));
+
+	/* queue up to work thread to avoid blocking consumer */
+	cm_ptr->state = SCM_RTU_PENDING;
+	return;
+      bail:
+	/* close socket, free cm structure and post error event */
+	dapli_cm_destroy(cm_ptr);
+	dapl_evd_connection_callback(NULL, IB_CME_LOCAL_FAILURE, NULL, ep_ptr);
+}
+
+/*
+ * ACTIVE: Create socket, connect, defer exchange QP information to CR thread
+ * to avoid blocking. 
+ */
+DAT_RETURN
+dapli_socket_connect(DAPL_EP * ep_ptr,
+		     DAT_IA_ADDRESS_PTR r_addr,
+		     DAT_CONN_QUAL r_qual, DAT_COUNT p_size, DAT_PVOID p_data)
+{
+	dp_ib_cm_handle_t cm_ptr;
+	int ret;
+	DAPL_IA *ia_ptr = ep_ptr->header.owner_ia;
+	struct sockaddr_in addr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " connect: r_qual %d p_size=%d\n",
+		     r_qual, p_size);
+
+	cm_ptr = dapli_cm_create();
+	if (cm_ptr == NULL)
+		return DAT_INSUFFICIENT_RESOURCES;
+
+	/* create, connect, sockopt, and exchange QP information */
+	if ((cm_ptr->socket =
+	     socket(AF_INET, SOCK_STREAM, 0)) == DAPL_INVALID_SOCKET) {
+		dapl_os_free(cm_ptr, sizeof(*cm_ptr));
+		return DAT_INSUFFICIENT_RESOURCES;
+	}
+
+	ret = dapl_config_socket(cm_ptr->socket);
+	if (ret < 0) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " socket connect: config socket %d ERR %d %s\n",
+			 cm_ptr->socket, ret, strerror(errno));
+		goto bail;
+	}
+
+	dapl_os_memcpy(&addr, r_addr, sizeof(addr));
+	addr.sin_port = htons(r_qual);
+	ret = dapl_connect_socket(cm_ptr->socket, (struct sockaddr *)&addr,
+				  sizeof(addr));
+	if (ret && ret != EAGAIN) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " socket connect ERROR: %s -> %s r_qual %d\n",
+			 strerror(errno),
+			 inet_ntoa(addr.sin_addr), (unsigned int)r_qual);
+		dapli_cm_destroy(cm_ptr);
+		return DAT_INVALID_ADDRESS;
+	}
+
+	/* Send QP info, IA address, and private data */
+	cm_ptr->dst.qpn = htonl(ep_ptr->qp_handle->qp_num);
+#ifdef DAT_EXTENSIONS
+	cm_ptr->dst.qp_type = htons(ep_ptr->qp_handle->qp_type);
+#endif
+	cm_ptr->dst.port = htons(ia_ptr->hca_ptr->port_num);
+	cm_ptr->dst.lid = ia_ptr->hca_ptr->ib_trans.lid;
+	cm_ptr->dst.gid = ia_ptr->hca_ptr->ib_trans.gid;
+
+	/* save references */
+	cm_ptr->hca = ia_ptr->hca_ptr;
+	cm_ptr->ep = ep_ptr;
+	cm_ptr->dst.ia_address = ia_ptr->hca_ptr->hca_address;
+	if (p_size) {
+		cm_ptr->dst.p_size = htonl(p_size);
+		dapl_os_memcpy(cm_ptr->p_data, p_data, p_size);
+	}
+
+	/* connected or pending, either way results via async event */
+	if (ret == 0)
+		dapli_socket_connected(cm_ptr, 0);
+	else
+		cm_ptr->state = SCM_CONN_PENDING;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " connect: socket %d to %s r_qual %d pending\n",
+		     cm_ptr->socket,
+		     inet_ntoa(addr.sin_addr), (unsigned int)r_qual);
+
+	dapli_cm_queue(cm_ptr);
+	return DAT_SUCCESS;
+      bail:
+	dapl_log(DAPL_DBG_TYPE_ERR,
+		 " socket connect ERROR: %s query lid(0x%x)/gid"
+		 " -> %s r_qual %d\n",
+		 strerror(errno), ntohs(cm_ptr->dst.lid),
+		 inet_ntoa(((struct sockaddr_in *)r_addr)->sin_addr),
+		 (unsigned int)r_qual);
+
+	/* close socket, free cm structure */
+	dapli_cm_destroy(cm_ptr);
+	return DAT_INTERNAL_ERROR;
+}
+
+/*
+ * ACTIVE: exchange QP information, called from CR thread
+ */
+static void dapli_socket_connect_rtu(dp_ib_cm_handle_t cm_ptr)
+{
+	DAPL_EP *ep_ptr = cm_ptr->ep;
+	int len;
+	short rtu_data = htons(0x0E0F);
+	ib_cm_events_t event = IB_CME_DESTINATION_REJECT;
+
+	/* read DST information into cm_ptr, overwrite SRC info */
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " connect_rtu: recv peer QP data\n");
+
+	len = recv(cm_ptr->socket, (char *)&cm_ptr->dst, sizeof(ib_qp_cm_t), 0);
+	if (len != sizeof(ib_qp_cm_t) || ntohs(cm_ptr->dst.ver) != DSCM_VER) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " CONN_RTU read: ERR %s, rcnt=%d, ver=%d -> %s\n",
+			 strerror(errno), len, cm_ptr->dst.ver,
+			 inet_ntoa(((struct sockaddr_in *)
+				    ep_ptr->param.remote_ia_address_ptr)->
+				   sin_addr));
+		goto bail;
+	}
+	/* check for consumer reject */
+	if (cm_ptr->dst.rej) {
+		dapl_log(DAPL_DBG_TYPE_CM,
+			 " CONN_RTU read: PEER REJ reason=0x%x -> %s\n",
+			 ntohs(cm_ptr->dst.rej),
+			 inet_ntoa(((struct sockaddr_in *)
+				    ep_ptr->param.remote_ia_address_ptr)->
+				   sin_addr));
+		event = IB_CME_DESTINATION_REJECT_PRIVATE_DATA;
+		goto bail;
+	}
+
+	/* convert peer response values to host order */
+	cm_ptr->dst.port = ntohs(cm_ptr->dst.port);
+	cm_ptr->dst.lid = ntohs(cm_ptr->dst.lid);
+	cm_ptr->dst.qpn = ntohl(cm_ptr->dst.qpn);
+#ifdef DAT_EXTENSIONS
+	cm_ptr->dst.qp_type = ntohs(cm_ptr->dst.qp_type);
+#endif
+	cm_ptr->dst.p_size = ntohl(cm_ptr->dst.p_size);
+
+	/* save remote address information */
+	dapl_os_memcpy(&ep_ptr->remote_ia_address,
+		       &cm_ptr->dst.ia_address,
+		       sizeof(ep_ptr->remote_ia_address));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " CONN_RTU: DST %s port=0x%x lid=0x%x,"
+		     " qpn=0x%x, qp_type=%d, psize=%d\n",
+		     inet_ntoa(((struct sockaddr_in *)
+				&cm_ptr->dst.ia_address)->sin_addr),
+		     cm_ptr->dst.port, cm_ptr->dst.lid,
+		     cm_ptr->dst.qpn, cm_ptr->dst.qp_type, cm_ptr->dst.p_size);
+
+	/* validate private data size before reading */
+	if (cm_ptr->dst.p_size > IB_MAX_REP_PDATA_SIZE) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " CONN_RTU read: psize (%d) wrong -> %s\n",
+			 cm_ptr->dst.p_size, inet_ntoa(((struct sockaddr_in *)
+							ep_ptr->param.
+							remote_ia_address_ptr)->
+						       sin_addr));
+		goto bail;
+	}
+
+	/* read private data into cm_handle if any present */
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " socket connected, read private data\n");
+	if (cm_ptr->dst.p_size) {
+		len =
+		    recv(cm_ptr->socket, cm_ptr->p_data, cm_ptr->dst.p_size, 0);
+		if (len != cm_ptr->dst.p_size) {
+			dapl_log(DAPL_DBG_TYPE_ERR,
+				 " CONN_RTU read pdata: ERR %s, rcnt=%d -> %s\n",
+				 strerror(errno), len,
+				 inet_ntoa(((struct sockaddr_in *)
+					    ep_ptr->param.
+					    remote_ia_address_ptr)->sin_addr));
+			goto bail;
+		}
+	}
+
+	/* modify QP to RTR and then to RTS with remote info */
+	dapl_os_lock(&ep_ptr->header.lock);
+	if (dapls_modify_qp_state(ep_ptr->qp_handle,
+				  IBV_QPS_RTR, cm_ptr) != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " CONN_RTU: QPS_RTR ERR %s -> %s\n",
+			 strerror(errno), inet_ntoa(((struct sockaddr_in *)
+						     ep_ptr->param.
+						     remote_ia_address_ptr)->
+						    sin_addr));
+		dapl_os_unlock(&ep_ptr->header.lock);
+		goto bail;
+	}
+	if (dapls_modify_qp_state(ep_ptr->qp_handle,
+				  IBV_QPS_RTS, cm_ptr) != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " CONN_RTU: QPS_RTS ERR %s -> %s\n",
+			 strerror(errno), inet_ntoa(((struct sockaddr_in *)
+						     ep_ptr->param.
+						     remote_ia_address_ptr)->
+						    sin_addr));
+		dapl_os_unlock(&ep_ptr->header.lock);
+		goto bail;
+	}
+	dapl_os_unlock(&ep_ptr->header.lock);
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " connect_rtu: send RTU\n");
+
+	/* complete handshake after final QP state change */
+	if (send(cm_ptr->socket, (char *)&rtu_data, sizeof(rtu_data), 0) == -1) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " CONN_RTU: write error = %s\n", strerror(errno));
+		goto bail;
+	}
+	/* init cm_handle and post the event with private data */
+	ep_ptr->cm_handle = cm_ptr;
+	cm_ptr->state = SCM_CONNECTED;
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " ACTIVE: connected!\n");
+
+#ifdef DAT_EXTENSIONS
+	if (cm_ptr->dst.qp_type == IBV_QPT_UD) {
+		DAT_IB_EXTENSION_EVENT_DATA xevent;
+
+		/* post EVENT, modify_qp created ah */
+		xevent.status = 0;
+		xevent.type = DAT_IB_UD_REMOTE_AH;
+		xevent.remote_ah.ah = cm_ptr->ah;
+		xevent.remote_ah.qpn = cm_ptr->dst.qpn;
+		dapl_os_memcpy(&xevent.remote_ah.ia_addr,
+			       &cm_ptr->dst.ia_address,
+			       sizeof(cm_ptr->dst.ia_address));
+
+		dapls_evd_post_connection_event_ext((DAPL_EVD *) ep_ptr->param.
+						    connect_evd_handle,
+						    DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED,
+						    (DAT_EP_HANDLE) ep_ptr,
+						    (DAT_COUNT) cm_ptr->dst.
+						    p_size,
+						    (DAT_PVOID *) cm_ptr->
+						    p_data,
+						    (DAT_PVOID *) & xevent);
+	} else
+#endif
+		dapl_evd_connection_callback(cm_ptr,
+					     IB_CME_CONNECTED,
+					     cm_ptr->p_data, ep_ptr);
+	return;
+      bail:
+	/* close socket, free cm structure and post error event */
+	dapli_cm_destroy(cm_ptr);
+	dapls_ib_reinit_ep(ep_ptr);	/* reset QP state */
+	dapl_evd_connection_callback(NULL, event, NULL, ep_ptr);
+}
+
+/*
+ * PASSIVE: Create socket, listen, accept, exchange QP information 
+ */
+DAT_RETURN
+dapli_socket_listen(DAPL_IA * ia_ptr, DAT_CONN_QUAL serviceID, DAPL_SP * sp_ptr)
+{
+	struct sockaddr_in addr;
+	ib_cm_srvc_handle_t cm_ptr = NULL;
+	int opt = 1;
+	DAT_RETURN dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " listen(ia_ptr %p ServiceID %d sp_ptr %p)\n",
+		     ia_ptr, serviceID, sp_ptr);
+
+	cm_ptr = dapli_cm_create();
+	if (cm_ptr == NULL)
+		return DAT_INSUFFICIENT_RESOURCES;
+
+	cm_ptr->sp = sp_ptr;
+	cm_ptr->hca = ia_ptr->hca_ptr;
+
+	/* bind, listen, set sockopt, accept, exchange data */
+	if ((cm_ptr->socket =
+	     socket(AF_INET, SOCK_STREAM, 0)) == DAPL_INVALID_SOCKET) {
+		dapl_log(DAPL_DBG_TYPE_ERR, " ERR: listen socket create: %s\n",
+			 strerror(errno));
+		dat_status = DAT_INSUFFICIENT_RESOURCES;
+		goto bail;
+	}
+
+	setsockopt(cm_ptr->socket, SOL_SOCKET, SO_REUSEADDR,
+		   (char *)&opt, sizeof(opt));
+	addr.sin_port = htons(serviceID);
+	addr.sin_family = AF_INET;
+	addr.sin_addr.s_addr = INADDR_ANY;
+
+	if ((bind(cm_ptr->socket, (struct sockaddr *)&addr, sizeof(addr)) < 0)
+	    || (listen(cm_ptr->socket, 128) < 0)) {
+		dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			     " listen: ERROR %s on conn_qual 0x%x\n",
+			     strerror(errno), serviceID);
+		if (errno == EADDRINUSE)
+			dat_status = DAT_CONN_QUAL_IN_USE;
+		else
+			dat_status = DAT_CONN_QUAL_UNAVAILABLE;
+		goto bail;
+	}
+
+	/* set cm_handle for this service point, save listen socket */
+	sp_ptr->cm_srvc_handle = cm_ptr;
+
+	/* queue up listen socket to process inbound CR's */
+	cm_ptr->state = SCM_LISTEN;
+	dapli_cm_queue(cm_ptr);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " listen: qual 0x%x cr %p s_fd %d\n",
+		     ntohs(serviceID), cm_ptr, cm_ptr->socket);
+
+	return dat_status;
+      bail:
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " listen: ERROR on conn_qual 0x%x\n", serviceID);
+	dapli_cm_destroy(cm_ptr);
+	return dat_status;
+}
+
+/*
+ * PASSIVE: accept socket 
+ */
+static void dapli_socket_accept(ib_cm_srvc_handle_t cm_ptr)
+{
+	dp_ib_cm_handle_t acm_ptr;
+	int len;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " socket_accept\n");
+
+	/* Allocate accept CM and initialize */
+	if ((acm_ptr = dapli_cm_create()) == NULL)
+		return;
+
+	acm_ptr->sp = cm_ptr->sp;
+	acm_ptr->hca = cm_ptr->hca;
+
+	len = sizeof(acm_ptr->dst.ia_address);
+	acm_ptr->socket = accept(cm_ptr->socket,
+				 (struct sockaddr *)&acm_ptr->dst.ia_address,
+				 (socklen_t *) & len);
+	if (acm_ptr->socket == DAPL_INVALID_SOCKET) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " accept: ERR %s on FD %d l_cr %p\n",
+			 strerror(errno), cm_ptr->socket, cm_ptr);
+		goto bail;
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " socket accepted, queue new cm %p\n", acm_ptr);
+
+	acm_ptr->state = SCM_ACCEPTING;
+	dapli_cm_queue(acm_ptr);
+	return;
+      bail:
+	/* close socket, free cm structure, active will see socket close as reject */
+	dapli_cm_destroy(acm_ptr);
+}
+
+/*
+ * PASSIVE: receive peer QP information, private data, post cr_event 
+ */
+static void dapli_socket_accept_data(ib_cm_srvc_handle_t acm_ptr)
+{
+	int len;
+	void *p_data = NULL;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " socket accepted, read QP data\n");
+
+	/* read in DST QP info, IA address. check for private data */
+	len =
+	    recv(acm_ptr->socket, (char *)&acm_ptr->dst, sizeof(ib_qp_cm_t), 0);
+	if (len != sizeof(ib_qp_cm_t) || ntohs(acm_ptr->dst.ver) != DSCM_VER) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " accept read: ERR %s, rcnt=%d, ver=%d\n",
+			 strerror(errno), len, ntohs(acm_ptr->dst.ver));
+		goto bail;
+	}
+
+	/* convert accepted values to host order */
+	acm_ptr->dst.port = ntohs(acm_ptr->dst.port);
+	acm_ptr->dst.lid = ntohs(acm_ptr->dst.lid);
+	acm_ptr->dst.qpn = ntohl(acm_ptr->dst.qpn);
+#ifdef DAT_EXTENSIONS
+	acm_ptr->dst.qp_type = ntohs(acm_ptr->dst.qp_type);
+#endif
+	acm_ptr->dst.p_size = ntohl(acm_ptr->dst.p_size);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " accept: DST %s port=0x%x lid=0x%x, qpn=0x%x, psize=%d\n",
+		     inet_ntoa(((struct sockaddr_in *)&acm_ptr->dst.
+				ia_address)->sin_addr), acm_ptr->dst.port,
+		     acm_ptr->dst.lid, acm_ptr->dst.qpn, acm_ptr->dst.p_size);
+
+	/* validate private data size before reading */
+	if (acm_ptr->dst.p_size > IB_MAX_REQ_PDATA_SIZE) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " accept read: psize (%d) wrong\n",
+			     acm_ptr->dst.p_size);
+		goto bail;
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " socket accepted, read private data\n");
+
+	/* read private data into cm_handle if any present */
+	if (acm_ptr->dst.p_size) {
+		len =
+		    recv(acm_ptr->socket, acm_ptr->p_data, acm_ptr->dst.p_size,
+			 0);
+		if (len != acm_ptr->dst.p_size) {
+			dapl_log(DAPL_DBG_TYPE_ERR,
+				 " accept read pdata: ERR %s, rcnt=%d\n",
+				 strerror(errno), len);
+			goto bail;
+		}
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, " accept: psize=%d read\n", len);
+		p_data = acm_ptr->p_data;
+	}
+
+	acm_ptr->state = SCM_ACCEPTING_DATA;
+
+#ifdef DAT_EXTENSIONS
+	if (acm_ptr->dst.qp_type == IBV_QPT_UD) {
+		DAT_IB_EXTENSION_EVENT_DATA xevent;
+
+		/* post EVENT, modify_qp created ah */
+		xevent.status = 0;
+		xevent.type = DAT_IB_UD_CONNECT_REQUEST;
+
+		dapls_evd_post_cr_event_ext(acm_ptr->sp,
+					    DAT_IB_UD_CONNECTION_REQUEST_EVENT,
+					    acm_ptr,
+					    (DAT_COUNT) acm_ptr->dst.p_size,
+					    (DAT_PVOID *) acm_ptr->p_data,
+					    (DAT_PVOID *) & xevent);
+	} else
+#endif
+		/* trigger CR event and return SUCCESS */
+		dapls_cr_callback(acm_ptr,
+				  IB_CME_CONNECTION_REQUEST_PENDING,
+				  p_data, acm_ptr->sp);
+	return;
+      bail:
+	/* close socket, free cm structure, active will see socket close as reject */
+	dapli_cm_destroy(acm_ptr);
+	return;
+}
+
+/*
+ * PASSIVE: consumer accept, send local QP information, private data, 
+ * queue on work thread to receive RTU information to avoid blocking
+ * user thread. 
+ */
+DAT_RETURN
+dapli_socket_accept_usr(DAPL_EP * ep_ptr,
+			DAPL_CR * cr_ptr, DAT_COUNT p_size, DAT_PVOID p_data)
+{
+	DAPL_IA *ia_ptr = ep_ptr->header.owner_ia;
+	dp_ib_cm_handle_t cm_ptr = cr_ptr->ib_cm_handle;
+	ib_qp_cm_t local;
+	struct iovec iov[2];
+	int len;
+
+	if (p_size > IB_MAX_REP_PDATA_SIZE)
+		return DAT_LENGTH_ERROR;
+
+	/* must have a accepted socket */
+	if (cm_ptr->socket == DAPL_INVALID_SOCKET)
+		return DAT_INTERNAL_ERROR;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " ACCEPT_USR: remote port=0x%x lid=0x%x"
+		     " qpn=0x%x qp_type %d, psize=%d\n",
+		     cm_ptr->dst.port, cm_ptr->dst.lid,
+		     cm_ptr->dst.qpn, cm_ptr->dst.qp_type, cm_ptr->dst.p_size);
+
+#ifdef DAT_EXTENSIONS
+	if (cm_ptr->dst.qp_type == IBV_QPT_UD &&
+	    ep_ptr->qp_handle->qp_type != IBV_QPT_UD) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " ACCEPT_USR: ERR remote QP is UD,"
+			     ", but local QP is not\n");
+		return (DAT_INVALID_HANDLE | DAT_INVALID_HANDLE_EP);
+	}
+#endif
+
+	/* modify QP to RTR and then to RTS with remote info already read */
+	dapl_os_lock(&ep_ptr->header.lock);
+	if (dapls_modify_qp_state(ep_ptr->qp_handle,
+				  IBV_QPS_RTR, cm_ptr) != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " ACCEPT_USR: QPS_RTR ERR %s -> %s\n",
+			 strerror(errno), inet_ntoa(((struct sockaddr_in *)
+						     &cm_ptr->dst.ia_address)->
+						    sin_addr));
+		dapl_os_unlock(&ep_ptr->header.lock);
+		goto bail;
+	}
+	if (dapls_modify_qp_state(ep_ptr->qp_handle,
+				  IBV_QPS_RTS, cm_ptr) != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " ACCEPT_USR: QPS_RTS ERR %s -> %s\n",
+			 strerror(errno), inet_ntoa(((struct sockaddr_in *)
+						     &cm_ptr->dst.ia_address)->
+						    sin_addr));
+		dapl_os_unlock(&ep_ptr->header.lock);
+		goto bail;
+	}
+	dapl_os_unlock(&ep_ptr->header.lock);
+
+	/* save remote address information */
+	dapl_os_memcpy(&ep_ptr->remote_ia_address,
+		       &cm_ptr->dst.ia_address,
+		       sizeof(ep_ptr->remote_ia_address));
+
+	/* send our QP info, IA address, pdata. Don't overwrite dst data */
+	local.ver = htons(DSCM_VER);
+	local.rej = 0;
+	local.qpn = htonl(ep_ptr->qp_handle->qp_num);
+	local.qp_type = htons(ep_ptr->qp_handle->qp_type);
+	local.port = htons(ia_ptr->hca_ptr->port_num);
+	local.lid = ia_ptr->hca_ptr->ib_trans.lid;
+	local.gid = ia_ptr->hca_ptr->ib_trans.gid;
+	local.ia_address = ia_ptr->hca_ptr->hca_address;
+	local.p_size = htonl(p_size);
+	iov[0].iov_base = (void *)&local;
+	iov[0].iov_len = sizeof(ib_qp_cm_t);
+	if (p_size) {
+		iov[1].iov_base = p_data;
+		iov[1].iov_len = p_size;
+		len = writev(cm_ptr->socket, iov, 2);
+	} else {
+		len = writev(cm_ptr->socket, iov, 1);
+	}
+
+	if (len != (p_size + sizeof(ib_qp_cm_t))) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " ACCEPT_USR: ERR %s, wcnt=%d -> %s\n",
+			 strerror(errno), len, inet_ntoa(((struct sockaddr_in *)
+							  &cm_ptr->dst.
+							  ia_address)->
+							 sin_addr));
+		goto bail;
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " ACCEPT_USR: local port=0x%x lid=0x%x"
+		     " qpn=0x%x psize=%d\n",
+		     ntohs(local.port), ntohs(local.lid),
+		     ntohl(local.qpn), ntohl(local.p_size));
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " ACCEPT_USR SRC GID subnet %016llx id %016llx\n",
+		     (unsigned long long)
+		     htonll(local.gid.global.subnet_prefix),
+		     (unsigned long long)
+		     htonll(local.gid.global.interface_id));
+
+	/* save state and reference to EP, queue for RTU data */
+	cm_ptr->ep = ep_ptr;
+	cm_ptr->hca = ia_ptr->hca_ptr;
+	cm_ptr->state = SCM_ACCEPTED;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " PASSIVE: accepted!\n");
+	return DAT_SUCCESS;
+      bail:
+	dapli_cm_destroy(cm_ptr);
+	dapls_ib_reinit_ep(ep_ptr);	/* reset QP state */
+	return DAT_INTERNAL_ERROR;
+}
+
+/*
+ * PASSIVE: read RTU from active peer, post CONN event
+ */
+void dapli_socket_accept_rtu(dp_ib_cm_handle_t cm_ptr)
+{
+	int len;
+	short rtu_data = 0;
+
+	/* complete handshake after final QP state change */
+	len = recv(cm_ptr->socket, (char *)&rtu_data, sizeof(rtu_data), 0);
+	if (len != sizeof(rtu_data) || ntohs(rtu_data) != 0x0e0f) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " ACCEPT_RTU: ERR %s, rcnt=%d rdata=%x\n",
+			 strerror(errno), len, ntohs(rtu_data),
+			 inet_ntoa(((struct sockaddr_in *)
+				    &cm_ptr->dst.ia_address)->sin_addr));
+		goto bail;
+	}
+
+	/* save state and reference to EP, queue for disc event */
+	cm_ptr->state = SCM_CONNECTED;
+
+	/* final data exchange if remote QP state is good to go */
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " PASSIVE: connected!\n");
+
+#ifdef DAT_EXTENSIONS
+	if (cm_ptr->dst.qp_type == IBV_QPT_UD) {
+		DAT_IB_EXTENSION_EVENT_DATA xevent;
+
+		/* post EVENT, modify_qp created ah */
+		xevent.status = 0;
+		xevent.type = DAT_IB_UD_PASSIVE_REMOTE_AH;
+		xevent.remote_ah.ah = cm_ptr->ah;
+		xevent.remote_ah.qpn = cm_ptr->dst.qpn;
+		dapl_os_memcpy(&xevent.remote_ah.ia_addr,
+			       &cm_ptr->dst.ia_address,
+			       sizeof(cm_ptr->dst.ia_address));
+
+		dapls_evd_post_connection_event_ext((DAPL_EVD *) cm_ptr->ep->
+						    param.connect_evd_handle,
+						    DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED,
+						    (DAT_EP_HANDLE) cm_ptr->ep,
+						    (DAT_COUNT) cm_ptr->dst.
+						    p_size,
+						    (DAT_PVOID *) cm_ptr->
+						    p_data,
+						    (DAT_PVOID *) & xevent);
+	} else
+#endif
+		dapls_cr_callback(cm_ptr, IB_CME_CONNECTED, NULL, cm_ptr->sp);
+	return;
+      bail:
+	dapls_ib_reinit_ep(cm_ptr->ep);	/* reset QP state */
+	dapli_cm_destroy(cm_ptr);
+	dapls_cr_callback(cm_ptr, IB_CME_DESTINATION_REJECT, NULL, cm_ptr->sp);
+}
+
+/*
+ * dapls_ib_connect
+ *
+ * Initiate a connection with the passive listener on another node
+ *
+ * Input:
+ *	ep_handle,
+ *	remote_ia_address,
+ *	remote_conn_qual,
+ *	prd_size		size of private data and structure
+ *	prd_prt			pointer to private data structure
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN
+dapls_ib_connect(IN DAT_EP_HANDLE ep_handle,
+		 IN DAT_IA_ADDRESS_PTR remote_ia_address,
+		 IN DAT_CONN_QUAL remote_conn_qual,
+		 IN DAT_COUNT private_data_size, IN void *private_data)
+{
+	DAPL_EP *ep_ptr;
+	ib_qp_handle_t qp_ptr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " connect(ep_handle %p ....)\n", ep_handle);
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+	qp_ptr = ep_ptr->qp_handle;
+
+	return (dapli_socket_connect(ep_ptr, remote_ia_address,
+				     remote_conn_qual,
+				     private_data_size, private_data));
+}
+
+/*
+ * dapls_ib_disconnect
+ *
+ * Disconnect an EP
+ *
+ * Input:
+ *	ep_handle,
+ *	disconnect_flags
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ */
+DAT_RETURN
+dapls_ib_disconnect(IN DAPL_EP * ep_ptr, IN DAT_CLOSE_FLAGS close_flags)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     "dapls_ib_disconnect(ep_handle %p ....)\n", ep_ptr);
+
+	/* reinit to modify QP state */
+	dapls_ib_reinit_ep(ep_ptr);
+
+	if (ep_ptr->cm_handle == NULL ||
+	    ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED)
+		return DAT_SUCCESS;
+	else
+		return (dapli_socket_disconnect(ep_ptr->cm_handle));
+}
+
+/*
+ * dapls_ib_disconnect_clean
+ *
+ * Clean up outstanding connection data. This routine is invoked
+ * after the final disconnect callback has occurred. Only on the
+ * ACTIVE side of a connection.
+ *
+ * Input:
+ *	ep_ptr		DAPL_EP
+ *	active		Indicates active side of connection
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	void
+ *
+ */
+void
+dapls_ib_disconnect_clean(IN DAPL_EP * ep_ptr,
+			  IN DAT_BOOLEAN active,
+			  IN const ib_cm_events_t ib_cm_event)
+{
+	if (ep_ptr->cm_handle)
+		dapli_cm_destroy(ep_ptr->cm_handle);
+
+	return;
+}
+
+/*
+ * dapl_ib_setup_conn_listener
+ *
+ * Have the CM set up a connection listener.
+ *
+ * Input:
+ *	ibm_hca_handle		HCA handle
+ *	qp_handle			QP handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INTERNAL_ERROR
+ *	DAT_CONN_QUAL_UNAVAILBLE
+ *	DAT_CONN_QUAL_IN_USE
+ *
+ */
+DAT_RETURN
+dapls_ib_setup_conn_listener(IN DAPL_IA * ia_ptr,
+			     IN DAT_UINT64 ServiceID, IN DAPL_SP * sp_ptr)
+{
+	return (dapli_socket_listen(ia_ptr, ServiceID, sp_ptr));
+}
+
+/*
+ * dapl_ib_remove_conn_listener
+ *
+ * Have the CM remove a connection listener.
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	ServiceID		IB Channel Service ID
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN
+dapls_ib_remove_conn_listener(IN DAPL_IA * ia_ptr, IN DAPL_SP * sp_ptr)
+{
+	ib_cm_srvc_handle_t cm_ptr = sp_ptr->cm_srvc_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     "dapls_ib_remove_conn_listener(ia_ptr %p sp_ptr %p cm_ptr %p)\n",
+		     ia_ptr, sp_ptr, cm_ptr);
+
+	/* close accepted socket, free cm_srvc_handle and return */
+	if (cm_ptr != NULL) {
+		if (cm_ptr->socket != DAPL_INVALID_SOCKET) {
+			closesocket(cm_ptr->socket);
+			cm_ptr->socket = DAPL_INVALID_SOCKET;
+		}
+		/* cr_thread will free */
+		cm_ptr->state = SCM_DESTROY;
+		sp_ptr->cm_srvc_handle = NULL;
+		if (send(g_scm[1], "w", sizeof "w", 0) == -1)
+			dapl_log(DAPL_DBG_TYPE_CM,
+				 " cm_destroy: thread wakeup error = %s\n",
+				 strerror(errno));
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_accept_connection
+ *
+ * Perform necessary steps to accept a connection
+ *
+ * Input:
+ *	cr_handle
+ *	ep_handle
+ *	private_data_size
+ *	private_data
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INTERNAL_ERROR
+ *
+ */
+DAT_RETURN
+dapls_ib_accept_connection(IN DAT_CR_HANDLE cr_handle,
+			   IN DAT_EP_HANDLE ep_handle,
+			   IN DAT_COUNT p_size, IN const DAT_PVOID p_data)
+{
+	DAPL_CR *cr_ptr;
+	DAPL_EP *ep_ptr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     "dapls_ib_accept_connection(cr %p ep %p prd %p,%d)\n",
+		     cr_handle, ep_handle, p_data, p_size);
+
+	cr_ptr = (DAPL_CR *) cr_handle;
+	ep_ptr = (DAPL_EP *) ep_handle;
+
+	/* allocate and attach a QP if necessary */
+	if (ep_ptr->qp_state == DAPL_QP_STATE_UNATTACHED) {
+		DAT_RETURN status;
+		status = dapls_ib_qp_alloc(ep_ptr->header.owner_ia,
+					   ep_ptr, ep_ptr);
+		if (status != DAT_SUCCESS)
+			return status;
+	}
+	return (dapli_socket_accept_usr(ep_ptr, cr_ptr, p_size, p_data));
+}
+
+/*
+ * dapls_ib_reject_connection
+ *
+ * Reject a connection
+ *
+ * Input:
+ *	cr_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INTERNAL_ERROR
+ *
+ */
+DAT_RETURN
+dapls_ib_reject_connection(IN dp_ib_cm_handle_t cm_ptr,
+			   IN int reason,
+			   IN DAT_COUNT psize, IN const DAT_PVOID pdata)
+{
+	struct iovec iov[2];
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " reject(cm %p reason %x, pdata %p, psize %d)\n",
+		     cm_ptr, reason, pdata, psize);
+
+	/* write reject data to indicate reject */
+	if (cm_ptr->socket != DAPL_INVALID_SOCKET) {
+		cm_ptr->dst.rej = (uint16_t) reason;
+		cm_ptr->dst.rej = htons(cm_ptr->dst.rej);
+
+		iov[0].iov_base = (void *)&cm_ptr->dst;
+		iov[0].iov_len = sizeof(ib_qp_cm_t);
+		if (psize) {
+			iov[1].iov_base = pdata;
+			iov[1].iov_len = psize;
+			writev(cm_ptr->socket, iov, 2);
+		} else {
+			writev(cm_ptr->socket, iov, 1);
+		}
+
+		closesocket(cm_ptr->socket);
+		cm_ptr->socket = DAPL_INVALID_SOCKET;
+	}
+
+	/* cr_thread will destroy CR */
+	cm_ptr->state = SCM_REJECTED;
+	if (send(g_scm[1], "w", sizeof "w", 0) == -1)
+		dapl_log(DAPL_DBG_TYPE_CM,
+			 " cm_destroy: thread wakeup error = %s\n",
+			 strerror(errno));
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_cm_remote_addr
+ *
+ * Obtain the remote IP address given a connection
+ *
+ * Input:
+ *	cr_handle
+ *
+ * Output:
+ *	remote_ia_address: where to place the remote address
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *
+ */
+DAT_RETURN
+dapls_ib_cm_remote_addr(IN DAT_HANDLE dat_handle,
+			OUT DAT_SOCK_ADDR6 * remote_ia_address)
+{
+	DAPL_HEADER *header;
+	dp_ib_cm_handle_t ib_cm_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     "dapls_ib_cm_remote_addr(dat_handle %p, ....)\n",
+		     dat_handle);
+
+	header = (DAPL_HEADER *) dat_handle;
+
+	if (header->magic == DAPL_MAGIC_EP)
+		ib_cm_handle = ((DAPL_EP *) dat_handle)->cm_handle;
+	else if (header->magic == DAPL_MAGIC_CR)
+		ib_cm_handle = ((DAPL_CR *) dat_handle)->ib_cm_handle;
+	else
+		return DAT_INVALID_HANDLE;
+
+	dapl_os_memcpy(remote_ia_address,
+		       &ib_cm_handle->dst.ia_address, sizeof(DAT_SOCK_ADDR6));
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_private_data_size
+ *
+ * Return the size of private data given a connection op type
+ *
+ * Input:
+ *	prd_ptr		private data pointer
+ *	conn_op		connection operation type
+ *
+ * If prd_ptr is NULL, this is a query for the max size supported by
+ * the provider, otherwise it is the actual size of the private data
+ * contained in prd_ptr.
+ *
+ *
+ * Output:
+ *	None
+ *
+ * Returns:
+ * 	length of private data
+ *
+ */
+int dapls_ib_private_data_size(IN DAPL_PRIVATE * prd_ptr,
+			       IN DAPL_PDATA_OP conn_op, IN DAPL_HCA * hca_ptr)
+{
+	int size;
+
+	switch (conn_op) {
+	case DAPL_PDATA_CONN_REQ:
+		{
+			size = IB_MAX_REQ_PDATA_SIZE;
+			break;
+		}
+	case DAPL_PDATA_CONN_REP:
+		{
+			size = IB_MAX_REP_PDATA_SIZE;
+			break;
+		}
+	case DAPL_PDATA_CONN_REJ:
+		{
+			size = IB_MAX_REJ_PDATA_SIZE;
+			break;
+		}
+	case DAPL_PDATA_CONN_DREQ:
+		{
+			size = IB_MAX_DREQ_PDATA_SIZE;
+			break;
+		}
+	case DAPL_PDATA_CONN_DREP:
+		{
+			size = IB_MAX_DREP_PDATA_SIZE;
+			break;
+		}
+	default:
+		{
+			size = 0;
+		}
+
+	}			/* end case */
+
+	return size;
+}
+
+/*
+ * Map all socket CM event codes to the DAT equivelent.
+ */
+#define DAPL_IB_EVENT_CNT	11
+
+static struct ib_cm_event_map {
+	const ib_cm_events_t ib_cm_event;
+	DAT_EVENT_NUMBER dat_event_num;
+} ib_cm_event_map[DAPL_IB_EVENT_CNT] = {
+	/* 00 */  {
+	IB_CME_CONNECTED, DAT_CONNECTION_EVENT_ESTABLISHED},
+	    /* 01 */  {
+	IB_CME_DISCONNECTED, DAT_CONNECTION_EVENT_DISCONNECTED},
+	    /* 02 */  {
+	IB_CME_DISCONNECTED_ON_LINK_DOWN,
+		    DAT_CONNECTION_EVENT_DISCONNECTED},
+	    /* 03 */  {
+	IB_CME_CONNECTION_REQUEST_PENDING, DAT_CONNECTION_REQUEST_EVENT},
+	    /* 04 */  {
+	IB_CME_CONNECTION_REQUEST_PENDING_PRIVATE_DATA,
+		    DAT_CONNECTION_REQUEST_EVENT},
+	    /* 05 */  {
+	IB_CME_DESTINATION_REJECT,
+		    DAT_CONNECTION_EVENT_NON_PEER_REJECTED},
+	    /* 06 */  {
+	IB_CME_DESTINATION_REJECT_PRIVATE_DATA,
+		    DAT_CONNECTION_EVENT_PEER_REJECTED},
+	    /* 07 */  {
+	IB_CME_DESTINATION_UNREACHABLE, DAT_CONNECTION_EVENT_UNREACHABLE},
+	    /* 08 */  {
+	IB_CME_TOO_MANY_CONNECTION_REQUESTS,
+		    DAT_CONNECTION_EVENT_NON_PEER_REJECTED},
+	    /* 09 */  {
+	IB_CME_LOCAL_FAILURE, DAT_CONNECTION_EVENT_BROKEN},
+	    /* 10 */  {
+	IB_CM_LOCAL_FAILURE, DAT_CONNECTION_EVENT_BROKEN}
+};
+
+/*
+ * dapls_ib_get_cm_event
+ *
+ * Return a DAT connection event given a provider CM event.
+ *
+ * Input:
+ *	dat_event_num	DAT event we need an equivelent CM event for
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	ib_cm_event of translated DAPL value
+ */
+DAT_EVENT_NUMBER
+dapls_ib_get_dat_event(IN const ib_cm_events_t ib_cm_event,
+		       IN DAT_BOOLEAN active)
+{
+	DAT_EVENT_NUMBER dat_event_num;
+	int i;
+
+	active = active;
+
+	if (ib_cm_event > IB_CM_LOCAL_FAILURE)
+		return (DAT_EVENT_NUMBER) 0;
+
+	dat_event_num = 0;
+	for (i = 0; i < DAPL_IB_EVENT_CNT; i++) {
+		if (ib_cm_event == ib_cm_event_map[i].ib_cm_event) {
+			dat_event_num = ib_cm_event_map[i].dat_event_num;
+			break;
+		}
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK,
+		     "dapls_ib_get_dat_event: event translate(%s) ib=0x%x dat=0x%x\n",
+		     active ? "active" : "passive", ib_cm_event, dat_event_num);
+
+	return dat_event_num;
+}
+
+/*
+ * dapls_ib_get_dat_event
+ *
+ * Return a DAT connection event given a provider CM event.
+ * 
+ * Input:
+ *	ib_cm_event	event provided to the dapl callback routine
+ *	active		switch indicating active or passive connection
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_EVENT_NUMBER of translated provider value
+ */
+ib_cm_events_t dapls_ib_get_cm_event(IN DAT_EVENT_NUMBER dat_event_num)
+{
+	ib_cm_events_t ib_cm_event;
+	int i;
+
+	ib_cm_event = 0;
+	for (i = 0; i < DAPL_IB_EVENT_CNT; i++) {
+		if (dat_event_num == ib_cm_event_map[i].dat_event_num) {
+			ib_cm_event = ib_cm_event_map[i].ib_cm_event;
+			break;
+		}
+	}
+	return ib_cm_event;
+}
+
+/* outbound/inbound CR processing thread to avoid blocking applications */
+void cr_thread(void *arg)
+{
+	struct dapl_hca *hca_ptr = arg;
+	dp_ib_cm_handle_t cr, next_cr;
+	int opt, ret;
+	socklen_t opt_len;
+	char rbuf[2];
+	struct dapl_fd_set *set;
+	enum DAPL_FD_EVENTS event;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cr_thread: ENTER hca %p\n", hca_ptr);
+	set = dapl_alloc_fd_set();
+	if (!set)
+		goto out;
+
+	dapl_os_lock(&hca_ptr->ib_trans.lock);
+	hca_ptr->ib_trans.cr_state = IB_THREAD_RUN;
+
+	while (hca_ptr->ib_trans.cr_state == IB_THREAD_RUN) {
+		dapl_fd_zero(set);
+		dapl_fd_set(g_scm[0], set, DAPL_FD_READ);
+
+		if (!dapl_llist_is_empty(&hca_ptr->ib_trans.list))
+			next_cr = dapl_llist_peek_head(&hca_ptr->ib_trans.list);
+		else
+			next_cr = NULL;
+
+		while (next_cr) {
+			cr = next_cr;
+			next_cr = dapl_llist_next_entry(&hca_ptr->ib_trans.list,
+							(DAPL_LLIST_ENTRY *) &
+							cr->entry);
+			if (cr->state == SCM_DESTROY
+			    || hca_ptr->ib_trans.cr_state != IB_THREAD_RUN) {
+				dapl_llist_remove_entry(&hca_ptr->ib_trans.list,
+							(DAPL_LLIST_ENTRY *) &
+							cr->entry);
+				dapl_os_free(cr, sizeof(*cr));
+				continue;
+			}
+			if (cr->socket == DAPL_INVALID_SOCKET)
+				continue;
+
+			event = (cr->state == SCM_CONN_PENDING) ?
+			    DAPL_FD_WRITE : DAPL_FD_READ;
+			if (dapl_fd_set(cr->socket, set, event)) {
+				dapl_log(DAPL_DBG_TYPE_ERR,
+					 " cr_thread: DESTROY CR st=%d fd %d"
+					 " -> %s\n", cr->state, cr->socket,
+					 inet_ntoa(((struct sockaddr_in *)
+						    &cr->dst.ia_address)->
+						   sin_addr));
+				dapli_cm_destroy(cr);
+				continue;
+			}
+
+			dapl_dbg_log(DAPL_DBG_TYPE_CM,
+				     " poll cr=%p, socket=%d\n", cr,
+				     cr->socket);
+			dapl_os_unlock(&hca_ptr->ib_trans.lock);
+
+			ret = dapl_poll(cr->socket, event);
+
+			dapl_dbg_log(DAPL_DBG_TYPE_CM,
+				     " poll ret=0x%x cr->state=%d socket=%d\n",
+				     ret, cr->state, cr->socket);
+
+			/* data on listen, qp exchange, and on disconnect request */
+			if (ret == DAPL_FD_READ) {
+				if (cr->socket != DAPL_INVALID_SOCKET) {
+					switch (cr->state) {
+					case SCM_LISTEN:
+						dapli_socket_accept(cr);
+						break;
+					case SCM_ACCEPTING:
+						dapli_socket_accept_data(cr);
+						break;
+					case SCM_ACCEPTED:
+						dapli_socket_accept_rtu(cr);
+						break;
+					case SCM_RTU_PENDING:
+						dapli_socket_connect_rtu(cr);
+						break;
+					case SCM_CONNECTED:
+						dapli_socket_disconnect(cr);
+						break;
+					default:
+						break;
+					}
+				}
+				/* connect socket is writable, check status */
+			} else if (ret == DAPL_FD_WRITE || ret == DAPL_FD_ERROR) {
+				if (cr->state == SCM_CONN_PENDING) {
+					opt = 0;
+					opt_len = sizeof(opt);
+					ret = getsockopt(cr->socket, SOL_SOCKET,
+							 SO_ERROR, (char *)&opt,
+							 &opt_len);
+					if (!ret)
+						dapli_socket_connected(cr, opt);
+					else
+						dapli_socket_connected(cr,
+								       errno);
+				} else {
+					dapl_log(DAPL_DBG_TYPE_CM,
+						 " CM poll ERR, wrong state(%d) -> %s SKIP\n",
+						 cr->state,
+						 inet_ntoa(((struct sockaddr_in
+							     *)&cr->dst.
+							    ia_address)->
+							   sin_addr));
+				}
+			} else if (ret != 0) {
+				dapl_log(DAPL_DBG_TYPE_CM,
+					 " CM poll warning %s, ret=%d st=%d -> %s\n",
+					 strerror(errno), ret, cr->state,
+					 inet_ntoa(((struct sockaddr_in *)
+						    &cr->dst.ia_address)->
+						   sin_addr));
+
+				/* POLLUP, NVAL, or poll error, issue event if connected */
+				if (cr->state == SCM_CONNECTED)
+					dapli_socket_disconnect(cr);
+			}
+
+			dapl_os_lock(&hca_ptr->ib_trans.lock);
+		}
+
+		dapl_os_unlock(&hca_ptr->ib_trans.lock);
+		dapl_select(set);
+
+		/* if pipe used to wakeup, consume */
+		while (dapl_poll(g_scm[0], DAPL_FD_READ) == DAPL_FD_READ) {
+			if (recv(g_scm[0], rbuf, 2, 0) == -1)
+				dapl_log(DAPL_DBG_TYPE_CM,
+					 " cr_thread: read pipe error = %s\n",
+					 strerror(errno));
+		}
+		dapl_os_lock(&hca_ptr->ib_trans.lock);
+	}
+
+	dapl_os_unlock(&hca_ptr->ib_trans.lock);
+	free(set);
+      out:
+	hca_ptr->ib_trans.cr_state = IB_THREAD_EXIT;
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cr_thread(hca %p) exit\n", hca_ptr);
+}
diff --git a/dapl/openib_scm/dapl_ib_cq.c b/dapl/openib_scm/dapl_ib_cq.c
new file mode 100644
index 0000000..2af1889
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_cq.c
@@ -0,0 +1,705 @@
+/*
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/***************************************************************************
+ *
+ *   Module:		 uDAPL
+ *
+ *   Filename:		 dapl_ib_cq.c
+ *
+ *   Author:		 Arlin Davis
+ *
+ *   Created:		 3/10/2005
+ *
+ *   Description: 
+ *
+ *   The uDAPL openib provider - completion queue
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ *	Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ *
+ **************************************************************************/
+
+#include "openib_osd.h"
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_lmr_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_ring_buffer_util.h"
+
+#if defined(_WIN64) || defined(_WIN32)
+#include "..\..\..\..\..\etc\user\comp_channel.cpp"
+#include "..\..\..\..\..\etc\user\dlist.c"
+
+void dapli_cq_thread_destroy(struct dapl_hca *hca_ptr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread_destroy(%p)\n", hca_ptr);
+
+	if (hca_ptr->ib_trans.cq_state != IB_THREAD_RUN)
+		return;
+
+	/* destroy cr_thread and lock */
+	hca_ptr->ib_trans.cq_state = IB_THREAD_CANCEL;
+	CompChannelCancel(&hca_ptr->ib_trans.ib_cq->comp_channel);
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " cq_thread_destroy(%p) cancel\n",
+		     hca_ptr);
+	while (hca_ptr->ib_trans.cq_state != IB_THREAD_EXIT) {
+		dapl_os_sleep_usec(20000);
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread_destroy(%d) exit\n",
+		     dapl_os_getpid());
+}
+
+static void cq_thread(void *arg)
+{
+	struct dapl_hca *hca_ptr = arg;
+	struct dapl_evd *evd_ptr;
+	struct ibv_cq *ibv_cq = NULL;
+
+	hca_ptr->ib_trans.cq_state = IB_THREAD_RUN;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread: ENTER hca %p\n", hca_ptr);
+
+	/* wait on DTO event, or signal to abort */
+	while (hca_ptr->ib_trans.cq_state == IB_THREAD_RUN) {
+		if (!ibv_get_cq_event
+		    (hca_ptr->ib_trans.ib_cq, &ibv_cq, (void *)&evd_ptr)) {
+
+			if (DAPL_BAD_HANDLE(evd_ptr, DAPL_MAGIC_EVD)) {
+				ibv_ack_cq_events(ibv_cq, 1);
+				return;
+			}
+
+			/* process DTO event via callback */
+			dapl_evd_dto_callback(hca_ptr->ib_hca_handle,
+					      evd_ptr->ib_cq_handle,
+					      (void *)evd_ptr);
+
+			ibv_ack_cq_events(ibv_cq, 1);
+		}
+	}
+	hca_ptr->ib_trans.cq_state = IB_THREAD_EXIT;
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread: EXIT: hca %p \n",
+		     hca_ptr);
+}
+
+#else				// _WIN32 || _WIN64
+
+void dapli_cq_thread_destroy(struct dapl_hca *hca_ptr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread_destroy(%p)\n", hca_ptr);
+
+	if (hca_ptr->ib_trans.cq_state != IB_THREAD_RUN)
+		return;
+
+	/* destroy cr_thread and lock */
+	hca_ptr->ib_trans.cq_state = IB_THREAD_CANCEL;
+	pthread_kill(hca_ptr->ib_trans.cq_thread, SIGUSR1);
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " cq_thread_destroy(%p) cancel\n",
+		     hca_ptr);
+	while (hca_ptr->ib_trans.cq_state != IB_THREAD_EXIT) {
+		dapl_os_sleep_usec(20000);
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread_destroy(%d) exit\n",
+		     dapl_os_getpid());
+}
+
+/* catch the signal */
+static void ib_cq_handler(int signum)
+{
+	return;
+}
+
+static void cq_thread(void *arg)
+{
+	struct dapl_hca *hca_ptr = arg;
+	struct dapl_evd *evd_ptr;
+	struct ibv_cq *ibv_cq = NULL;
+	sigset_t sigset;
+
+	sigemptyset(&sigset);
+	sigaddset(&sigset, SIGUSR1);
+	pthread_sigmask(SIG_UNBLOCK, &sigset, NULL);
+	signal(SIGUSR1, ib_cq_handler);
+
+	hca_ptr->ib_trans.cq_state = IB_THREAD_RUN;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread: ENTER hca %p\n", hca_ptr);
+
+	/* wait on DTO event, or signal to abort */
+	while (hca_ptr->ib_trans.cq_state == IB_THREAD_RUN) {
+		struct pollfd cq_fd = {
+			.fd = hca_ptr->ib_trans.ib_cq->fd,
+			.events = POLLIN,
+			.revents = 0
+		};
+		if ((poll(&cq_fd, 1, -1) == 1) &&
+		    (!ibv_get_cq_event
+		     (hca_ptr->ib_trans.ib_cq, &ibv_cq, (void *)&evd_ptr))) {
+
+			if (DAPL_BAD_HANDLE(evd_ptr, DAPL_MAGIC_EVD)) {
+				ibv_ack_cq_events(ibv_cq, 1);
+				return;
+			}
+
+			/* process DTO event via callback */
+			dapl_evd_dto_callback(hca_ptr->ib_hca_handle,
+					      evd_ptr->ib_cq_handle,
+					      (void *)evd_ptr);
+
+			ibv_ack_cq_events(ibv_cq, 1);
+		}
+	}
+	hca_ptr->ib_trans.cq_state = IB_THREAD_EXIT;
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread: EXIT: hca %p \n",
+		     hca_ptr);
+}
+
+#endif				// _WIN32 || _WIN64
+
+int dapli_cq_thread_init(struct dapl_hca *hca_ptr)
+{
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread_init(%p)\n", hca_ptr);
+
+	/* create thread to process inbound connect request */
+	hca_ptr->ib_trans.cq_state = IB_THREAD_INIT;
+	dat_status =
+	    dapl_os_thread_create(cq_thread, (void *)hca_ptr,
+				  &hca_ptr->ib_trans.cq_thread);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " cq_thread_init: failed to create thread\n");
+		return 1;
+	}
+
+	/* wait for thread to start */
+	while (hca_ptr->ib_trans.cq_state != IB_THREAD_RUN) {
+		dapl_os_sleep_usec(20000);
+	}
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cq_thread_init(%d) exit\n",
+		     dapl_os_getpid());
+	return 0;
+}
+
+/*
+ * Map all verbs DTO completion codes to the DAT equivelent.
+ *
+ * Not returned by verbs:     DAT_DTO_ERR_PARTIAL_PACKET
+ */
+static struct ib_status_map {
+	int ib_status;
+	DAT_DTO_COMPLETION_STATUS dat_status;
+} ib_status_map[] = {
+	/* 00 */  {
+	IBV_WC_SUCCESS, DAT_DTO_SUCCESS},
+	    /* 01 */  {
+	IBV_WC_LOC_LEN_ERR, DAT_DTO_ERR_LOCAL_LENGTH},
+	    /* 02 */  {
+	IBV_WC_LOC_QP_OP_ERR, DAT_DTO_ERR_LOCAL_EP},
+	    /* 03 */  {
+	IBV_WC_LOC_EEC_OP_ERR, DAT_DTO_ERR_TRANSPORT},
+	    /* 04 */  {
+	IBV_WC_LOC_PROT_ERR, DAT_DTO_ERR_LOCAL_PROTECTION},
+	    /* 05 */  {
+	IBV_WC_WR_FLUSH_ERR, DAT_DTO_ERR_FLUSHED},
+	    /* 06 */  {
+	IBV_WC_MW_BIND_ERR, DAT_RMR_OPERATION_FAILED},
+	    /* 07 */  {
+	IBV_WC_BAD_RESP_ERR, DAT_DTO_ERR_BAD_RESPONSE},
+	    /* 08 */  {
+	IBV_WC_LOC_ACCESS_ERR, DAT_DTO_ERR_LOCAL_PROTECTION},
+	    /* 09 */  {
+	IBV_WC_REM_INV_REQ_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+	    /* 10 */  {
+	IBV_WC_REM_ACCESS_ERR, DAT_DTO_ERR_REMOTE_ACCESS},
+	    /* 11 */  {
+	IBV_WC_REM_OP_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+	    /* 12 */  {
+	IBV_WC_RETRY_EXC_ERR, DAT_DTO_ERR_TRANSPORT},
+	    /* 13 */  {
+	IBV_WC_RNR_RETRY_EXC_ERR, DAT_DTO_ERR_RECEIVER_NOT_READY},
+	    /* 14 */  {
+	IBV_WC_LOC_RDD_VIOL_ERR, DAT_DTO_ERR_LOCAL_PROTECTION},
+	    /* 15 */  {
+	IBV_WC_REM_INV_RD_REQ_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+	    /* 16 */  {
+	IBV_WC_REM_ABORT_ERR, DAT_DTO_ERR_REMOTE_RESPONDER},
+	    /* 17 */  {
+	IBV_WC_INV_EECN_ERR, DAT_DTO_ERR_TRANSPORT},
+	    /* 18 */  {
+	IBV_WC_INV_EEC_STATE_ERR, DAT_DTO_ERR_TRANSPORT},
+	    /* 19 */  {
+	IBV_WC_FATAL_ERR, DAT_DTO_ERR_TRANSPORT},
+	    /* 20 */  {
+	IBV_WC_RESP_TIMEOUT_ERR, DAT_DTO_ERR_RECEIVER_NOT_READY},
+	    /* 21 */  {
+IBV_WC_GENERAL_ERR, DAT_DTO_ERR_TRANSPORT},};
+
+/*
+ * dapls_ib_get_dto_status
+ *
+ * Return the DAT status of a DTO operation
+ *
+ * Input:
+ *	cqe_ptr		pointer to completion queue entry
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	Value from ib_status_map table above
+ */
+
+DAT_DTO_COMPLETION_STATUS
+dapls_ib_get_dto_status(IN ib_work_completion_t * cqe_ptr)
+{
+	uint32_t ib_status;
+	int i;
+
+	ib_status = DAPL_GET_CQE_STATUS(cqe_ptr);
+
+	/*
+	 * Due to the implementation of verbs completion code, we need to
+	 * search the table for the correct value rather than assuming
+	 * linear distribution.
+	 */
+	for (i = 0; i <= IBV_WC_GENERAL_ERR; i++) {
+		if (ib_status == ib_status_map[i].ib_status) {
+			if (ib_status != IBV_WC_SUCCESS) {
+				dapl_dbg_log(DAPL_DBG_TYPE_DTO_COMP_ERR,
+					     " DTO completion ERROR: %d: op %#x\n",
+					     ib_status,
+					     DAPL_GET_CQE_OPTYPE(cqe_ptr));
+			}
+			return ib_status_map[i].dat_status;
+		}
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_DTO_COMP_ERR,
+		     " DTO completion ERROR: %d: op %#x\n",
+		     ib_status, DAPL_GET_CQE_OPTYPE(cqe_ptr));
+
+	return DAT_DTO_FAILURE;
+}
+
+DAT_RETURN dapls_ib_get_async_event(IN ib_error_record_t * err_record,
+				    OUT DAT_EVENT_NUMBER * async_event)
+{
+	DAT_RETURN dat_status = DAT_SUCCESS;
+	int err_code = err_record->event_type;
+
+	switch (err_code) {
+		/* OVERFLOW error */
+	case IBV_EVENT_CQ_ERR:
+		*async_event = DAT_ASYNC_ERROR_EVD_OVERFLOW;
+		break;
+		/* INTERNAL errors */
+	case IBV_EVENT_DEVICE_FATAL:
+		*async_event = DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR;
+		break;
+		/* CATASTROPHIC errors */
+	case IBV_EVENT_PORT_ERR:
+		*async_event = DAT_ASYNC_ERROR_IA_CATASTROPHIC;
+		break;
+		/* BROKEN QP error */
+	case IBV_EVENT_SQ_DRAINED:
+	case IBV_EVENT_QP_FATAL:
+	case IBV_EVENT_QP_REQ_ERR:
+	case IBV_EVENT_QP_ACCESS_ERR:
+		*async_event = DAT_ASYNC_ERROR_EP_BROKEN;
+		break;
+
+		/* connection completion */
+	case IBV_EVENT_COMM_EST:
+		*async_event = DAT_CONNECTION_EVENT_ESTABLISHED;
+		break;
+
+		/* TODO: process HW state changes */
+	case IBV_EVENT_PATH_MIG:
+	case IBV_EVENT_PATH_MIG_ERR:
+	case IBV_EVENT_PORT_ACTIVE:
+	case IBV_EVENT_LID_CHANGE:
+	case IBV_EVENT_PKEY_CHANGE:
+	case IBV_EVENT_SM_CHANGE:
+	default:
+		dat_status = DAT_ERROR(DAT_NOT_IMPLEMENTED, 0);
+	}
+	return dat_status;
+}
+
+/*
+ * dapl_ib_cq_alloc
+ *
+ * Alloc a CQ
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	evd_ptr			pointer to EVD struct
+ *	cqlen			minimum QLen
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_cq_alloc(IN DAPL_IA * ia_ptr,
+		  IN DAPL_EVD * evd_ptr, IN DAT_COUNT * cqlen)
+{
+	struct ibv_comp_channel *channel = ia_ptr->hca_ptr->ib_trans.ib_cq;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     "dapls_ib_cq_alloc: evd %p cqlen=%d \n", evd_ptr, *cqlen);
+
+#ifdef CQ_WAIT_OBJECT
+	if (evd_ptr->cq_wait_obj_handle)
+		channel = evd_ptr->cq_wait_obj_handle;
+#endif
+
+	/* Call IB verbs to create CQ */
+	evd_ptr->ib_cq_handle = ibv_create_cq(ia_ptr->hca_ptr->ib_hca_handle,
+					      *cqlen, evd_ptr, channel, 0);
+
+	if (evd_ptr->ib_cq_handle == IB_INVALID_HANDLE)
+		return DAT_INSUFFICIENT_RESOURCES;
+
+	/* arm cq for events */
+	dapls_set_cq_notify(ia_ptr, evd_ptr);
+
+	/* update with returned cq entry size */
+	*cqlen = evd_ptr->ib_cq_handle->cqe;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     "dapls_ib_cq_alloc: new_cq %p cqlen=%d \n",
+		     evd_ptr->ib_cq_handle, *cqlen);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_cq_resize
+ *
+ * Alloc a CQ
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	evd_ptr			pointer to EVD struct
+ *	cqlen			minimum QLen
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN
+dapls_ib_cq_resize(IN DAPL_IA * ia_ptr,
+		   IN DAPL_EVD * evd_ptr, IN DAT_COUNT * cqlen)
+{
+	ib_cq_handle_t new_cq;
+	struct ibv_comp_channel *channel = ia_ptr->hca_ptr->ib_trans.ib_cq;
+
+	/* IB verbs doe not support resize. Try to re-create CQ
+	 * with new size. Can only be done if QP is not attached. 
+	 * destroy EBUSY == QP still attached.
+	 */
+
+#ifdef CQ_WAIT_OBJECT
+	if (evd_ptr->cq_wait_obj_handle)
+		channel = evd_ptr->cq_wait_obj_handle;
+#endif
+
+	/* Call IB verbs to create CQ */
+	new_cq = ibv_create_cq(ia_ptr->hca_ptr->ib_hca_handle, *cqlen,
+			       evd_ptr, channel, 0);
+
+	if (new_cq == IB_INVALID_HANDLE)
+		return DAT_INSUFFICIENT_RESOURCES;
+
+	/* destroy the original and replace if successful */
+	if (ibv_destroy_cq(evd_ptr->ib_cq_handle)) {
+		ibv_destroy_cq(new_cq);
+		return (dapl_convert_errno(errno, "resize_cq"));
+	}
+
+	/* update EVD with new cq handle and size */
+	evd_ptr->ib_cq_handle = new_cq;
+	*cqlen = new_cq->cqe;
+
+	/* arm cq for events */
+	dapls_set_cq_notify(ia_ptr, evd_ptr);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_cq_free
+ *
+ * destroy a CQ
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	evd_ptr			pointer to EVD struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN dapls_ib_cq_free(IN DAPL_IA * ia_ptr, IN DAPL_EVD * evd_ptr)
+{
+	DAT_EVENT event;
+	ib_work_completion_t wc;
+
+	if (evd_ptr->ib_cq_handle != IB_INVALID_HANDLE) {
+		/* pull off CQ and EVD entries and toss */
+		while (ibv_poll_cq(evd_ptr->ib_cq_handle, 1, &wc) == 1) ;
+		while (dapl_evd_dequeue(evd_ptr, &event) == DAT_SUCCESS) ;
+		if (ibv_destroy_cq(evd_ptr->ib_cq_handle))
+			return (dapl_convert_errno(errno, "ibv_destroy_cq"));
+		evd_ptr->ib_cq_handle = IB_INVALID_HANDLE;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_set_cq_notify
+ *
+ * Set the CQ notification for next
+ *
+ * Input:
+ *	hca_handl		hca handle
+ *	DAPL_EVD		evd handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	dapl_convert_errno 
+ */
+DAT_RETURN dapls_set_cq_notify(IN DAPL_IA * ia_ptr, IN DAPL_EVD * evd_ptr)
+{
+	if (ibv_req_notify_cq(evd_ptr->ib_cq_handle, 0))
+		return (dapl_convert_errno(errno, "notify_cq"));
+	else
+		return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_completion_notify
+ *
+ * Set the CQ notification type
+ *
+ * Input:
+ *	hca_handl		hca handle
+ *	evd_ptr			evd handle
+ *	type			notification type
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	dapl_convert_errno
+ */
+DAT_RETURN dapls_ib_completion_notify(IN ib_hca_handle_t hca_handle,
+				      IN DAPL_EVD * evd_ptr,
+				      IN ib_notification_type_t type)
+{
+	if (ibv_req_notify_cq(evd_ptr->ib_cq_handle, type))
+		return (dapl_convert_errno(errno, "notify_cq_type"));
+	else
+		return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_completion_poll
+ *
+ * CQ poll for completions
+ *
+ * Input:
+ *	hca_handl		hca handle
+ *	evd_ptr			evd handle
+ *	wc_ptr			work completion
+ *
+ * Output:
+ * 	none
+ *
+ * Returns: 
+ * 	DAT_SUCCESS
+ *	DAT_QUEUE_EMPTY
+ *	
+ */
+DAT_RETURN dapls_ib_completion_poll(IN DAPL_HCA * hca_ptr,
+				    IN DAPL_EVD * evd_ptr,
+				    IN ib_work_completion_t * wc_ptr)
+{
+	int ret;
+
+	ret = ibv_poll_cq(evd_ptr->ib_cq_handle, 1, wc_ptr);
+	if (ret == 1)
+		return DAT_SUCCESS;
+
+	return DAT_QUEUE_EMPTY;
+}
+
+#ifdef CQ_WAIT_OBJECT
+
+/* NEW common wait objects for providers with direct CQ wait objects */
+DAT_RETURN
+dapls_ib_wait_object_create(IN DAPL_EVD * evd_ptr,
+			    IN ib_wait_obj_handle_t * p_cq_wait_obj_handle)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_create: (%p,%p)\n",
+		     evd_ptr, p_cq_wait_obj_handle);
+
+	/* set cq_wait object to evd_ptr */
+	*p_cq_wait_obj_handle =
+	    ibv_create_comp_channel(evd_ptr->header.owner_ia->hca_ptr->
+				    ib_hca_handle);
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_ib_wait_object_destroy(IN ib_wait_obj_handle_t p_cq_wait_obj_handle)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_destroy: wait_obj=%p\n", p_cq_wait_obj_handle);
+
+	ibv_destroy_comp_channel(p_cq_wait_obj_handle);
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN
+dapls_ib_wait_object_wakeup(IN ib_wait_obj_handle_t p_cq_wait_obj_handle)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wakeup: wait_obj=%p\n", p_cq_wait_obj_handle);
+
+	/* no wake up mechanism */
+	return DAT_SUCCESS;
+}
+
+#if defined(_WIN32) || defined(_WIN64)
+DAT_RETURN
+dapls_ib_wait_object_wait(IN ib_wait_obj_handle_t p_cq_wait_obj_handle,
+			  IN uint32_t timeout)
+{
+	struct dapl_evd *evd_ptr;
+	struct ibv_cq *ibv_cq = NULL;
+	int status = 0;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wait: CQ channel %p time %d\n",
+		     p_cq_wait_obj_handle, timeout);
+
+	/* uDAPL timeout values in usecs */
+	p_cq_wait_obj_handle->comp_channel.Milliseconds = timeout / 1000;
+
+	/* returned event */
+	status = ibv_get_cq_event(p_cq_wait_obj_handle, &ibv_cq,
+				  (void *)&evd_ptr);
+	if (status == 0) {
+		ibv_ack_cq_events(ibv_cq, 1);
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wait: RET evd %p ibv_cq %p %s\n",
+		     evd_ptr, ibv_cq, strerror(errno));
+
+	return (dapl_convert_errno(status, "cq_wait_object_wait"));
+}
+#else				//_WIN32 || _WIN64
+DAT_RETURN
+dapls_ib_wait_object_wait(IN ib_wait_obj_handle_t p_cq_wait_obj_handle,
+			  IN uint32_t timeout)
+{
+	struct dapl_evd *evd_ptr;
+	struct ibv_cq *ibv_cq = NULL;
+	int status = 0;
+	int timeout_ms = -1;
+	struct pollfd cq_fd = {
+		.fd = p_cq_wait_obj_handle->fd,
+		.events = POLLIN,
+		.revents = 0
+	};
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wait: CQ channel %p time %d\n",
+		     p_cq_wait_obj_handle, timeout);
+
+	/* uDAPL timeout values in usecs */
+	if (timeout != DAT_TIMEOUT_INFINITE)
+		timeout_ms = timeout / 1000;
+
+	status = poll(&cq_fd, 1, timeout_ms);
+
+	/* returned event */
+	if (status > 0) {
+		if (!ibv_get_cq_event(p_cq_wait_obj_handle,
+				      &ibv_cq, (void *)&evd_ptr)) {
+			ibv_ack_cq_events(ibv_cq, 1);
+		}
+		status = 0;
+
+		/* timeout */
+	} else if (status == 0)
+		status = ETIMEDOUT;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " cq_object_wait: RET evd %p ibv_cq %p %s\n",
+		     evd_ptr, ibv_cq, strerror(errno));
+
+	return (dapl_convert_errno(status, "cq_wait_object_wait"));
+
+}
+#endif				//_WIN32 || _WIN64
+#endif				// CQ_WAIT_OBJECT
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_scm/dapl_ib_dto.h b/dapl/openib_scm/dapl_ib_dto.h
new file mode 100644
index 0000000..9118b2e
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_dto.h
@@ -0,0 +1,527 @@
+/*
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/***************************************************************************
+ *
+ *   Module:		 uDAPL
+ *
+ *   Filename:		 dapl_ib_dto.h
+ *
+ *   Author:		 Arlin Davis
+ *
+ *   Created:		 3/10/2005
+ *
+ *   Description: 
+ *
+ *   The OpenIB uCMA provider - DTO operations and CQE macros 
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ *	Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ *
+ **************************************************************************/
+#ifndef _DAPL_IB_DTO_H_
+#define _DAPL_IB_DTO_H_
+
+#include "dapl_ib_util.h"
+
+#ifdef DAT_EXTENSIONS
+#include <dat2/dat_ib_extensions.h>
+#endif
+
+#define	DEFAULT_DS_ENTRIES	8
+
+STATIC _INLINE_ int dapls_cqe_opcode(ib_work_completion_t *cqe_p);
+
+#define CQE_WR_TYPE_UD(id) \
+	(((DAPL_COOKIE *)(uintptr_t)id)->ep->qp_handle->qp_type == IBV_QPT_UD)
+
+/*
+ * dapls_ib_post_recv
+ *
+ * Provider specific Post RECV function
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_post_recv (
+	IN  DAPL_EP		*ep_ptr,
+	IN  DAPL_COOKIE		*cookie,
+	IN  DAT_COUNT		segments,
+	IN  DAT_LMR_TRIPLET	*local_iov )
+{
+	struct ibv_recv_wr wr;
+	struct ibv_recv_wr *bad_wr;
+	ib_data_segment_t *ds = (ib_data_segment_t *)local_iov;
+	DAT_COUNT i, total_len;
+	int ret;
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " post_rcv: ep %p cookie %p segs %d l_iov %p\n",
+		     ep_ptr, cookie, segments, local_iov);
+
+	/* setup work request */
+	total_len = 0;
+	wr.next = 0;
+	wr.num_sge = segments;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds;
+
+	if (cookie != NULL) {
+		for (i = 0; i < segments; i++) {
+			dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+				     " post_rcv: l_key 0x%x va %p len %d\n",
+				     ds->lkey, ds->addr, ds->length );
+			total_len += ds->length;
+			ds++;
+		}
+		cookie->val.dto.size = total_len;
+	}
+
+	ret = ibv_post_recv(ep_ptr->qp_handle, &wr, &bad_wr);
+	
+	if (ret)
+		return(dapl_convert_errno(errno,"ibv_recv"));
+
+	DAPL_CNTR(ep_ptr, DCNT_EP_POST_RECV);
+	DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_RECV_DATA, total_len);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_post_send
+ *
+ * Provider specific Post SEND function
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_post_send (
+	IN  DAPL_EP			*ep_ptr,
+	IN  ib_send_op_type_t		op_type,
+	IN  DAPL_COOKIE			*cookie,
+	IN  DAT_COUNT			segments,
+	IN  DAT_LMR_TRIPLET		*local_iov,
+	IN  const DAT_RMR_TRIPLET	*remote_iov,
+	IN  DAT_COMPLETION_FLAGS	completion_flags)
+{
+	struct ibv_send_wr wr;
+	struct ibv_send_wr *bad_wr;
+	ib_data_segment_t *ds = (ib_data_segment_t *)local_iov;
+	ib_hca_transport_t *ibt_ptr = 
+		&ep_ptr->header.owner_ia->hca_ptr->ib_trans;
+	DAT_COUNT i, total_len;
+	int ret;
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " post_snd: ep %p op %d ck %p sgs",
+		     "%d l_iov %p r_iov %p f %d\n",
+		     ep_ptr, op_type, cookie, segments, local_iov, 
+		     remote_iov, completion_flags);
+
+#ifdef DAT_EXTENSIONS	
+	if (ep_ptr->qp_handle->qp_type != IBV_QPT_RC)
+		return(DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP));
+#endif
+	/* setup the work request */
+	wr.next = 0;
+	wr.opcode = op_type;
+	wr.num_sge = segments;
+	wr.send_flags = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds;
+	total_len = 0;
+
+	if (cookie != NULL) {
+		for (i = 0; i < segments; i++ ) {
+			dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+				     " post_snd: lkey 0x%x va %p len %d\n",
+				     ds->lkey, ds->addr, ds->length );
+			total_len += ds->length;
+			ds++;
+		}
+		cookie->val.dto.size = total_len;
+	}
+
+	if (wr.num_sge && 
+	    (op_type == OP_RDMA_WRITE || op_type == OP_RDMA_READ)) {
+		wr.wr.rdma.remote_addr = remote_iov->virtual_address;
+		wr.wr.rdma.rkey = remote_iov->rmr_context;
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_snd_rdma: rkey 0x%x va %#016Lx\n",
+			     wr.wr.rdma.rkey, wr.wr.rdma.remote_addr);
+	}
+
+
+	/* inline data for send or write ops */
+	if ((total_len <= ibt_ptr->max_inline_send) && 
+	   ((op_type == OP_SEND) || (op_type == OP_RDMA_WRITE))) 
+		wr.send_flags |= IBV_SEND_INLINE;
+	
+	/* set completion flags in work request */
+	wr.send_flags |= (DAT_COMPLETION_SUPPRESS_FLAG & 
+				completion_flags) ? 0 : IBV_SEND_SIGNALED;
+	wr.send_flags |= (DAT_COMPLETION_BARRIER_FENCE_FLAG & 
+				completion_flags) ? IBV_SEND_FENCE : 0;
+	wr.send_flags |= (DAT_COMPLETION_SOLICITED_WAIT_FLAG & 
+				completion_flags) ? IBV_SEND_SOLICITED : 0;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+		     " post_snd: op 0x%x flags 0x%x sglist %p, %d\n", 
+		     wr.opcode, wr.send_flags, wr.sg_list, wr.num_sge);
+
+	ret = ibv_post_send(ep_ptr->qp_handle, &wr, &bad_wr);
+
+	if (ret)
+		return(dapl_convert_errno(errno,"ibv_send"));
+
+#ifdef DAPL_COUNTERS
+	switch (op_type) {
+	case OP_SEND:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_SEND);
+		DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_SEND_DATA,total_len);
+		break;
+	case OP_RDMA_WRITE:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_WRITE);
+		DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_WRITE_DATA,total_len);
+		break;	
+	case OP_RDMA_READ:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_READ);
+		DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_READ_DATA,total_len);
+		break;
+	default:
+		break;
+	}
+#endif /* DAPL_COUNTERS */
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP," post_snd: returned\n");
+	return DAT_SUCCESS;
+}
+
+/* map Work Completions to DAPL WR operations */
+STATIC _INLINE_ DAT_DTOS dapls_cqe_dtos_opcode(ib_work_completion_t *cqe_p)
+{
+	switch (cqe_p->opcode) {
+
+	case IBV_WC_SEND:
+#ifdef DAT_EXTENSIONS
+		if (CQE_WR_TYPE_UD(cqe_p->wr_id))
+			return (DAT_IB_DTO_SEND_UD);
+		else
+#endif			
+		return (DAT_DTO_SEND);
+	case IBV_WC_RDMA_READ:
+		return (DAT_DTO_RDMA_READ);
+	case IBV_WC_BIND_MW:
+		return (DAT_DTO_BIND_MW);
+#ifdef DAT_EXTENSIONS
+	case IBV_WC_RDMA_WRITE:
+		if (cqe_p->wc_flags & IBV_WC_WITH_IMM)
+			return (DAT_IB_DTO_RDMA_WRITE_IMMED);
+		else
+			return (DAT_DTO_RDMA_WRITE);
+	case IBV_WC_COMP_SWAP:
+		return (DAT_IB_DTO_CMP_SWAP);
+	case IBV_WC_FETCH_ADD:
+		return (DAT_IB_DTO_FETCH_ADD);
+	case IBV_WC_RECV_RDMA_WITH_IMM:
+		return (DAT_IB_DTO_RECV_IMMED);
+#else
+	case IBV_WC_RDMA_WRITE:
+		return (DAT_DTO_RDMA_WRITE);
+#endif
+	case IBV_WC_RECV:
+#ifdef DAT_EXTENSIONS
+		if (CQE_WR_TYPE_UD(cqe_p->wr_id)) 
+			return (DAT_IB_DTO_RECV_UD);
+		else if (cqe_p->wc_flags & IBV_WC_WITH_IMM)
+			return (DAT_IB_DTO_RECV_MSG_IMMED);
+		else
+#endif	
+		return (DAT_DTO_RECEIVE);
+	default:
+		return (0xff);
+	}
+}
+#define DAPL_GET_CQE_DTOS_OPTYPE(cqe_p) dapls_cqe_dtos_opcode(cqe_p)
+
+
+#ifdef DAT_EXTENSIONS
+/*
+ * dapls_ib_post_ext_send
+ *
+ * Provider specific extended Post SEND function for atomics
+ *	OP_COMP_AND_SWAP and OP_FETCH_AND_ADD
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_post_ext_send (
+	IN  DAPL_EP			*ep_ptr,
+	IN  ib_send_op_type_t		op_type,
+	IN  DAPL_COOKIE			*cookie,
+	IN  DAT_COUNT			segments,
+	IN  DAT_LMR_TRIPLET		*local_iov,
+	IN  const DAT_RMR_TRIPLET	*remote_iov,
+	IN  DAT_UINT32			immed_data,
+	IN  DAT_UINT64			compare_add,
+	IN  DAT_UINT64			swap,
+	IN  DAT_COMPLETION_FLAGS	completion_flags,
+	IN  DAT_IB_ADDR_HANDLE		*remote_ah)
+{
+	struct ibv_send_wr wr;
+	struct ibv_send_wr *bad_wr;
+	ib_data_segment_t *ds = (ib_data_segment_t *)local_iov;
+	DAT_COUNT i, total_len;
+	int ret;
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " post_ext_snd: ep %p op %d ck %p sgs",
+		     "%d l_iov %p r_iov %p f %d\n",
+		     ep_ptr, op_type, cookie, segments, local_iov, 
+		     remote_iov, completion_flags, remote_ah);
+
+	/* setup the work request */
+	wr.next = 0;
+	wr.opcode = op_type;
+	wr.num_sge = segments;
+	wr.send_flags = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds;
+	total_len = 0;
+
+	if (cookie != NULL) {
+		for (i = 0; i < segments; i++ ) {
+			dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+				     " post_snd: lkey 0x%x va %p len %d\n",
+				     ds->lkey, ds->addr, ds->length );
+			total_len += ds->length;
+			ds++;
+		}
+		cookie->val.dto.size = total_len;
+	}
+
+	switch (op_type) {
+	case OP_RDMA_WRITE_IMM:
+		/* OP_RDMA_WRITE)IMMED has direct IB wr_type mapping */
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_ext: rkey 0x%x va %#016Lx immed=0x%x\n",
+			     remote_iov?remote_iov->rmr_context:0, 
+			     remote_iov?remote_iov->virtual_address:0,
+			     immed_data);
+
+		wr.imm_data = immed_data;
+	        if (wr.num_sge) {
+			wr.wr.rdma.remote_addr = remote_iov->virtual_address;
+			wr.wr.rdma.rkey = remote_iov->rmr_context;
+		}
+		break;
+	case OP_COMP_AND_SWAP:
+		/* OP_COMP_AND_SWAP has direct IB wr_type mapping */
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_ext: OP_COMP_AND_SWAP=%lx,"
+			     "%lx rkey 0x%x va %#016Lx\n",
+			     compare_add, swap, remote_iov->rmr_context,
+			     remote_iov->virtual_address);
+		
+		wr.wr.atomic.compare_add = compare_add;
+		wr.wr.atomic.swap = swap;
+		wr.wr.atomic.remote_addr = remote_iov->virtual_address;
+		wr.wr.atomic.rkey = remote_iov->rmr_context;
+		break;
+	case OP_FETCH_AND_ADD:
+		/* OP_FETCH_AND_ADD has direct IB wr_type mapping */
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_ext: OP_FETCH_AND_ADD=%lx,"
+			     "%lx rkey 0x%x va %#016Lx\n",
+			     compare_add, remote_iov->rmr_context,
+			     remote_iov->virtual_address);
+
+		wr.wr.atomic.compare_add = compare_add;
+		wr.wr.atomic.remote_addr = remote_iov->virtual_address;
+		wr.wr.atomic.rkey = remote_iov->rmr_context;
+		break;
+	case OP_SEND_UD:
+		/* post must be on EP with service_type of UD */
+		if (ep_ptr->qp_handle->qp_type != IBV_QPT_UD)
+			return(DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP));
+
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_ext: OP_SEND_UD ah=%p"
+			     " qp_num=0x%x\n",
+			     remote_ah, remote_ah->qpn);
+		
+		wr.opcode = OP_SEND;
+		wr.wr.ud.ah = remote_ah->ah;
+		wr.wr.ud.remote_qpn = remote_ah->qpn;
+		wr.wr.ud.remote_qkey = SCM_UD_QKEY;
+		break;
+	default:
+		break;
+	}
+
+	/* set completion flags in work request */
+	wr.send_flags |= (DAT_COMPLETION_SUPPRESS_FLAG & 
+				completion_flags) ? 0 : IBV_SEND_SIGNALED;
+	wr.send_flags |= (DAT_COMPLETION_BARRIER_FENCE_FLAG & 
+				completion_flags) ? IBV_SEND_FENCE : 0;
+	wr.send_flags |= (DAT_COMPLETION_SOLICITED_WAIT_FLAG & 
+				completion_flags) ? IBV_SEND_SOLICITED : 0;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+		     " post_snd: op 0x%x flags 0x%x sglist %p, %d\n", 
+		     wr.opcode, wr.send_flags, wr.sg_list, wr.num_sge);
+
+	ret = ibv_post_send(ep_ptr->qp_handle, &wr, &bad_wr);
+
+	if (ret)
+		return( dapl_convert_errno(errno,"ibv_send") );
+	
+#ifdef DAPL_COUNTERS
+	switch (op_type) {
+	case OP_RDMA_WRITE_IMM:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_WRITE_IMM);
+		DAPL_CNTR_DATA(ep_ptr, 
+			       DCNT_EP_POST_WRITE_IMM_DATA, total_len);
+		break;
+	case OP_COMP_AND_SWAP:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_CMP_SWAP);
+		break;	
+	case OP_FETCH_AND_ADD:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_FETCH_ADD);
+		break;
+	case OP_SEND_UD:
+		DAPL_CNTR(ep_ptr, DCNT_EP_POST_SEND_UD);
+		DAPL_CNTR_DATA(ep_ptr, DCNT_EP_POST_SEND_UD_DATA, total_len);
+		break;
+	default:
+		break;
+	}
+#endif /* DAPL_COUNTERS */
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP," post_snd: returned\n");
+        return DAT_SUCCESS;
+}
+#endif
+
+STATIC _INLINE_ DAT_RETURN 
+dapls_ib_optional_prv_dat(
+	IN  DAPL_CR		*cr_ptr,
+	IN  const void		*event_data,
+	OUT   DAPL_CR		**cr_pp)
+{
+    return DAT_SUCCESS;
+}
+
+
+/* map Work Completions to DAPL WR operations */
+STATIC _INLINE_ int dapls_cqe_opcode(ib_work_completion_t *cqe_p)
+{
+#ifdef DAPL_COUNTERS
+	DAPL_COOKIE *cookie = (DAPL_COOKIE *)(uintptr_t)cqe_p->wr_id;
+#endif /* DAPL_COUNTERS */
+
+	switch (cqe_p->opcode) {
+	case IBV_WC_SEND:
+		if (CQE_WR_TYPE_UD(cqe_p->wr_id))
+			return(OP_SEND_UD);
+		else
+			return (OP_SEND);
+	case IBV_WC_RDMA_WRITE:
+		if (cqe_p->wc_flags & IBV_WC_WITH_IMM)
+			return (OP_RDMA_WRITE_IMM);
+		else
+			return (OP_RDMA_WRITE);
+	case IBV_WC_RDMA_READ:
+		return (OP_RDMA_READ);
+	case IBV_WC_COMP_SWAP:
+		return (OP_COMP_AND_SWAP);
+	case IBV_WC_FETCH_ADD:
+		return (OP_FETCH_AND_ADD);
+	case IBV_WC_BIND_MW:
+		return (OP_BIND_MW);
+	case IBV_WC_RECV:
+		if (CQE_WR_TYPE_UD(cqe_p->wr_id)) {
+			DAPL_CNTR(cookie->ep, DCNT_EP_RECV_UD);
+			DAPL_CNTR_DATA(cookie->ep, DCNT_EP_RECV_UD_DATA, 
+				       cqe_p->byte_len);
+			return (OP_RECV_UD);
+		}
+		else if (cqe_p->wc_flags & IBV_WC_WITH_IMM) {
+			DAPL_CNTR(cookie->ep, DCNT_EP_RECV_IMM);
+			DAPL_CNTR_DATA(cookie->ep, DCNT_EP_RECV_IMM_DATA, 
+				       cqe_p->byte_len);
+			return (OP_RECEIVE_IMM);
+		} else {
+			DAPL_CNTR(cookie->ep, DCNT_EP_RECV);
+			DAPL_CNTR_DATA(cookie->ep, DCNT_EP_RECV_DATA, 
+				       cqe_p->byte_len);
+			return (OP_RECEIVE);
+		}
+	case IBV_WC_RECV_RDMA_WITH_IMM:
+		DAPL_CNTR(cookie->ep, DCNT_EP_RECV_RDMA_IMM);
+		DAPL_CNTR_DATA(cookie->ep, DCNT_EP_RECV_RDMA_IMM_DATA, 
+			       cqe_p->byte_len);
+		return (OP_RECEIVE_IMM);
+	default:
+		return (OP_INVALID);
+	}
+}
+
+#define DAPL_GET_CQE_OPTYPE(cqe_p) dapls_cqe_opcode(cqe_p)
+#define DAPL_GET_CQE_WRID(cqe_p) ((ib_work_completion_t*)cqe_p)->wr_id
+#define DAPL_GET_CQE_STATUS(cqe_p) ((ib_work_completion_t*)cqe_p)->status
+#define DAPL_GET_CQE_VENDOR_ERR(cqe_p) ((ib_work_completion_t*)cqe_p)->vendor_err
+#define DAPL_GET_CQE_BYTESNUM(cqe_p) ((ib_work_completion_t*)cqe_p)->byte_len
+#define DAPL_GET_CQE_IMMED_DATA(cqe_p) ((ib_work_completion_t*)cqe_p)->imm_data
+
+STATIC _INLINE_ char * dapls_dto_op_str(int op)
+{
+    static char *optable[] =
+    {
+        "OP_RDMA_WRITE",
+        "OP_RDMA_WRITE_IMM",
+        "OP_SEND",
+        "OP_SEND_IMM",
+        "OP_RDMA_READ",
+        "OP_COMP_AND_SWAP",
+        "OP_FETCH_AND_ADD",
+        "OP_RECEIVE",
+        "OP_RECEIVE_MSG_IMM",
+	"OP_RECEIVE_RDMA_IMM",
+        "OP_BIND_MW"
+	"OP_SEND_UD"
+	"OP_RECV_UD"
+    };
+    return ((op < 0 || op > 12) ? "Invalid CQE OP?" : optable[op]);
+}
+
+static _INLINE_ char *
+dapls_cqe_op_str(IN ib_work_completion_t *cqe_ptr)
+{
+    return dapls_dto_op_str(DAPL_GET_CQE_OPTYPE(cqe_ptr));
+}
+
+#define DAPL_GET_CQE_OP_STR(cqe) dapls_cqe_op_str(cqe)
+
+#endif	/*  _DAPL_IB_DTO_H_ */
diff --git a/dapl/openib_scm/dapl_ib_extensions.c b/dapl/openib_scm/dapl_ib_extensions.c
new file mode 100755
index 0000000..98a07ec
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_extensions.c
@@ -0,0 +1,371 @@
+/*
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ib_extensions.c
+ *
+ * PURPOSE:  Extensions routines for OpenIB uCMA provider
+ *
+ * $Id: $
+ *
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_ib_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_cookie.h"
+#include <stdarg.h>
+
+DAT_RETURN
+dapli_post_ext(IN DAT_EP_HANDLE ep_handle,
+	       IN DAT_UINT64 cmp_add,
+	       IN DAT_UINT64 swap,
+	       IN DAT_UINT32 immed_data,
+	       IN DAT_COUNT segments,
+	       IN DAT_LMR_TRIPLET * local_iov,
+	       IN DAT_DTO_COOKIE user_cookie,
+	       IN const DAT_RMR_TRIPLET * remote_iov,
+	       IN int op_type,
+	       IN DAT_COMPLETION_FLAGS flags, IN DAT_IB_ADDR_HANDLE * ah);
+
+/*
+ * dapl_extensions
+ *
+ * Process extension requests
+ *
+ * Input:
+ *	ext_type,
+ *	...
+ *
+ * Output:
+ * 	Depends....
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_NOT_IMPLEMENTED
+ *      .....
+ *
+ */
+DAT_RETURN
+dapl_extensions(IN DAT_HANDLE dat_handle,
+		IN DAT_EXTENDED_OP ext_op, IN va_list args)
+{
+	DAT_EP_HANDLE ep;
+	DAT_IB_ADDR_HANDLE *ah = NULL;
+	DAT_LMR_TRIPLET *lmr_p;
+	DAT_DTO_COOKIE cookie;
+	const DAT_RMR_TRIPLET *rmr_p;
+	DAT_UINT64 dat_uint64a, dat_uint64b;
+	DAT_UINT32 dat_uint32;
+	DAT_COUNT segments = 1;
+	DAT_COMPLETION_FLAGS comp_flags;
+	DAT_RETURN status = DAT_NOT_IMPLEMENTED;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_extensions(hdl %p operation %d, ...)\n",
+		     dat_handle, ext_op);
+
+	switch ((int)ext_op) {
+
+	case DAT_IB_RDMA_WRITE_IMMED_OP:
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     " WRITE_IMMED_DATA extension call\n");
+
+		ep = dat_handle;	/* ep_handle */
+		segments = va_arg(args, DAT_COUNT);	/* num segments */
+		lmr_p = va_arg(args, DAT_LMR_TRIPLET *);
+		cookie = va_arg(args, DAT_DTO_COOKIE);
+		rmr_p = va_arg(args, const DAT_RMR_TRIPLET *);
+		dat_uint32 = va_arg(args, DAT_UINT32);	/* immed data */
+		comp_flags = va_arg(args, DAT_COMPLETION_FLAGS);
+
+		status = dapli_post_ext(ep, 0, 0, dat_uint32, segments, lmr_p,
+					cookie, rmr_p, OP_RDMA_WRITE_IMM,
+					comp_flags, ah);
+		break;
+
+	case DAT_IB_CMP_AND_SWAP_OP:
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     " CMP_AND_SWAP extension call\n");
+
+		ep = dat_handle;	/* ep_handle */
+		dat_uint64a = va_arg(args, DAT_UINT64);	/* cmp_value */
+		dat_uint64b = va_arg(args, DAT_UINT64);	/* swap_value */
+		lmr_p = va_arg(args, DAT_LMR_TRIPLET *);
+		cookie = va_arg(args, DAT_DTO_COOKIE);
+		rmr_p = va_arg(args, const DAT_RMR_TRIPLET *);
+		comp_flags = va_arg(args, DAT_COMPLETION_FLAGS);
+
+		status = dapli_post_ext(ep, dat_uint64a, dat_uint64b,
+					0, segments, lmr_p, cookie, rmr_p,
+					OP_COMP_AND_SWAP, comp_flags, ah);
+		break;
+
+	case DAT_IB_FETCH_AND_ADD_OP:
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     " FETCH_AND_ADD extension call\n");
+
+		ep = dat_handle;	/* ep_handle */
+		dat_uint64a = va_arg(args, DAT_UINT64);	/* add value */
+		lmr_p = va_arg(args, DAT_LMR_TRIPLET *);
+		cookie = va_arg(args, DAT_DTO_COOKIE);
+		rmr_p = va_arg(args, const DAT_RMR_TRIPLET *);
+		comp_flags = va_arg(args, DAT_COMPLETION_FLAGS);
+
+		status = dapli_post_ext(ep, dat_uint64a, 0, 0, segments,
+					lmr_p, cookie, rmr_p,
+					OP_FETCH_AND_ADD, comp_flags, ah);
+		break;
+
+	case DAT_IB_UD_SEND_OP:
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     " UD post_send extension call\n");
+
+		ep = dat_handle;	/* ep_handle */
+		segments = va_arg(args, DAT_COUNT);	/* segments */
+		lmr_p = va_arg(args, DAT_LMR_TRIPLET *);
+		ah = va_arg(args, DAT_IB_ADDR_HANDLE *);
+		cookie = va_arg(args, DAT_DTO_COOKIE);
+		comp_flags = va_arg(args, DAT_COMPLETION_FLAGS);
+
+		status = dapli_post_ext(ep, 0, 0, 0, segments,
+					lmr_p, cookie, NULL,
+					OP_SEND_UD, comp_flags, ah);
+		break;
+
+#ifdef DAPL_COUNTERS
+	case DAT_QUERY_COUNTERS_OP:
+		{
+			int cntr, reset;
+			DAT_UINT64 *p_cntr_out;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+				     " Query counter extension call\n");
+
+			cntr = va_arg(args, int);
+			p_cntr_out = va_arg(args, DAT_UINT64 *);
+			reset = va_arg(args, int);
+
+			status = dapl_query_counter(dat_handle, cntr,
+						    p_cntr_out, reset);
+			break;
+		}
+	case DAT_PRINT_COUNTERS_OP:
+		{
+			int cntr, reset;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+				     " Print counter extension call\n");
+
+			cntr = va_arg(args, int);
+			reset = va_arg(args, int);
+
+			dapl_print_counter(dat_handle, cntr, reset);
+			status = DAT_SUCCESS;
+			break;
+		}
+#endif				/* DAPL_COUNTERS */
+
+	default:
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "unsupported extension(%d)\n", (int)ext_op);
+	}
+
+	return (status);
+}
+
+DAT_RETURN
+dapli_post_ext(IN DAT_EP_HANDLE ep_handle,
+	       IN DAT_UINT64 cmp_add,
+	       IN DAT_UINT64 swap,
+	       IN DAT_UINT32 immed_data,
+	       IN DAT_COUNT segments,
+	       IN DAT_LMR_TRIPLET * local_iov,
+	       IN DAT_DTO_COOKIE user_cookie,
+	       IN const DAT_RMR_TRIPLET * remote_iov,
+	       IN int op_type,
+	       IN DAT_COMPLETION_FLAGS flags, IN DAT_IB_ADDR_HANDLE * ah)
+{
+	DAPL_EP *ep_ptr;
+	ib_qp_handle_t qp_ptr;
+	DAPL_COOKIE *cookie = NULL;
+	DAT_RETURN dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     " post_ext_op: ep %p cmp_val %d "
+		     "swap_val %d cookie 0x%x, r_iov %p, flags 0x%x, ah %p\n",
+		     ep_handle, (unsigned)cmp_add, (unsigned)swap,
+		     (unsigned)user_cookie.as_64, remote_iov, flags, ah);
+
+	if (DAPL_BAD_HANDLE(ep_handle, DAPL_MAGIC_EP))
+		return (DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP));
+
+	ep_ptr = (DAPL_EP *) ep_handle;
+	qp_ptr = ep_ptr->qp_handle;
+
+	/*
+	 * Synchronization ok since this buffer is only used for send
+	 * requests, which aren't allowed to race with each other.
+	 */
+	dat_status = dapls_dto_cookie_alloc(&ep_ptr->req_buffer,
+					    DAPL_DTO_TYPE_EXTENSION,
+					    user_cookie, &cookie);
+	if (dat_status != DAT_SUCCESS)
+		goto bail;
+
+	/*
+	 * Take reference before posting to avoid race conditions with
+	 * completions
+	 */
+	dapl_os_atomic_inc(&ep_ptr->req_count);
+
+	/*
+	 * Invoke provider specific routine to post DTO
+	 */
+	dat_status = dapls_ib_post_ext_send(ep_ptr, op_type, cookie, segments,	/* data segments */
+					    local_iov, remote_iov, immed_data,	/* immed data */
+					    cmp_add,	/* compare or add */
+					    swap,	/* swap */
+					    flags, ah);
+
+	if (dat_status != DAT_SUCCESS) {
+		dapl_os_atomic_dec(&ep_ptr->req_count);
+		dapls_cookie_dealloc(&ep_ptr->req_buffer, cookie);
+	}
+
+      bail:
+	return dat_status;
+
+}
+
+/* 
+ * New provider routine to process extended DTO events 
+ */
+void
+dapls_cqe_to_event_extension(IN DAPL_EP * ep_ptr,
+			     IN DAPL_COOKIE * cookie,
+			     IN ib_work_completion_t * cqe_ptr,
+			     IN DAT_EVENT * event_ptr)
+{
+	uint32_t ibtype;
+	DAT_DTO_COMPLETION_EVENT_DATA *dto =
+	    &event_ptr->event_data.dto_completion_event_data;
+	DAT_IB_EXTENSION_EVENT_DATA *ext_data = (DAT_IB_EXTENSION_EVENT_DATA *)
+	    & event_ptr->event_extension_data[0];
+	DAT_DTO_COMPLETION_STATUS dto_status;
+
+	/* Get status from cqe */
+	dto_status = dapls_ib_get_dto_status(cqe_ptr);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+		     " cqe_to_event_ext: dto_ptr %p ext_ptr %p status %d\n",
+		     dto, ext_data, dto_status);
+
+	event_ptr->event_number = DAT_IB_DTO_EVENT;
+	dto->ep_handle = cookie->ep;
+	dto->user_cookie = cookie->val.dto.cookie;
+	dto->operation = DAPL_GET_CQE_DTOS_OPTYPE(cqe_ptr);	/* new for 2.0 */
+	dto->status = ext_data->status = dto_status;
+
+	if (dto_status != DAT_DTO_SUCCESS)
+		return;
+
+	/* 
+	 * Get operation type from CQ work completion entry and
+	 * if extented operation then set extended event data
+	 */
+	ibtype = DAPL_GET_CQE_OPTYPE(cqe_ptr);
+
+	switch (ibtype) {
+
+	case OP_RDMA_WRITE_IMM:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: OP_RDMA_WRITE_IMMED\n");
+
+		/* type and outbound rdma write transfer size */
+		dto->transfered_length = cookie->val.dto.size;
+		ext_data->type = DAT_IB_RDMA_WRITE_IMMED;
+		break;
+	case OP_RECEIVE_IMM:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: OP_RECEIVE_RDMA_IMMED\n");
+
+		/* immed recvd, type and inbound rdma write transfer size */
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		ext_data->type = DAT_IB_RDMA_WRITE_IMMED_DATA;
+		ext_data->val.immed.data = DAPL_GET_CQE_IMMED_DATA(cqe_ptr);
+		break;
+	case OP_RECEIVE_MSG_IMM:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: OP_RECEIVE_MSG_IMMED\n");
+
+		/* immed recvd, type and inbound recv message transfer size */
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		ext_data->type = DAT_IB_RECV_IMMED_DATA;
+		ext_data->val.immed.data = DAPL_GET_CQE_IMMED_DATA(cqe_ptr);
+		break;
+	case OP_COMP_AND_SWAP:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: COMP_AND_SWAP_RESP\n");
+
+		/* original data is returned in LMR provided with post */
+		ext_data->type = DAT_IB_CMP_AND_SWAP;
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		break;
+	case OP_FETCH_AND_ADD:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+			     " cqe_to_event_ext: FETCH_AND_ADD_RESP\n");
+
+		/* original data is returned in LMR provided with post */
+		ext_data->type = DAT_IB_FETCH_AND_ADD;
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		break;
+	case OP_SEND_UD:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD, " cqe_to_event_ext: UD_SEND\n");
+
+		/* type and outbound send transfer size */
+		ext_data->type = DAT_IB_UD_SEND;
+		dto->transfered_length = cookie->val.dto.size;
+		break;
+	case OP_RECV_UD:
+		dapl_dbg_log(DAPL_DBG_TYPE_EVD, " cqe_to_event_ext: UD_RECV\n");
+
+		/* type and inbound recv message transfer size */
+		ext_data->type = DAT_IB_UD_RECV;
+		dto->transfered_length = DAPL_GET_CQE_BYTESNUM(cqe_ptr);
+		break;
+
+	default:
+		/* not extended operation */
+		ext_data->status = DAT_IB_OP_ERR;
+		dto->status = DAT_DTO_ERR_TRANSPORT;
+		break;
+	}
+}
diff --git a/dapl/openib_scm/dapl_ib_mem.c b/dapl/openib_scm/dapl_ib_mem.c
new file mode 100644
index 0000000..e45a2b3
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_mem.c
@@ -0,0 +1,382 @@
+	/*
+	 * Copyright (c) 2005-2007 Intel Corporation.  All rights reserved.
+	 *
+	 * This Software is licensed under one of the following licenses:
+	 *
+	 * 1) under the terms of the "Common Public License 1.0" a copy of which is
+	 *    available from the Open Source Initiative, see
+	 *    http://www.opensource.org/licenses/cpl.php.
+	 *
+	 * 2) under the terms of the "The BSD License" a copy of which is
+	 *    available from the Open Source Initiative, see
+	 *    http://www.opensource.org/licenses/bsd-license.php.
+	 *
+	 * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+	 *    copy of which is available from the Open Source Initiative, see
+	 *    http://www.opensource.org/licenses/gpl-license.php.
+	 *
+	 * Licensee has the right to choose one of the above licenses.
+	 *
+	 * Redistributions of source code must retain the above copyright
+	 * notice and one of the license notices.
+	 *
+	 * Redistributions in binary form must reproduce both the above copyright
+	 * notice, one of the license notices in the documentation
+	 * and/or other materials provided with the distribution.
+	 */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_ib_mem.c
+ *
+ * PURPOSE: Memory windows, registration, and protection domain 
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_lmr_util.h"
+
+/*
+ * dapls_convert_privileges
+ *
+ * Convert LMR privileges to provider  
+ *
+ * Input:
+ *	DAT_MEM_PRIV_FLAGS
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	ibv_access_flags
+ *
+ */
+STATIC _INLINE_ int dapls_convert_privileges(IN DAT_MEM_PRIV_FLAGS privileges)
+{
+	int access = 0;
+
+	/*
+	 * if (DAT_MEM_PRIV_LOCAL_READ_FLAG & privileges) do nothing
+	 */
+	if (DAT_MEM_PRIV_LOCAL_WRITE_FLAG & privileges)
+		access |= IBV_ACCESS_LOCAL_WRITE;
+	if (DAT_MEM_PRIV_REMOTE_WRITE_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_WRITE;
+	if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_READ;
+	if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_READ;
+	if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges)
+		access |= IBV_ACCESS_REMOTE_READ;
+#ifdef DAT_EXTENSIONS
+	if (DAT_IB_MEM_PRIV_REMOTE_ATOMIC & privileges)
+		access |= IBV_ACCESS_REMOTE_ATOMIC;
+#endif
+
+	return access;
+}
+
+/*
+ * dapl_ib_pd_alloc
+ *
+ * Alloc a PD
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	pz		pointer to PZ struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN dapls_ib_pd_alloc(IN DAPL_IA * ia_ptr, IN DAPL_PZ * pz)
+{
+	/* get a protection domain */
+	pz->pd_handle = ibv_alloc_pd(ia_ptr->hca_ptr->ib_hca_handle);
+	if (!pz->pd_handle)
+		return (dapl_convert_errno(ENOMEM, "alloc_pd"));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " pd_alloc: pd_handle=%p\n", pz->pd_handle);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_pd_free
+ *
+ * Free a PD
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	PZ_ptr		pointer to PZ struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *      DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN dapls_ib_pd_free(IN DAPL_PZ * pz)
+{
+	if (pz->pd_handle != IB_INVALID_HANDLE) {
+		if (ibv_dealloc_pd(pz->pd_handle))
+			return (dapl_convert_errno(errno, "ibv_dealloc_pd"));
+		pz->pd_handle = IB_INVALID_HANDLE;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_mr_register
+ *
+ * Register a virtual memory region
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	lmr		pointer to dapl_lmr struct
+ *	virt_addr	virtual address of beginning of mem region
+ *	length		length of memory region
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mr_register(IN DAPL_IA * ia_ptr,
+		     IN DAPL_LMR * lmr,
+		     IN DAT_PVOID virt_addr,
+		     IN DAT_VLEN length,
+		     IN DAT_MEM_PRIV_FLAGS privileges, IN DAT_VA_TYPE va_type)
+{
+	ib_pd_handle_t ib_pd_handle;
+	struct ibv_device *ibv_dev = ia_ptr->hca_ptr->ib_hca_handle->device;
+
+	ib_pd_handle = ((DAPL_PZ *) lmr->param.pz_handle)->pd_handle;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " mr_register: ia=%p, lmr=%p va=%p ln=%d pv=0x%x\n",
+		     ia_ptr, lmr, virt_addr, length, privileges);
+
+	/* TODO: shared memory */
+	if (lmr->param.mem_type == DAT_MEM_TYPE_SHARED_VIRTUAL) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " mr_register_shared: NOT IMPLEMENTED\n");
+		return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+	}
+
+	/* iWARP only support */
+	if ((va_type == DAT_VA_TYPE_ZB) &&
+	    (ibv_dev->transport_type != IBV_TRANSPORT_IWARP)) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " va_type == DAT_VA_TYPE_ZB: NOT SUPPORTED\n");
+		return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+	}
+
+	/* local read is default on IB */
+	lmr->mr_handle =
+	    ibv_reg_mr(((DAPL_PZ *) lmr->param.pz_handle)->pd_handle,
+		       virt_addr, length, dapls_convert_privileges(privileges));
+
+	if (!lmr->mr_handle)
+		return (dapl_convert_errno(ENOMEM, "reg_mr"));
+
+	lmr->param.lmr_context = lmr->mr_handle->lkey;
+	lmr->param.rmr_context = lmr->mr_handle->rkey;
+	lmr->param.registered_size = length;
+	lmr->param.registered_address = (DAT_VADDR) (uintptr_t) virt_addr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " mr_register: mr=%p addr=%p pd %p ctx %p "
+		     "lkey=0x%x rkey=0x%x priv=%x\n",
+		     lmr->mr_handle, lmr->mr_handle->addr,
+		     lmr->mr_handle->pd, lmr->mr_handle->context,
+		     lmr->mr_handle->lkey, lmr->mr_handle->rkey,
+		     length, dapls_convert_privileges(privileges));
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_mr_deregister
+ *
+ * Free a memory region
+ *
+ * Input:
+ *	lmr			pointer to dapl_lmr struct
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN dapls_ib_mr_deregister(IN DAPL_LMR * lmr)
+{
+	if (lmr->mr_handle != IB_INVALID_HANDLE) {
+		if (ibv_dereg_mr(lmr->mr_handle))
+			return (dapl_convert_errno(errno, "dereg_pd"));
+		lmr->mr_handle = IB_INVALID_HANDLE;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_mr_register_shared
+ *
+ * Register a virtual memory region
+ *
+ * Input:
+ *	ia_ptr		IA handle
+ *	lmr		pointer to dapl_lmr struct
+ *	privileges	
+ *	va_type		
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mr_register_shared(IN DAPL_IA * ia_ptr,
+			    IN DAPL_LMR * lmr,
+			    IN DAT_MEM_PRIV_FLAGS privileges,
+			    IN DAT_VA_TYPE va_type)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+		     " mr_register_shared: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_alloc
+ *
+ * Bind a protection domain to a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN dapls_ib_mw_alloc(IN DAPL_RMR * rmr)
+{
+
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_alloc: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_free
+ *
+ * Release bindings of a protection domain to a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_STATE
+ *
+ */
+DAT_RETURN dapls_ib_mw_free(IN DAPL_RMR * rmr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_free: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_bind
+ *
+ * Bind a protection domain to a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_PARAMETER;
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mw_bind(IN DAPL_RMR * rmr,
+		 IN DAPL_LMR * lmr,
+		 IN DAPL_EP * ep,
+		 IN DAPL_COOKIE * cookie,
+		 IN DAT_VADDR virtual_address,
+		 IN DAT_VLEN length,
+		 IN DAT_MEM_PRIV_FLAGS mem_priv, IN DAT_BOOLEAN is_signaled)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_bind: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * dapls_ib_mw_unbind
+ *
+ * Unbind a protection domain from a memory window
+ *
+ * Input:
+ *	rmr	Initialized rmr to hold binding handles
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *    	DAT_INVALID_PARAMETER;
+ *   	DAT_INVALID_STATE;
+ *	DAT_INSUFFICIENT_RESOURCES
+ *
+ */
+DAT_RETURN
+dapls_ib_mw_unbind(IN DAPL_RMR * rmr,
+		   IN DAPL_EP * ep,
+		   IN DAPL_COOKIE * cookie, IN DAT_BOOLEAN is_signaled)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, " mw_unbind: NOT IMPLEMENTED\n");
+
+	return DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_scm/dapl_ib_qp.c b/dapl/openib_scm/dapl_ib_qp.c
new file mode 100644
index 0000000..e14d4d9
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_qp.c
@@ -0,0 +1,471 @@
+/*
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_ib_qp.c
+ *
+ * PURPOSE: QP routines for access to ofa rdma verbs 
+ *
+ * $Id: $
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_ib_qp_alloc
+ *
+ * Alloc a QP
+ *
+ * Input:
+ *	*ep_ptr		pointer to EP INFO
+ *	ib_hca_handle	provider HCA handle
+ *	ib_pd_handle	provider protection domain handle
+ *	cq_recv		provider recv CQ handle
+ *	cq_send		provider send CQ handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INTERNAL_ERROR
+ *
+ */
+DAT_RETURN
+dapls_ib_qp_alloc(IN DAPL_IA * ia_ptr,
+		  IN DAPL_EP * ep_ptr, IN DAPL_EP * ep_ctx_ptr)
+{
+	DAT_EP_ATTR *attr;
+	DAPL_EVD *rcv_evd, *req_evd;
+	ib_cq_handle_t rcv_cq, req_cq;
+	ib_pd_handle_t ib_pd_handle;
+	struct ibv_qp_init_attr qp_create;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " qp_alloc: ia_ptr %p ep_ptr %p ep_ctx_ptr %p\n",
+		     ia_ptr, ep_ptr, ep_ctx_ptr);
+
+	attr = &ep_ptr->param.ep_attr;
+	ib_pd_handle = ((DAPL_PZ *) ep_ptr->param.pz_handle)->pd_handle;
+	rcv_evd = (DAPL_EVD *) ep_ptr->param.recv_evd_handle;
+	req_evd = (DAPL_EVD *) ep_ptr->param.request_evd_handle;
+
+	/* 
+	 * DAT allows usage model of EP's with no EVD's but IB does not. 
+	 * Create a CQ with zero entries under the covers to support and 
+	 * catch any invalid posting. 
+	 */
+	if (rcv_evd != DAT_HANDLE_NULL)
+		rcv_cq = rcv_evd->ib_cq_handle;
+	else if (!ia_ptr->hca_ptr->ib_trans.ib_cq_empty)
+		rcv_cq = ia_ptr->hca_ptr->ib_trans.ib_cq_empty;
+	else {
+		struct ibv_comp_channel *channel =
+		    ia_ptr->hca_ptr->ib_trans.ib_cq;
+#ifdef CQ_WAIT_OBJECT
+		if (rcv_evd->cq_wait_obj_handle)
+			channel = rcv_evd->cq_wait_obj_handle;
+#endif
+		/* Call IB verbs to create CQ */
+		rcv_cq = ibv_create_cq(ia_ptr->hca_ptr->ib_hca_handle,
+				       0, NULL, channel, 0);
+
+		if (rcv_cq == IB_INVALID_HANDLE)
+			return (dapl_convert_errno(ENOMEM, "create_cq"));
+
+		ia_ptr->hca_ptr->ib_trans.ib_cq_empty = rcv_cq;
+	}
+	if (req_evd != DAT_HANDLE_NULL)
+		req_cq = req_evd->ib_cq_handle;
+	else
+		req_cq = ia_ptr->hca_ptr->ib_trans.ib_cq_empty;
+
+	/* Setup attributes and create qp */
+	dapl_os_memzero((void *)&qp_create, sizeof(qp_create));
+	qp_create.send_cq = req_cq;
+	qp_create.cap.max_send_wr = attr->max_request_dtos;
+	qp_create.cap.max_send_sge = attr->max_request_iov;
+	qp_create.cap.max_inline_data =
+	    ia_ptr->hca_ptr->ib_trans.max_inline_send;
+	qp_create.qp_type = IBV_QPT_RC;
+
+#ifdef DAT_EXTENSIONS
+	if (attr->service_type == DAT_IB_SERVICE_TYPE_UD) {
+		qp_create.qp_type = IBV_QPT_UD;
+		if (attr->max_message_size >
+		    (128 << ia_ptr->hca_ptr->ib_trans.mtu)) {
+			return (DAT_INVALID_PARAMETER | DAT_INVALID_ARG6);
+		}
+	}
+#endif
+	qp_create.qp_context = (void *)ep_ptr;
+
+	/* ibv assumes rcv_cq is never NULL, set to req_cq */
+	if (rcv_cq == NULL) {
+		qp_create.recv_cq = req_cq;
+		qp_create.cap.max_recv_wr = 0;
+		qp_create.cap.max_recv_sge = 0;
+	} else {
+		qp_create.recv_cq = rcv_cq;
+		qp_create.cap.max_recv_wr = attr->max_recv_dtos;
+		qp_create.cap.max_recv_sge = attr->max_recv_iov;
+	}
+
+	ep_ptr->qp_handle = ibv_create_qp(ib_pd_handle, &qp_create);
+	if (!ep_ptr->qp_handle)
+		return (dapl_convert_errno(ENOMEM, "create_qp"));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     " qp_alloc: qpn %p sq %d,%d rq %d,%d\n",
+		     ep_ptr->qp_handle->qp_num,
+		     qp_create.cap.max_send_wr, qp_create.cap.max_send_sge,
+		     qp_create.cap.max_recv_wr, qp_create.cap.max_recv_sge);
+
+	/* Setup QP attributes for INIT state on the way out */
+	if (dapls_modify_qp_state(ep_ptr->qp_handle,
+				  IBV_QPS_INIT, NULL) != DAT_SUCCESS) {
+		ibv_destroy_qp(ep_ptr->qp_handle);
+		ep_ptr->qp_handle = IB_INVALID_HANDLE;
+		return DAT_INTERNAL_ERROR;
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_qp_free
+ *
+ * Free a QP
+ *
+ * Input:
+ *	ia_handle	IA handle
+ *	*ep_ptr		pointer to EP INFO
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *  dapl_convert_errno
+ *
+ */
+DAT_RETURN dapls_ib_qp_free(IN DAPL_IA * ia_ptr, IN DAPL_EP * ep_ptr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, " qp_free:  ep_ptr %p qp %p\n",
+		     ep_ptr, ep_ptr->qp_handle);
+
+	if (ep_ptr->qp_handle != IB_INVALID_HANDLE) {
+		/* force error state to flush queue, then destroy */
+		dapls_modify_qp_state(ep_ptr->qp_handle, IBV_QPS_ERR, NULL);
+
+		if (ibv_destroy_qp(ep_ptr->qp_handle))
+			return (dapl_convert_errno(errno, "destroy_qp"));
+
+		ep_ptr->qp_handle = IB_INVALID_HANDLE;
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_ib_qp_modify
+ *
+ * Set the QP to the parameters specified in an EP_PARAM
+ *
+ * The EP_PARAM structure that is provided has been
+ * sanitized such that only non-zero values are valid.
+ *
+ * Input:
+ *	ib_hca_handle		HCA handle
+ *	qp_handle		QP handle
+ *	ep_attr		        Sanitized EP Params
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN
+dapls_ib_qp_modify(IN DAPL_IA * ia_ptr,
+		   IN DAPL_EP * ep_ptr, IN DAT_EP_ATTR * attr)
+{
+	struct ibv_qp_attr qp_attr;
+
+	if (ep_ptr->qp_handle == IB_INVALID_HANDLE)
+		return DAT_INVALID_PARAMETER;
+
+	/* 
+	 * EP state, qp_handle state should be an indication
+	 * of current state but the only way to be sure is with
+	 * a user mode ibv_query_qp call which is NOT available 
+	 */
+
+	/* move to error state if necessary */
+	if ((ep_ptr->qp_state == IB_QP_STATE_ERROR) &&
+	    (ep_ptr->qp_handle->state != IBV_QPS_ERR)) {
+		return (dapls_modify_qp_state(ep_ptr->qp_handle,
+					      IBV_QPS_ERR, NULL));
+	}
+
+	/*
+	 * Check if we have the right qp_state to modify attributes
+	 */
+	if ((ep_ptr->qp_handle->state != IBV_QPS_RTR) &&
+	    (ep_ptr->qp_handle->state != IBV_QPS_RTS))
+		return DAT_INVALID_STATE;
+
+	/* Adjust to current EP attributes */
+	dapl_os_memzero((void *)&qp_attr, sizeof(qp_attr));
+	qp_attr.cap.max_send_wr = attr->max_request_dtos;
+	qp_attr.cap.max_recv_wr = attr->max_recv_dtos;
+	qp_attr.cap.max_send_sge = attr->max_request_iov;
+	qp_attr.cap.max_recv_sge = attr->max_recv_iov;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP,
+		     "modify_qp: qp %p sq %d,%d, rq %d,%d\n",
+		     ep_ptr->qp_handle,
+		     qp_attr.cap.max_send_wr, qp_attr.cap.max_send_sge,
+		     qp_attr.cap.max_recv_wr, qp_attr.cap.max_recv_sge);
+
+	if (ibv_modify_qp(ep_ptr->qp_handle, &qp_attr, IBV_QP_CAP)) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "modify_qp: modify ep %p qp %p failed\n",
+			     ep_ptr, ep_ptr->qp_handle);
+		return (dapl_convert_errno(errno, "modify_qp_state"));
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_reinit_ep
+ *
+ * Move the QP to INIT state again.
+ *
+ * Input:
+ *	ep_ptr		DAPL_EP
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	void
+ *
+ */
+#if defined(_WIN32) || defined(_WIN64)
+void dapls_ib_reinit_ep(IN DAPL_EP * ep_ptr)
+{
+	/* work around bug in low level driver - 3/24/09 */
+	/* RTS -> RESET -> INIT -> ERROR QP transition crashes system */
+	if (ep_ptr->qp_handle != IB_INVALID_HANDLE) {
+		dapls_ib_qp_free(ep_ptr->header.owner_ia, ep_ptr);
+		dapls_ib_qp_alloc(ep_ptr->header.owner_ia, ep_ptr, ep_ptr);
+	}
+}
+#else				// _WIN32 || _WIN64
+void dapls_ib_reinit_ep(IN DAPL_EP * ep_ptr)
+{
+	if (ep_ptr->qp_handle != IB_INVALID_HANDLE &&
+	    ep_ptr->qp_handle->qp_type != IBV_QPT_UD) {
+		/* move to RESET state and then to INIT */
+		dapls_modify_qp_state(ep_ptr->qp_handle, IBV_QPS_RESET, 0);
+		dapls_modify_qp_state(ep_ptr->qp_handle, IBV_QPS_INIT, 0);
+	}
+}
+#endif				// _WIN32 || _WIN64
+
+/* 
+ * Generic QP modify for init, reset, error, RTS, RTR
+ * For UD, create_ah on RTR, qkey on INIT
+ */
+DAT_RETURN
+dapls_modify_qp_state(IN ib_qp_handle_t qp_handle,
+		      IN ib_qp_state_t qp_state, IN struct ib_cm_handle *cm_ptr)
+{
+	struct ibv_qp_attr qp_attr;
+	enum ibv_qp_attr_mask mask = IBV_QP_STATE;
+	DAPL_EP *ep_ptr = (DAPL_EP *) qp_handle->qp_context;
+	DAPL_IA *ia_ptr = ep_ptr->header.owner_ia;
+	ib_qp_cm_t *qp_cm = &cm_ptr->dst;
+	int ret;
+
+	dapl_os_memzero((void *)&qp_attr, sizeof(qp_attr));
+	qp_attr.qp_state = qp_state;
+	switch (qp_state) {
+		/* additional attributes with RTR and RTS */
+	case IBV_QPS_RTR:
+		{
+			dapl_dbg_log(DAPL_DBG_TYPE_EP,
+				     " QPS_RTR: type %d state %d qpn %x lid %x"
+				     " port %x ep %p qp_state %d\n",
+				     qp_handle->qp_type, qp_handle->qp_type,
+				     qp_cm->qpn, qp_cm->lid, qp_cm->port,
+				     ep_ptr, ep_ptr->qp_state);
+
+			mask |= IBV_QP_AV |
+			    IBV_QP_PATH_MTU |
+			    IBV_QP_DEST_QPN |
+			    IBV_QP_RQ_PSN |
+			    IBV_QP_MAX_DEST_RD_ATOMIC | IBV_QP_MIN_RNR_TIMER;
+
+			qp_attr.dest_qp_num = qp_cm->qpn;
+			qp_attr.rq_psn = 1;
+			qp_attr.path_mtu = ia_ptr->hca_ptr->ib_trans.mtu;
+			qp_attr.max_dest_rd_atomic =
+			    ep_ptr->param.ep_attr.max_rdma_read_out;
+			qp_attr.min_rnr_timer =
+			    ia_ptr->hca_ptr->ib_trans.rnr_timer;
+
+			/* address handle. RC and UD */
+			qp_attr.ah_attr.dlid = qp_cm->lid;
+			if (ia_ptr->hca_ptr->ib_trans.global) {
+				qp_attr.ah_attr.is_global = 1;
+				qp_attr.ah_attr.grh.dgid = qp_cm->gid;
+				qp_attr.ah_attr.grh.hop_limit =
+				    ia_ptr->hca_ptr->ib_trans.hop_limit;
+				qp_attr.ah_attr.grh.traffic_class =
+				    ia_ptr->hca_ptr->ib_trans.tclass;
+			}
+			qp_attr.ah_attr.sl = 0;
+			qp_attr.ah_attr.src_path_bits = 0;
+			qp_attr.ah_attr.port_num = ia_ptr->hca_ptr->port_num;
+#ifdef DAT_EXTENSIONS
+			/* UD: create AH for remote side */
+			if (qp_handle->qp_type == IBV_QPT_UD) {
+				ib_pd_handle_t pz;
+				pz = ((DAPL_PZ *)
+				      ep_ptr->param.pz_handle)->pd_handle;
+				mask = IBV_QP_STATE;
+				cm_ptr->ah = ibv_create_ah(pz,
+							   &qp_attr.ah_attr);
+				if (!cm_ptr->ah)
+					return (dapl_convert_errno(errno,
+								   "ibv_ah"));
+
+				/* already RTR, multi remote AH's on QP */
+				if (ep_ptr->qp_state == IBV_QPS_RTR ||
+				    ep_ptr->qp_state == IBV_QPS_RTS)
+					return DAT_SUCCESS;
+			}
+#endif
+			break;
+		}
+	case IBV_QPS_RTS:
+		{
+			/* RC only */
+			if (qp_handle->qp_type == IBV_QPT_RC) {
+				mask |= IBV_QP_SQ_PSN |
+				    IBV_QP_TIMEOUT |
+				    IBV_QP_RETRY_CNT |
+				    IBV_QP_RNR_RETRY | IBV_QP_MAX_QP_RD_ATOMIC;
+				qp_attr.timeout =
+				    ia_ptr->hca_ptr->ib_trans.ack_timer;
+				qp_attr.retry_cnt =
+				    ia_ptr->hca_ptr->ib_trans.ack_retry;
+				qp_attr.rnr_retry =
+				    ia_ptr->hca_ptr->ib_trans.rnr_retry;
+				qp_attr.max_rd_atomic =
+				    ep_ptr->param.ep_attr.max_rdma_read_out;
+			}
+			/* RC and UD */
+			qp_attr.qp_state = IBV_QPS_RTS;
+			qp_attr.sq_psn = 1;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_EP,
+				     " QPS_RTS: psn %x rd_atomic %d ack %d "
+				     " retry %d rnr_retry %d ep %p qp_state %d\n",
+				     qp_attr.sq_psn, qp_attr.max_rd_atomic,
+				     qp_attr.timeout, qp_attr.retry_cnt,
+				     qp_attr.rnr_retry, ep_ptr,
+				     ep_ptr->qp_state);
+#ifdef DAT_EXTENSIONS
+			if (qp_handle->qp_type == IBV_QPT_UD) {
+				/* already RTS, multi remote AH's on QP */
+				if (ep_ptr->qp_state == IBV_QPS_RTS)
+					return DAT_SUCCESS;
+				else
+					mask = IBV_QP_STATE | IBV_QP_SQ_PSN;
+			}
+#endif
+			break;
+		}
+	case IBV_QPS_INIT:
+		{
+			mask |= IBV_QP_PKEY_INDEX | IBV_QP_PORT;
+			if (qp_handle->qp_type == IBV_QPT_RC) {
+				mask |= IBV_QP_ACCESS_FLAGS;
+				qp_attr.qp_access_flags =
+				    IBV_ACCESS_LOCAL_WRITE |
+				    IBV_ACCESS_REMOTE_WRITE |
+				    IBV_ACCESS_REMOTE_READ |
+				    IBV_ACCESS_REMOTE_ATOMIC |
+				    IBV_ACCESS_MW_BIND;
+			}
+#ifdef DAT_EXTENSIONS
+			if (qp_handle->qp_type == IBV_QPT_UD) {
+				/* already INIT, multi remote AH's on QP */
+				if (ep_ptr->qp_state == IBV_QPS_INIT)
+					return DAT_SUCCESS;
+				mask |= IBV_QP_QKEY;
+				qp_attr.qkey = SCM_UD_QKEY;
+			}
+#endif
+			qp_attr.pkey_index = 0;
+			qp_attr.port_num = ia_ptr->hca_ptr->port_num;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_EP,
+				     " QPS_INIT: pi %x port %x acc %x qkey 0x%x\n",
+				     qp_attr.pkey_index, qp_attr.port_num,
+				     qp_attr.qp_access_flags, qp_attr.qkey);
+			break;
+		}
+	default:
+		break;
+
+	}
+
+	ret = ibv_modify_qp(qp_handle, &qp_attr, mask);
+	if (ret == 0) {
+		ep_ptr->qp_state = qp_state;
+		return DAT_SUCCESS;
+	} else {
+		return (dapl_convert_errno(errno, "modify_qp_state"));
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_scm/dapl_ib_util.c b/dapl/openib_scm/dapl_ib_util.c
new file mode 100644
index 0000000..c95b0c2
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_util.c
@@ -0,0 +1,725 @@
+/*
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/***************************************************************************
+ *
+ *   Module:		 uDAPL
+ *
+ *   Filename:		 dapl_ib_util.c
+ *
+ *   Author:		 Arlin Davis
+ *
+ *   Created:		 3/10/2005
+ *
+ *   Description: 
+ *
+ *   The uDAPL openib provider - init, open, close, utilities
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ *	Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ *
+ **************************************************************************/
+#ifdef RCSID
+static const char rcsid[] = "$Id:  $";
+#endif
+
+#include "openib_osd.h"
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ib_util.h"
+#include "dapl_osd.h"
+
+#include <stdlib.h>
+
+int g_dapl_loopback_connection = 0;
+DAPL_SOCKET g_scm[2];
+
+enum ibv_mtu dapl_ib_mtu(int mtu)
+{
+	switch (mtu) {
+	case 256:
+		return IBV_MTU_256;
+	case 512:
+		return IBV_MTU_512;
+	case 1024:
+		return IBV_MTU_1024;
+	case 2048:
+		return IBV_MTU_2048;
+	case 4096:
+		return IBV_MTU_4096;
+	default:
+		return IBV_MTU_1024;
+	}
+}
+
+char *dapl_ib_mtu_str(enum ibv_mtu mtu)
+{
+	switch (mtu) {
+	case IBV_MTU_256:
+		return "256";
+	case IBV_MTU_512:
+		return "512";
+	case IBV_MTU_1024:
+		return "1024";
+	case IBV_MTU_2048:
+		return "2048";
+	case IBV_MTU_4096:
+		return "4096";
+	default:
+		return "1024";
+	}
+}
+
+static DAT_RETURN getlocalipaddr(DAT_SOCK_ADDR * addr, int addr_len)
+{
+	struct sockaddr_in *sin;
+	struct addrinfo *res, hint, *ai;
+	int ret;
+	char hostname[256];
+
+	if (addr_len < sizeof(*sin)) {
+		return DAT_INTERNAL_ERROR;
+	}
+
+	ret = gethostname(hostname, 256);
+	if (ret)
+		return dapl_convert_errno(ret, "gethostname");
+
+	memset(&hint, 0, sizeof hint);
+	hint.ai_flags = AI_PASSIVE;
+	hint.ai_family = AF_INET;
+	hint.ai_socktype = SOCK_STREAM;
+	hint.ai_protocol = IPPROTO_TCP;
+
+	ret = getaddrinfo(hostname, NULL, &hint, &res);
+	if (ret) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " getaddrinfo ERR: %d %s\n", ret, gai_strerror(ret));
+		return DAT_INVALID_ADDRESS;
+	}
+
+	ret = DAT_INVALID_ADDRESS;
+	for (ai = res; ai; ai = ai->ai_next) {
+		sin = (struct sockaddr_in *)ai->ai_addr;
+		if (*((uint32_t *) & sin->sin_addr) != htonl(0x7f000001)) {
+			*((struct sockaddr_in *)addr) = *sin;
+			ret = DAT_SUCCESS;
+			break;
+		}
+	}
+
+	freeaddrinfo(res);
+	return ret;
+}
+
+/*
+ * dapls_ib_init, dapls_ib_release
+ *
+ * Initialize Verb related items for device open
+ *
+ * Input:
+ * 	none
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ * 	0 success, -1 error
+ *
+ */
+int32_t dapls_ib_init(void)
+{
+	DAPL_SOCKET listen_socket;
+	struct sockaddr_in addr;
+	socklen_t addrlen = sizeof(addr);
+	int ret;
+
+	listen_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+	if (listen_socket == DAPL_INVALID_SOCKET)
+		return 1;
+
+	memset(&addr, 0, sizeof addr);
+	addr.sin_family = AF_INET;
+	addr.sin_addr.s_addr = htonl(0x7f000001);
+	ret = bind(listen_socket, (struct sockaddr *)&addr, sizeof addr);
+	if (ret)
+		goto err1;
+
+	ret = getsockname(listen_socket, (struct sockaddr *)&addr, &addrlen);
+	if (ret)
+		goto err1;
+
+	ret = listen(listen_socket, 0);
+	if (ret)
+		goto err1;
+
+	g_scm[1] = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+	if (g_scm[1] == DAPL_INVALID_SOCKET)
+		goto err1;
+
+	ret = connect(g_scm[1], (struct sockaddr *)&addr, sizeof(addr));
+	if (ret)
+		goto err2;
+
+	g_scm[0] = accept(listen_socket, NULL, NULL);
+	if (g_scm[0] == DAPL_INVALID_SOCKET)
+		goto err2;
+
+	closesocket(listen_socket);
+	return 0;
+
+      err2:
+	closesocket(g_scm[1]);
+      err1:
+	closesocket(listen_socket);
+	return 1;
+}
+
+int32_t dapls_ib_release(void)
+{
+	closesocket(g_scm[0]);
+	closesocket(g_scm[1]);
+	return 0;
+}
+
+#if defined(_WIN64) || defined(_WIN32)
+int dapls_config_comp_channel(struct ibv_comp_channel *channel)
+{
+	return 0;
+}
+#else				// _WIN64 || WIN32
+int dapls_config_comp_channel(struct ibv_comp_channel *channel)
+{
+	int opts;
+
+	opts = fcntl(channel->fd, F_GETFL);	/* uCQ */
+	if (opts < 0 || fcntl(channel->fd, F_SETFL, opts | O_NONBLOCK) < 0) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " dapls_create_comp_channel: fcntl on ib_cq->fd %d ERR %d %s\n",
+			 channel->fd, opts, strerror(errno));
+		return errno;
+	}
+
+	return 0;
+}
+#endif
+
+/*
+ * dapls_ib_open_hca
+ *
+ * Open HCA
+ *
+ * Input:
+ *      *hca_name         pointer to provider device name
+ *      *ib_hca_handle_p  pointer to provide HCA handle
+ *
+ * Output:
+ *      none
+ *
+ * Return:
+ *      DAT_SUCCESS
+ *      dapl_convert_errno
+ *
+ */
+DAT_RETURN dapls_ib_open_hca(IN IB_HCA_NAME hca_name, IN DAPL_HCA * hca_ptr)
+{
+	struct ibv_device **dev_list;
+	struct ibv_port_attr port_attr;
+	int i;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " open_hca: %s - %p\n", hca_name, hca_ptr);
+
+	/* get the IP address of the device */
+	dat_status = getlocalipaddr((DAT_SOCK_ADDR *) & hca_ptr->hca_address,
+				    sizeof(DAT_SOCK_ADDR6));
+	if (dat_status != DAT_SUCCESS)
+		return dat_status;
+
+	/* Get list of all IB devices, find match, open */
+	dev_list = ibv_get_device_list(NULL);
+	if (!dev_list) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " open_hca: ibv_get_device_list() failed\n",
+			     hca_name);
+		return DAT_INTERNAL_ERROR;
+	}
+
+	for (i = 0; dev_list[i]; ++i) {
+		hca_ptr->ib_trans.ib_dev = dev_list[i];
+		if (!strcmp(ibv_get_device_name(hca_ptr->ib_trans.ib_dev),
+			    hca_name))
+			goto found;
+	}
+
+	dapl_log(DAPL_DBG_TYPE_ERR,
+		 " open_hca: device %s not found\n", hca_name);
+	goto err;
+
+      found:
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " open_hca: Found dev %s %016llx\n",
+		     ibv_get_device_name(hca_ptr->ib_trans.ib_dev),
+		     (unsigned long long)
+		     ntohll(ibv_get_device_guid(hca_ptr->ib_trans.ib_dev)));
+
+	hca_ptr->ib_hca_handle = ibv_open_device(hca_ptr->ib_trans.ib_dev);
+	if (!hca_ptr->ib_hca_handle) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: dev open failed for %s, err=%s\n",
+			 ibv_get_device_name(hca_ptr->ib_trans.ib_dev),
+			 strerror(errno));
+		goto err;
+	}
+
+	/* get lid for this hca-port, network order */
+	if (ibv_query_port(hca_ptr->ib_hca_handle,
+			   (uint8_t) hca_ptr->port_num, &port_attr)) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: get lid ERR for %s, err=%s\n",
+			 ibv_get_device_name(hca_ptr->ib_trans.ib_dev),
+			 strerror(errno));
+		goto err;
+	} else {
+		hca_ptr->ib_trans.lid = htons(port_attr.lid);
+	}
+
+	/* get gid for this hca-port, network order */
+	if (ibv_query_gid(hca_ptr->ib_hca_handle,
+			  (uint8_t) hca_ptr->port_num,
+			  0, &hca_ptr->ib_trans.gid)) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: query GID ERR for %s, err=%s\n",
+			 ibv_get_device_name(hca_ptr->ib_trans.ib_dev),
+			 strerror(errno));
+		goto err;
+	}
+
+	/* set RC tunables via enviroment or default */
+	hca_ptr->ib_trans.max_inline_send =
+	    dapl_os_get_env_val("DAPL_MAX_INLINE", INLINE_SEND_DEFAULT);
+	hca_ptr->ib_trans.ack_retry =
+	    dapl_os_get_env_val("DAPL_ACK_RETRY", SCM_ACK_RETRY);
+	hca_ptr->ib_trans.ack_timer =
+	    dapl_os_get_env_val("DAPL_ACK_TIMER", SCM_ACK_TIMER);
+	hca_ptr->ib_trans.rnr_retry =
+	    dapl_os_get_env_val("DAPL_RNR_RETRY", SCM_RNR_RETRY);
+	hca_ptr->ib_trans.rnr_timer =
+	    dapl_os_get_env_val("DAPL_RNR_TIMER", SCM_RNR_TIMER);
+	hca_ptr->ib_trans.global =
+	    dapl_os_get_env_val("DAPL_GLOBAL_ROUTING", SCM_GLOBAL);
+	hca_ptr->ib_trans.hop_limit =
+	    dapl_os_get_env_val("DAPL_HOP_LIMIT", SCM_HOP_LIMIT);
+	hca_ptr->ib_trans.tclass =
+	    dapl_os_get_env_val("DAPL_TCLASS", SCM_TCLASS);
+	hca_ptr->ib_trans.mtu =
+	    dapl_ib_mtu(dapl_os_get_env_val("DAPL_IB_MTU", SCM_IB_MTU));
+
+#ifndef CQ_WAIT_OBJECT
+	/* initialize cq_lock */
+	dat_status = dapl_os_lock_init(&hca_ptr->ib_trans.cq_lock);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: failed to init cq_lock\n");
+		goto bail;
+	}
+	/* EVD events without direct CQ channels, non-blocking */
+	hca_ptr->ib_trans.ib_cq =
+	    ibv_create_comp_channel(hca_ptr->ib_hca_handle);
+	if (hca_ptr->ib_trans.ib_cq == NULL) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: ibv_create_comp_channel ERR %s\n",
+			 strerror(errno));
+		goto bail;
+	}
+
+	if (dapls_config_comp_channel(hca_ptr->ib_trans.ib_cq)) {
+		goto bail;
+	}
+
+	if (dapli_cq_thread_init(hca_ptr)) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: cq_thread_init failed for %s\n",
+			 ibv_get_device_name(hca_ptr->ib_trans.ib_dev));
+		goto bail;
+	}
+#endif				/* CQ_WAIT_OBJECT */
+
+	/* initialize cr_list lock */
+	dat_status = dapl_os_lock_init(&hca_ptr->ib_trans.lock);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: failed to init cr_list lock\n");
+		goto bail;
+	}
+
+	/* initialize CM list for listens on this HCA */
+	dapl_llist_init_head(&hca_ptr->ib_trans.list);
+
+	/* create thread to process inbound connect request */
+	hca_ptr->ib_trans.cr_state = IB_THREAD_INIT;
+	dat_status = dapl_os_thread_create(cr_thread,
+					   (void *)hca_ptr,
+					   &hca_ptr->ib_trans.thread);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: failed to create thread\n");
+		goto bail;
+	}
+
+	/* wait for thread */
+	while (hca_ptr->ib_trans.cr_state != IB_THREAD_RUN) {
+		dapl_os_sleep_usec(2000);
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " open_hca: devname %s, port %d, hostname_IP %s\n",
+		     ibv_get_device_name(hca_ptr->ib_trans.ib_dev),
+		     hca_ptr->port_num, inet_ntoa(((struct sockaddr_in *)
+						   &hca_ptr->hca_address)->
+						  sin_addr));
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " open_hca: LID 0x%x GID Subnet 0x" F64x " ID 0x" F64x
+		     "\n", ntohs(hca_ptr->ib_trans.lid), (unsigned long long)
+		     htonll(hca_ptr->ib_trans.gid.global.subnet_prefix),
+		     (unsigned long long)htonll(hca_ptr->ib_trans.gid.global.
+						interface_id));
+
+	ibv_free_device_list(dev_list);
+	return dat_status;
+
+      bail:
+	ibv_close_device(hca_ptr->ib_hca_handle);
+	hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
+      err:
+	ibv_free_device_list(dev_list);
+	return DAT_INTERNAL_ERROR;
+}
+
+/*
+ * dapls_ib_close_hca
+ *
+ * Open HCA
+ *
+ * Input:
+ *      DAPL_HCA   provide CA handle
+ *
+ * Output:
+ *      none
+ *
+ * Return:
+ *      DAT_SUCCESS
+ *	dapl_convert_errno 
+ *
+ */
+DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " close_hca: %p\n", hca_ptr);
+
+#ifndef CQ_WAIT_OBJECT
+	dapli_cq_thread_destroy(hca_ptr);
+	dapl_os_lock_destroy(&hca_ptr->ib_trans.cq_lock);
+#endif				/* CQ_WAIT_OBJECT */
+
+	if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {
+		if (ibv_close_device(hca_ptr->ib_hca_handle))
+			return (dapl_convert_errno(errno, "ib_close_device"));
+		hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
+	}
+
+	/* destroy cr_thread and lock */
+	hca_ptr->ib_trans.cr_state = IB_THREAD_CANCEL;
+	if (send(g_scm[1], "w", sizeof "w", 0) == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " thread_destroy: thread wakeup err = %s\n",
+			 strerror(errno));
+	while (hca_ptr->ib_trans.cr_state != IB_THREAD_EXIT) {
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " close_hca: waiting for cr_thread\n");
+		if (send(g_scm[1], "w", sizeof "w", 0) == -1)
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " thread_destroy: thread wakeup err = %s\n",
+				 strerror(errno));
+		dapl_os_sleep_usec(2000);
+	}
+	dapl_os_lock_destroy(&hca_ptr->ib_trans.lock);
+
+	return (DAT_SUCCESS);
+}
+
+/*
+ * dapls_ib_query_hca
+ *
+ * Query the hca attribute
+ *
+ * Input:
+ *	hca_handl		hca handle	
+ *	ia_attr			attribute of the ia
+ *	ep_attr			attribute of the ep
+ *	ip_addr			ip address of DET NIC
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ */
+
+DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA * hca_ptr,
+			      OUT DAT_IA_ATTR * ia_attr,
+			      OUT DAT_EP_ATTR * ep_attr,
+			      OUT DAT_SOCK_ADDR6 * ip_addr)
+{
+	struct ibv_device_attr dev_attr;
+	struct ibv_port_attr port_attr;
+
+	if (hca_ptr->ib_hca_handle == NULL) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR, " query_hca: BAD handle\n");
+		return (DAT_INVALID_HANDLE);
+	}
+
+	/* local IP address of device, set during ia_open */
+	if (ip_addr != NULL)
+		memcpy(ip_addr, &hca_ptr->hca_address, sizeof(DAT_SOCK_ADDR6));
+
+	if (ia_attr == NULL && ep_attr == NULL)
+		return DAT_SUCCESS;
+
+	/* query verbs for this device and port attributes */
+	if (ibv_query_device(hca_ptr->ib_hca_handle, &dev_attr) ||
+	    ibv_query_port(hca_ptr->ib_hca_handle,
+			   hca_ptr->port_num, &port_attr))
+		return (dapl_convert_errno(errno, "ib_query_hca"));
+
+	if (ia_attr != NULL) {
+		(void)dapl_os_memzero(ia_attr, sizeof(*ia_attr));
+		ia_attr->adapter_name[DAT_NAME_MAX_LENGTH - 1] = '\0';
+		ia_attr->vendor_name[DAT_NAME_MAX_LENGTH - 1] = '\0';
+		ia_attr->ia_address_ptr =
+		    (DAT_IA_ADDRESS_PTR) & hca_ptr->hca_address;
+
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " query_hca: %s %s \n",
+			     ibv_get_device_name(hca_ptr->ib_trans.ib_dev),
+			     inet_ntoa(((struct sockaddr_in *)
+					&hca_ptr->hca_address)->sin_addr));
+
+		ia_attr->hardware_version_major = dev_attr.hw_ver;
+		/* ia_attr->hardware_version_minor   = dev_attr.fw_ver; */
+		ia_attr->max_eps = dev_attr.max_qp;
+		ia_attr->max_dto_per_ep = dev_attr.max_qp_wr;
+		ia_attr->max_rdma_read_in = dev_attr.max_qp_rd_atom;
+		ia_attr->max_rdma_read_out = dev_attr.max_qp_init_rd_atom;
+		ia_attr->max_rdma_read_per_ep_in = dev_attr.max_qp_rd_atom;
+		ia_attr->max_rdma_read_per_ep_out =
+		    dev_attr.max_qp_init_rd_atom;
+		ia_attr->max_rdma_read_per_ep_in_guaranteed = DAT_TRUE;
+		ia_attr->max_rdma_read_per_ep_out_guaranteed = DAT_TRUE;
+		ia_attr->max_evds = dev_attr.max_cq;
+		ia_attr->max_evd_qlen = dev_attr.max_cqe;
+		ia_attr->max_iov_segments_per_dto = dev_attr.max_sge;
+		ia_attr->max_lmrs = dev_attr.max_mr;
+		/* 32bit attribute from 64bit, 4G-1 limit, DAT v2 needs fix */
+		ia_attr->max_lmr_block_size = 
+		    (dev_attr.max_mr_size >> 32) ? ~0 : dev_attr.max_mr_size;
+		ia_attr->max_rmrs = dev_attr.max_mw;
+		ia_attr->max_lmr_virtual_address = dev_attr.max_mr_size;
+		ia_attr->max_rmr_target_address = dev_attr.max_mr_size;
+		ia_attr->max_pzs = dev_attr.max_pd;
+		ia_attr->max_message_size = port_attr.max_msg_sz;
+		ia_attr->max_rdma_size = port_attr.max_msg_sz;
+		ia_attr->max_iov_segments_per_rdma_read = dev_attr.max_sge;
+		ia_attr->max_iov_segments_per_rdma_write = dev_attr.max_sge;
+		ia_attr->num_transport_attr = 0;
+		ia_attr->transport_attr = NULL;
+		ia_attr->num_vendor_attr = 0;
+		ia_attr->vendor_attr = NULL;
+#ifdef DAT_EXTENSIONS
+		ia_attr->extension_supported = DAT_EXTENSION_IB;
+		ia_attr->extension_version = DAT_IB_EXTENSION_VERSION;
+#endif
+		hca_ptr->ib_trans.mtu = DAPL_MIN(port_attr.active_mtu,
+						 hca_ptr->ib_trans.mtu);
+		hca_ptr->ib_trans.ack_timer =
+		    DAPL_MAX(dev_attr.local_ca_ack_delay,
+			     hca_ptr->ib_trans.ack_timer);
+
+		/* set MTU in transport specific named attribute */
+		hca_ptr->ib_trans.named_attr.name = "DAT_IB_TRANSPORT_MTU";
+		hca_ptr->ib_trans.named_attr.value =
+		    dapl_ib_mtu_str(hca_ptr->ib_trans.mtu);
+
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			     " query_hca: (%x.%x) ep %d ep_q %d evd %d"
+			     " evd_q %d mtu %d\n",
+			     ia_attr->hardware_version_major,
+			     ia_attr->hardware_version_minor,
+			     ia_attr->max_eps, ia_attr->max_dto_per_ep,
+			     ia_attr->max_evds, ia_attr->max_evd_qlen,
+			     128 << hca_ptr->ib_trans.mtu);
+
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			     " query_hca: msg %llu rdma %llu iov %d lmr %d rmr %d"
+			     " ack_time %d mr %u\n",
+			     ia_attr->max_message_size, ia_attr->max_rdma_size,
+			     ia_attr->max_iov_segments_per_dto,
+			     ia_attr->max_lmrs, ia_attr->max_rmrs,
+			     hca_ptr->ib_trans.ack_timer,
+			     ia_attr->max_lmr_block_size);
+	}
+
+	if (ep_attr != NULL) {
+		(void)dapl_os_memzero(ep_attr, sizeof(*ep_attr));
+		ep_attr->max_message_size = port_attr.max_msg_sz;
+		ep_attr->max_rdma_size = port_attr.max_msg_sz;
+		ep_attr->max_recv_dtos = dev_attr.max_qp_wr;
+		ep_attr->max_request_dtos = dev_attr.max_qp_wr;
+		ep_attr->max_recv_iov = dev_attr.max_sge;
+		ep_attr->max_request_iov = dev_attr.max_sge;
+		ep_attr->max_rdma_read_in = dev_attr.max_qp_rd_atom;
+		ep_attr->max_rdma_read_out = dev_attr.max_qp_init_rd_atom;
+		ep_attr->max_rdma_read_iov = dev_attr.max_sge;
+		ep_attr->max_rdma_write_iov = dev_attr.max_sge;
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+			     " query_hca: MAX msg %llu mtu %d dto %d iov %d"
+			     " rdma i%d,o%d\n",
+			     ep_attr->max_message_size,
+			     ep_attr->max_recv_dtos, ep_attr->max_recv_iov,
+			     ep_attr->max_rdma_read_in,
+			     ep_attr->max_rdma_read_out);
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_ib_setup_async_callback
+ *
+ * Set up an asynchronous callbacks of various kinds
+ *
+ * Input:
+ *	ia_handle		IA handle
+ *	handler_type		type of handler to set up
+ *	callback_handle 	handle param for completion callbacks
+ *	callback		callback routine pointer
+ *	context 		argument for callback routine
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_PARAMETER
+ *
+ */
+DAT_RETURN dapls_ib_setup_async_callback(IN DAPL_IA * ia_ptr,
+					 IN DAPL_ASYNC_HANDLER_TYPE
+					 handler_type, IN DAPL_EVD * evd_ptr,
+					 IN ib_async_handler_t callback,
+					 IN void *context)
+{
+	ib_hca_transport_t *hca_ptr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " setup_async_cb: ia %p type %d handle %p cb %p ctx %p\n",
+		     ia_ptr, handler_type, evd_ptr, callback, context);
+
+	hca_ptr = &ia_ptr->hca_ptr->ib_trans;
+	switch (handler_type) {
+	case DAPL_ASYNC_UNAFILIATED:
+		hca_ptr->async_unafiliated = (ib_async_handler_t) callback;
+		hca_ptr->async_un_ctx = context;
+		break;
+	case DAPL_ASYNC_CQ_ERROR:
+		hca_ptr->async_cq_error = (ib_async_cq_handler_t) callback;
+		break;
+	case DAPL_ASYNC_CQ_COMPLETION:
+		hca_ptr->async_cq = (ib_async_dto_handler_t) callback;
+		break;
+	case DAPL_ASYNC_QP_ERROR:
+		hca_ptr->async_qp_error = (ib_async_qp_handler_t) callback;
+		break;
+	default:
+		break;
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_set_provider_specific_attr
+ *
+ * Input:
+ *      attr_ptr        Pointer provider specific attributes
+ *
+ * Output:
+ *      none
+ *
+ * Returns:
+ *      void
+ */
+DAT_NAMED_ATTR ib_attrs[] = {
+	{
+	 "DAT_IB_TRANSPORT_MTU", "1024"}
+	,
+#ifdef DAT_EXTENSIONS
+	{
+	 "DAT_EXTENSION_INTERFACE", "TRUE"}
+	,
+	{
+	 DAT_IB_ATTR_FETCH_AND_ADD, "TRUE"}
+	,
+	{
+	 DAT_IB_ATTR_CMP_AND_SWAP, "TRUE"}
+	,
+	{
+	 DAT_IB_ATTR_IMMED_DATA, "TRUE"}
+	,
+	{
+	 DAT_IB_ATTR_UD, "TRUE"}
+	,
+#ifdef DAPL_COUNTERS
+	{
+	 DAT_ATTR_COUNTERS, "TRUE"}
+	,
+#endif				/* DAPL_COUNTERS */
+#endif
+};
+
+#define SPEC_ATTR_SIZE( x )     (sizeof( x ) / sizeof( DAT_NAMED_ATTR))
+
+void dapls_query_provider_specific_attr(IN DAPL_IA * ia_ptr,
+					IN DAT_PROVIDER_ATTR * attr_ptr)
+{
+	attr_ptr->num_provider_specific_attr = SPEC_ATTR_SIZE(ib_attrs);
+	attr_ptr->provider_specific_attr = ib_attrs;
+
+	/* set MTU to actual settings */
+	ib_attrs[0].value = ia_ptr->hca_ptr->ib_trans.named_attr.value;
+}
diff --git a/dapl/openib_scm/dapl_ib_util.h b/dapl/openib_scm/dapl_ib_util.h
new file mode 100644
index 0000000..5493312
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_util.h
@@ -0,0 +1,381 @@
+/*
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/***************************************************************************
+ *
+ *   Module:		 uDAPL
+ *
+ *   Filename:		 dapl_ib_util.h
+ *
+ *   Author:		 Arlin Davis
+ *
+ *   Created:		 3/10/2005
+ *
+ *   Description: 
+ *
+ *   The uDAPL openib provider - definitions, prototypes,
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ *	Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ *
+ **************************************************************************/
+
+#ifndef _DAPL_IB_UTIL_H_
+#define _DAPL_IB_UTIL_H_
+
+#include "openib_osd.h"
+#include <infiniband/verbs.h>
+
+#ifdef DAT_EXTENSIONS
+#include <dat2/dat_ib_extensions.h>
+#endif
+
+#ifndef __cplusplus
+#define false 0
+#define true  1
+#endif /*__cplusplus */
+
+/* Typedefs to map common DAPL provider types to IB verbs */
+typedef	struct ibv_qp		*ib_qp_handle_t;
+typedef	struct ibv_cq		*ib_cq_handle_t;
+typedef	struct ibv_pd		*ib_pd_handle_t;
+typedef	struct ibv_mr		*ib_mr_handle_t;
+typedef	struct ibv_mw		*ib_mw_handle_t;
+typedef	struct ibv_wc		ib_work_completion_t;
+
+/* HCA context type maps to IB verbs  */
+typedef	struct ibv_context	*ib_hca_handle_t;
+typedef ib_hca_handle_t		dapl_ibal_ca_t;
+
+/* destination info to exchange, define wire protocol version */
+#define DSCM_VER 4
+typedef struct _ib_qp_cm
+{ 
+	uint16_t		ver;
+	uint16_t		rej;
+	uint16_t		lid;
+	uint16_t		port;
+	uint32_t		qpn;
+	uint32_t		p_size;
+	union ibv_gid		gid;
+	DAT_SOCK_ADDR6		ia_address;
+	uint16_t		qp_type; 
+} ib_qp_cm_t;
+
+typedef enum scm_state 
+{
+	SCM_INIT,
+	SCM_LISTEN,
+	SCM_CONN_PENDING,
+	SCM_RTU_PENDING,
+	SCM_ACCEPTING,
+	SCM_ACCEPTING_DATA,
+	SCM_ACCEPTED,
+	SCM_REJECTED,
+	SCM_CONNECTED,
+	SCM_DISCONNECTED,
+	SCM_DESTROY
+} SCM_STATE;
+
+struct ib_cm_handle
+{ 
+	struct dapl_llist_entry	entry;
+	DAPL_OS_LOCK		lock;
+	SCM_STATE		state;
+	DAPL_SOCKET		socket;
+	struct dapl_hca		*hca;
+	struct dapl_sp		*sp;	
+	struct dapl_ep 		*ep;
+	ib_qp_cm_t		dst;
+	unsigned char		p_data[256];	/* must follow ib_qp_cm_t */
+	struct ibv_ah		*ah;
+};
+
+typedef struct ib_cm_handle	*dp_ib_cm_handle_t;
+typedef dp_ib_cm_handle_t	ib_cm_srvc_handle_t;
+
+/* CM events */
+typedef enum 
+{
+    IB_CME_CONNECTED,
+    IB_CME_DISCONNECTED,
+    IB_CME_DISCONNECTED_ON_LINK_DOWN,
+    IB_CME_CONNECTION_REQUEST_PENDING,
+    IB_CME_CONNECTION_REQUEST_PENDING_PRIVATE_DATA,
+    IB_CME_DESTINATION_REJECT,
+    IB_CME_DESTINATION_REJECT_PRIVATE_DATA,
+    IB_CME_DESTINATION_UNREACHABLE,
+    IB_CME_TOO_MANY_CONNECTION_REQUESTS,
+    IB_CME_LOCAL_FAILURE,
+    IB_CM_LOCAL_FAILURE
+
+} ib_cm_events_t;
+
+/* Operation and state mappings */
+typedef int ib_send_op_type_t;
+typedef	struct	ibv_sge		ib_data_segment_t;
+typedef enum	ibv_qp_state	ib_qp_state_t;
+typedef	enum	ibv_event_type	ib_async_event_type;
+typedef struct	ibv_async_event	ib_error_record_t;	
+
+/* CQ notifications */
+typedef enum
+{
+	IB_NOTIFY_ON_NEXT_COMP,
+	IB_NOTIFY_ON_SOLIC_COMP
+
+} ib_notification_type_t;
+
+/* other mappings */
+typedef int			ib_bool_t;
+typedef union ibv_gid		GID;
+typedef char			*IB_HCA_NAME;
+typedef uint16_t		ib_hca_port_t;
+typedef uint32_t		ib_comp_handle_t;
+
+#ifdef CQ_WAIT_OBJECT
+typedef struct ibv_comp_channel *ib_wait_obj_handle_t;
+#endif
+
+/* Definitions */
+#define IB_INVALID_HANDLE	NULL
+
+/* inline send rdma threshold */
+#define	INLINE_SEND_DEFAULT	200
+
+/* qkey for UD QP's */
+#define SCM_UD_QKEY	0x78654321
+
+/* RC timer - retry count defaults */
+#define SCM_ACK_TIMER 16 /* 5 bits, 4.096us*2^ack_timer. 16== 268ms */
+#define SCM_ACK_RETRY 7  /* 3 bits, 7 * 268ms = 1.8 seconds */
+#define SCM_RNR_TIMER 12 /* 5 bits, 12 =.64ms, 28 =163ms, 31 =491ms */
+#define SCM_RNR_RETRY 7  /* 3 bits, 7 == infinite */
+#define SCM_IB_MTU    2048
+
+/* Global routing defaults */
+#define SCM_GLOBAL	0	/* global routing is disabled */
+#define SCM_HOP_LIMIT	0xff
+#define SCM_TCLASS	0
+
+/* CM private data areas */
+#define	IB_MAX_REQ_PDATA_SIZE	92
+#define	IB_MAX_REP_PDATA_SIZE	196
+#define	IB_MAX_REJ_PDATA_SIZE	148
+#define	IB_MAX_DREQ_PDATA_SIZE	220
+#define	IB_MAX_DREP_PDATA_SIZE	224
+#define	IB_MAX_RTU_PDATA_SIZE	224
+
+/* DTO OPs, ordered for DAPL ENUM definitions */
+#define OP_RDMA_WRITE           IBV_WR_RDMA_WRITE
+#define OP_RDMA_WRITE_IMM       IBV_WR_RDMA_WRITE_WITH_IMM
+#define OP_SEND                 IBV_WR_SEND
+#define OP_SEND_IMM             IBV_WR_SEND_WITH_IMM
+#define OP_RDMA_READ            IBV_WR_RDMA_READ
+#define OP_COMP_AND_SWAP        IBV_WR_ATOMIC_CMP_AND_SWP
+#define OP_FETCH_AND_ADD        IBV_WR_ATOMIC_FETCH_AND_ADD
+#define OP_RECEIVE              7   /* internal op */
+#define OP_RECEIVE_IMM		8   /* rdma write with immed, internel op */
+#define OP_RECEIVE_MSG_IMM	9   /* recv msg with immed, internel op */
+#define OP_BIND_MW              10   /* internal op */
+#define OP_SEND_UD              11  /* internal op */
+#define OP_RECV_UD              12  /* internal op */
+#define OP_INVALID		0xff
+
+/* Definitions to map QP state */
+#define IB_QP_STATE_RESET	IBV_QPS_RESET
+#define IB_QP_STATE_INIT	IBV_QPS_INIT
+#define IB_QP_STATE_RTR		IBV_QPS_RTR
+#define IB_QP_STATE_RTS		IBV_QPS_RTS
+#define IB_QP_STATE_SQD		IBV_QPS_SQD
+#define IB_QP_STATE_SQE		IBV_QPS_SQE
+#define IB_QP_STATE_ERROR	IBV_QPS_ERR
+
+/* Definitions for ibverbs/mthca return codes, should be defined in verbs.h */
+/* some are errno and some are -n values */
+
+/**
+ * ibv_get_device_name - Return kernel device name
+ * ibv_get_device_guid - Return device's node GUID
+ * ibv_open_device - Return ibv_context or NULL
+ * ibv_close_device - Return 0, (errno?)
+ * ibv_get_async_event - Return 0, -1 
+ * ibv_alloc_pd - Return ibv_pd, NULL
+ * ibv_dealloc_pd - Return 0, errno 
+ * ibv_reg_mr - Return ibv_mr, NULL
+ * ibv_dereg_mr - Return 0, errno
+ * ibv_create_cq - Return ibv_cq, NULL
+ * ibv_destroy_cq - Return 0, errno
+ * ibv_get_cq_event - Return 0 & ibv_cq/context, int
+ * ibv_poll_cq - Return n & ibv_wc, 0 ok, -1 empty, -2 error 
+ * ibv_req_notify_cq - Return 0 (void?)
+ * ibv_create_qp - Return ibv_qp, NULL
+ * ibv_modify_qp - Return 0, errno
+ * ibv_destroy_qp - Return 0, errno
+ * ibv_post_send - Return 0, -1 & bad_wr
+ * ibv_post_recv - Return 0, -1 & bad_wr 
+ */
+
+/* async handler for DTO, CQ, QP, and unafiliated */
+typedef void (*ib_async_dto_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+typedef void (*ib_async_cq_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_cq_handle_t     ib_cq_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+typedef void (*ib_async_qp_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_qp_handle_t     ib_qp_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+typedef void (*ib_async_handler_t)(
+    IN    ib_hca_handle_t    ib_hca_handle,
+    IN    ib_error_record_t  *err_code,
+    IN    void               *context);
+
+typedef enum
+{
+	IB_THREAD_INIT,
+	IB_THREAD_RUN,
+	IB_THREAD_CANCEL,
+	IB_THREAD_EXIT
+
+} ib_thread_state_t;
+
+/* ib_hca_transport_t, specific to this implementation */
+typedef struct _ib_hca_transport
+{ 
+	union ibv_gid		gid;
+	struct	ibv_device	*ib_dev;
+	ib_cq_handle_t		ib_cq_empty;
+	DAPL_OS_LOCK		cq_lock;	
+	int			max_inline_send;
+	ib_thread_state_t       cq_state;
+	DAPL_OS_THREAD		cq_thread;
+	struct ibv_comp_channel *ib_cq;
+	int			cr_state;
+	DAPL_OS_THREAD		thread;
+	DAPL_OS_LOCK		lock;	
+	struct dapl_llist_entry	*list;	
+	ib_async_handler_t	async_unafiliated;
+	void			*async_un_ctx;
+	ib_async_cq_handler_t	async_cq_error;
+	ib_async_dto_handler_t	async_cq;
+	ib_async_qp_handler_t	async_qp_error;
+	uint16_t		lid;
+	uint8_t			ack_timer;
+	uint8_t			ack_retry;
+	uint8_t			rnr_timer;
+	uint8_t			rnr_retry;
+	uint8_t			global;
+	uint8_t			hop_limit;
+	uint8_t			tclass;
+	uint8_t			mtu;
+	DAT_NAMED_ATTR		named_attr;
+} ib_hca_transport_t;
+
+/* provider specfic fields for shared memory support */
+typedef uint32_t ib_shm_transport_t;
+
+/* prototypes */
+int32_t	dapls_ib_init (void);
+int32_t	dapls_ib_release (void);
+void cr_thread(void *arg);
+int dapli_cq_thread_init(struct dapl_hca *hca_ptr);
+void dapli_cq_thread_destroy(struct dapl_hca *hca_ptr);
+
+
+DAT_RETURN
+dapls_modify_qp_state ( IN ib_qp_handle_t	qp_handle,
+			IN ib_qp_state_t	qp_state,
+			IN struct ib_cm_handle	*cm_ptr );
+
+/* inline functions */
+STATIC _INLINE_ IB_HCA_NAME dapl_ib_convert_name (IN char *name)
+{
+	/* use ascii; name of local device */
+	return dapl_os_strdup(name);
+}
+
+STATIC _INLINE_ void dapl_ib_release_name (IN IB_HCA_NAME name)
+{
+	return;
+}
+
+/*
+ *  Convert errno to DAT_RETURN values
+ */
+STATIC _INLINE_ DAT_RETURN 
+dapl_convert_errno( IN int err, IN const char *str )
+{
+    if (!err)	return DAT_SUCCESS;
+    	
+#if DAPL_DBG
+    if ((err != EAGAIN) && (err != ETIMEDOUT))
+	dapl_dbg_log (DAPL_DBG_TYPE_ERR," %s %s\n", str, strerror(err));
+#endif 
+
+    switch( err )
+    {
+	case EOVERFLOW	: return DAT_LENGTH_ERROR;
+	case EACCES	: return DAT_PRIVILEGES_VIOLATION;
+	case EPERM	: return DAT_PROTECTION_VIOLATION;		  
+	case EINVAL	: return DAT_INVALID_HANDLE;
+    	case EISCONN	: return DAT_INVALID_STATE | DAT_INVALID_STATE_EP_CONNECTED;
+    	case ECONNREFUSED : return DAT_INVALID_STATE | DAT_INVALID_STATE_EP_NOTREADY;
+	case ETIMEDOUT	: return DAT_TIMEOUT_EXPIRED;
+    	case ENETUNREACH: return DAT_INVALID_ADDRESS | DAT_INVALID_ADDRESS_UNREACHABLE;
+    	case EADDRINUSE	: return DAT_CONN_QUAL_IN_USE;
+    	case EALREADY	: return DAT_INVALID_STATE | DAT_INVALID_STATE_EP_ACTCONNPENDING;
+	case ENOMEM	: return DAT_INSUFFICIENT_RESOURCES;
+        case EAGAIN	: return DAT_QUEUE_EMPTY;
+	case EINTR	: return DAT_INTERRUPTED_CALL;
+    	case EAFNOSUPPORT : return DAT_INVALID_ADDRESS | DAT_INVALID_ADDRESS_MALFORMED;
+    	case EFAULT	: 
+	default		: return DAT_INTERNAL_ERROR;
+    }
+ }
+
+/*
+ * Definitions required only for DAT 1.1 builds
+ */
+#define IB_ACCESS_LOCAL_READ    IBV_ACCESS_LOCAL_WRITE
+#define IB_ACCESS_LOCAL_WRITE   IBV_ACCESS_LOCAL_WRITE
+#define IB_ACCESS_REMOTE_READ   IBV_ACCESS_REMOTE_READ
+#define IB_ACCESS_REMOTE_WRITE  IBV_ACCESS_REMOTE_WRITE
+#define IB_ACCESS_MW_BIND       IBV_ACCESS_LOCAL_WRITE
+#define IB_ACCESS_ATOMIC       
+
+#endif /*  _DAPL_IB_UTIL_H_ */
diff --git a/dapl/openib_scm/linux/openib_osd.h b/dapl/openib_scm/linux/openib_osd.h
new file mode 100644
index 0000000..235a82e
--- /dev/null
+++ b/dapl/openib_scm/linux/openib_osd.h
@@ -0,0 +1,21 @@
+#ifndef OPENIB_OSD_H
+#define OPENIB_OSD_H
+
+#include <endian.h>
+#include <netinet/in.h>
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define htonll(x) (x)
+#define ntohll(x) (x)
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define htonll(x)  bswap_64(x)
+#define ntohll(x)  bswap_64(x)
+#endif
+
+#define DAPL_SOCKET int
+#define DAPL_INVALID_SOCKET -1
+#define DAPL_FD_SETSIZE 8192
+
+#define closesocket close
+
+#endif // OPENIB_OSD_H
diff --git a/dapl/udapl/dapl_cno_create.c b/dapl/udapl/dapl_cno_create.c
new file mode 100644
index 0000000..a214c33
--- /dev/null
+++ b/dapl/udapl/dapl_cno_create.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cno_create.c
+ *
+ * PURPOSE: Consumer Notification Object creation
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3.2.1
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_cno_util.h"
+#include "dapl_ia_util.h"
+
+/*
+ * dapl_cno_create
+ *
+ * DAPL Requirements Version xxx, 6.3.4.1
+ *
+ * Create a consumer notification object instance
+ *
+ * Input:
+ *	ia_handle
+ *	wait_agent
+ *	cno_handle
+ *
+ * Output:
+ *	cno_handle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INSUFFICIENT_RESOURCES
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API dapl_cno_create(IN DAT_IA_HANDLE ia_handle,	/* ia_handle */
+				   IN DAT_OS_WAIT_PROXY_AGENT wait_agent,	/* agent */
+				   OUT DAT_CNO_HANDLE * cno_handle)
+{				/* cno_handle */
+	DAPL_IA *ia_ptr;
+	DAPL_CNO *cno_ptr;
+	DAT_RETURN dat_status;
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+	cno_ptr = NULL;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(ia_handle, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	cno_ptr = dapl_cno_alloc(ia_ptr, wait_agent);
+
+	if (!cno_ptr) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	cno_ptr->cno_state = DAPL_CNO_STATE_UNTRIGGERED;
+
+	dapl_ia_link_cno(ia_ptr, cno_ptr);
+
+	*cno_handle = cno_ptr;
+
+      bail:
+	if (dat_status != DAT_SUCCESS && cno_ptr != NULL) {
+		dapl_cno_dealloc(cno_ptr);
+	}
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_cno_free.c b/dapl/udapl/dapl_cno_free.c
new file mode 100644
index 0000000..572fb98
--- /dev/null
+++ b/dapl/udapl/dapl_cno_free.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cno_free.c
+ *
+ * PURPOSE: Consumer Notification Object destruction
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3.2.2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_ia_util.h"
+#include "dapl_cno_util.h"
+
+/*
+ * dapl_cno_free
+ *
+ * DAPL Requirements Version xxx, 6.3.2.2
+ *
+ * Destroy a consumer notification object instance
+ *
+ * Input:
+ *	cno_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_STATE
+ */
+DAT_RETURN DAT_API dapl_cno_free(IN DAT_CNO_HANDLE cno_handle)
+{				/* cno_handle */
+	DAPL_CNO *cno_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+	cno_ptr = (DAPL_CNO *) cno_handle;
+
+	if (DAPL_BAD_HANDLE(cno_handle, DAPL_MAGIC_CNO)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+		goto bail;
+	}
+
+	if (dapl_os_atomic_read(&cno_ptr->cno_ref_count) != 0
+	    || cno_ptr->cno_waiters != 0) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_CNO_IN_USE);
+		goto bail;
+	}
+
+	dapl_ia_unlink_cno(cno_ptr->header.owner_ia, cno_ptr);
+	dapl_cno_dealloc(cno_ptr);
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_cno_modify_agent.c b/dapl/udapl/dapl_cno_modify_agent.c
new file mode 100644
index 0000000..887e984
--- /dev/null
+++ b/dapl/udapl/dapl_cno_modify_agent.c
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cno_modify_agent.c
+ *
+ * PURPOSE: Modify the wait proxy agent associted with the CNO
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3.2.4
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_cno_modify_agent
+ *
+ * DAPL Requirements Version xxx, 6.3.2.4
+ *
+ * Modify the wait proxy agent associted with the CNO
+ *
+ * Input:
+ *	cno_handle
+ *	prx_agent
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API dapl_cno_modify_agent(IN DAT_CNO_HANDLE cno_handle,	/* cno_handle */
+					 IN DAT_OS_WAIT_PROXY_AGENT prx_agent)
+{				/* agent */
+	DAPL_CNO *cno_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+	if (DAPL_BAD_HANDLE(cno_handle, DAPL_MAGIC_CNO)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+		goto bail;
+	}
+
+	cno_ptr = (DAPL_CNO *) cno_handle;
+	dapl_os_lock(&cno_ptr->header.lock);
+	cno_ptr->cno_wait_agent = prx_agent;
+	dapl_os_unlock(&cno_ptr->header.lock);
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_cno_query.c b/dapl/udapl/dapl_cno_query.c
new file mode 100644
index 0000000..5112e33
--- /dev/null
+++ b/dapl/udapl/dapl_cno_query.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cno_query.c
+ *
+ * PURPOSE: Return the consumer parameters of the CNO
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3.2.5
+ *
+ * $Id: dapl_cno_query.c 1301 2005-03-24 05:58:55Z jlentini $
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_cno_query
+ *
+ * DAPL Requirements Version xxx, 6.3.2.5
+ *
+ * Return the consumer parameters of the CNO
+ *
+ * Input:
+ *	cno_handle
+ *	cno_param_mask
+ *	cno_param
+ *
+ * Output:
+ *	cno_param
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API dapl_cno_query(IN DAT_CNO_HANDLE cno_handle,	/* cno_handle */
+				  IN DAT_CNO_PARAM_MASK cno_param_mask,	/* cno_param_mask */
+				  OUT DAT_CNO_PARAM * cno_param)
+
+{				/* cno_param */
+	DAPL_CNO *cno_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(cno_handle, DAPL_MAGIC_CNO)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+		goto bail;
+	}
+
+	if (NULL == cno_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	cno_ptr = (DAPL_CNO *) cno_handle;
+	cno_param->ia_handle = cno_ptr->header.owner_ia;
+	cno_param->proxy_type = DAT_PROXY_TYPE_AGENT;
+	cno_param->proxy.agent = cno_ptr->cno_wait_agent;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_cno_wait.c b/dapl/udapl/dapl_cno_wait.c
new file mode 100644
index 0000000..e89317d
--- /dev/null
+++ b/dapl/udapl/dapl_cno_wait.c
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_cno_wait.c
+ *
+ * PURPOSE: Wait for a consumer notification event
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3.2.3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_cno_wait
+ *
+ * DAPL Requirements Version xxx, 6.3.2.3
+ *
+ * Wait for a consumer notification event
+ *
+ * Input:
+ *	cno_handle
+ *	timeout
+ *	evd_handle
+ *
+ * Output:
+ *	evd_handle
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ *	DAT_QUEUE_EMPTY
+ *	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API dapl_cno_wait(IN DAT_CNO_HANDLE cno_handle,	/* cno_handle */
+				 IN DAT_TIMEOUT timeout,	/* agent */
+				 OUT DAT_EVD_HANDLE * evd_handle)
+{				/* ia_handle */
+	DAPL_CNO *cno_ptr;
+	DAT_RETURN dat_status;
+
+	if (DAPL_BAD_HANDLE(cno_handle, DAPL_MAGIC_CNO)) {
+		dat_status = DAT_INVALID_HANDLE | DAT_INVALID_HANDLE_CNO;
+		goto bail;
+	}
+
+	dat_status = DAT_SUCCESS;
+
+	cno_ptr = (DAPL_CNO *) cno_handle;
+
+	if (cno_ptr->cno_state == DAPL_CNO_STATE_DEAD) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_CNO_DEAD);
+		goto bail;
+	}
+
+	dapl_os_lock(&cno_ptr->header.lock);
+	while (cno_ptr->cno_state == DAPL_CNO_STATE_UNTRIGGERED
+	       && DAT_GET_TYPE(dat_status) != DAT_TIMEOUT_EXPIRED) {
+		cno_ptr->cno_waiters++;
+		dapl_os_unlock(&cno_ptr->header.lock);
+		dat_status = dapl_os_wait_object_wait(&cno_ptr->cno_wait_object,
+						      timeout);
+		dapl_os_lock(&cno_ptr->header.lock);
+		cno_ptr->cno_waiters--;
+	}
+
+	if (cno_ptr->cno_state == DAPL_CNO_STATE_DEAD) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_CNO_DEAD);
+	} else if (dat_status == DAT_SUCCESS) {
+		/*
+		 * After the first triggering, this will be a valid handle.
+		 * If we're racing with wakeups of other CNO waiters,
+		 * that's ok.
+		 */
+		dapl_os_assert(cno_ptr->cno_state == DAPL_CNO_STATE_TRIGGERED);
+		cno_ptr->cno_state = DAPL_CNO_STATE_UNTRIGGERED;
+		*evd_handle = cno_ptr->cno_evd_triggered;
+	} else if (DAT_GET_TYPE(dat_status) == DAT_TIMEOUT_EXPIRED) {
+		cno_ptr->cno_state = DAPL_CNO_STATE_UNTRIGGERED;
+		*evd_handle = NULL;
+		dat_status = DAT_QUEUE_EMPTY;
+	} else {
+		/*
+		 * The only other reason we could have made it out of
+		 * the loop is an interrupted system call.
+		 */
+		dapl_os_assert(DAT_GET_TYPE(dat_status) ==
+			       DAT_INTERRUPTED_CALL);
+	}
+	dapl_os_unlock(&cno_ptr->header.lock);
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_evd_clear_unwaitable.c b/dapl/udapl/dapl_evd_clear_unwaitable.c
new file mode 100644
index 0000000..ab24c04
--- /dev/null
+++ b/dapl/udapl/dapl_evd_clear_unwaitable.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_clear_unwaitable.c
+ *
+ * PURPOSE: EVENT management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3.4.8
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_evd_clear_unwaitable
+ *
+ * DAPL Requirements Version 1.1, 6.3.4.8
+ *
+ * Transition the Event Dispatcher into a waitable state
+ *
+ * Input:
+ * 	evd_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ */
+DAT_RETURN DAT_API dapl_evd_clear_unwaitable(IN DAT_EVD_HANDLE evd_handle)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD))
+	{
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	dapl_os_lock(&evd_ptr->header.lock);
+	evd_ptr->evd_waitable = DAT_TRUE;
+	dapl_os_unlock(&evd_ptr->header.lock);
+
+	dat_status = DAT_SUCCESS;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_evd_create.c b/dapl/udapl/dapl_evd_create.c
new file mode 100644
index 0000000..548c2ae
--- /dev/null
+++ b/dapl/udapl/dapl_evd_create.c
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_create.c
+ *
+ * PURPOSE: EVENT management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ * 		the uDAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+
+/*
+ * dapl_evd_create
+ *
+ * DAPL Requirements Version xxx, 6.3.2.1
+ *
+ * Create and instance of Event Dispatcher.
+ *
+ * Input:
+ *    ia_handle
+ *    cno_handle
+ *    evd_min_qlen
+ *    evd_flags
+ *
+ * Output:
+ *    evd_handle
+ *
+ * Returns:
+ *     DAT_SUCCESS
+ *     DAT_INSUFFICIENT_RESOURCES
+ *     DAT_INVALID_PARAMETER
+ */
+
+/* ** REVISIT **
+ *
+ * Selecting the cqe handing domain must still be done.
+ * We *probably* want one per hca, but we could have one
+ * per provider or one per consumer.
+ */
+/* Note that if there already is a cq, it is not deleted
+ * even if it is not required. However, it will not be armed.
+ */
+
+DAT_RETURN DAT_API dapl_evd_create(IN DAT_IA_HANDLE ia_handle,
+				   IN DAT_COUNT evd_min_qlen,
+				   IN DAT_CNO_HANDLE cno_handle,
+				   IN DAT_EVD_FLAGS evd_flags,
+				   OUT DAT_EVD_HANDLE * evd_handle)
+{
+	DAPL_IA *ia_ptr;
+	DAPL_EVD *evd_ptr;
+	DAPL_CNO *cno_ptr;
+	DAT_RETURN dat_status;
+	DAT_PROVIDER_ATTR provider_attr;
+	int i;
+	int j;
+	int flag_mask[6];
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_evd_create (%p, %d, %p, 0x%x, %p)\n",
+		     ia_handle,
+		     evd_min_qlen, cno_handle, evd_flags, evd_handle);
+
+	ia_ptr = (DAPL_IA *) ia_handle;
+	cno_ptr = (DAPL_CNO *) cno_handle;
+	evd_ptr = NULL;
+	*evd_handle = NULL;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(ia_handle, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+
+	DAPL_CNTR(ia_ptr, DCNT_IA_EVD_CREATE);
+
+	if (evd_min_qlen <= 0) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+	if (evd_min_qlen > ia_ptr->hca_ptr->ia_attr.max_evd_qlen) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_TEVD);
+		goto bail;
+	}
+
+	if (cno_handle != DAT_HANDLE_NULL
+	    && DAPL_BAD_HANDLE(cno_handle, DAPL_MAGIC_CNO)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+		goto bail;
+	}
+
+	/*
+	 * Check the merging attributes to ensure the combination of
+	 * flags requested is supported.
+	 */
+	dapl_ia_query(ia_handle, NULL,
+		      0, NULL, DAT_PROVIDER_FIELD_ALL, &provider_attr);
+
+	/* Set up an array of flags to compare against; the EVD bits are
+	 * a sparse array that need to be mapped to the merging flags
+	 */
+	flag_mask[0] = DAT_EVD_SOFTWARE_FLAG;
+	flag_mask[1] = DAT_EVD_CR_FLAG;
+	flag_mask[2] = DAT_EVD_DTO_FLAG;
+	flag_mask[3] = DAT_EVD_CONNECTION_FLAG;
+	flag_mask[4] = DAT_EVD_RMR_BIND_FLAG;
+	flag_mask[5] = DAT_EVD_ASYNC_FLAG;
+
+	for (i = 0; i < 6; i++) {
+		if (flag_mask[i] & evd_flags) {
+			for (j = 0; j < 6; j++) {
+				if (flag_mask[j] & evd_flags) {
+					if (provider_attr.
+					    evd_stream_merging_supported[i][j]
+					    == DAT_FALSE) {
+						dat_status =
+						    DAT_ERROR
+						    (DAT_INVALID_PARAMETER,
+						     DAT_INVALID_ARG4);
+						goto bail;
+					}
+				}
+			}	/* end for j */
+		}
+	}			/* end for i */
+
+	dat_status = dapls_evd_internal_create(ia_ptr,
+					       cno_ptr,
+					       evd_min_qlen,
+					       evd_flags, &evd_ptr);
+	if (dat_status != DAT_SUCCESS) {
+		goto bail;
+	}
+
+	evd_ptr->evd_state = DAPL_EVD_STATE_OPEN;
+
+	*evd_handle = (DAT_EVD_HANDLE) evd_ptr;
+
+      bail:
+	if (dat_status != DAT_SUCCESS) {
+		if (evd_ptr) {
+			dapl_evd_free(evd_ptr);
+		}
+	}
+
+	dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+		     "dapl_evd_create () returns 0x%x\n", dat_status);
+
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_evd_disable.c b/dapl/udapl/dapl_evd_disable.c
new file mode 100644
index 0000000..78f1b0e
--- /dev/null
+++ b/dapl/udapl/dapl_evd_disable.c
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_disable.c
+ *
+ * PURPOSE: EVENT management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ *              the uDAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_evd_disable
+ *
+ * DAPL Requirements Version xxx, 6.3.2.5
+ *
+ * Modify the size of the event queue of an Event Dispatcher
+ *
+ * Input:
+ * 	evd_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ */
+
+DAT_RETURN DAT_API dapl_evd_disable(IN DAT_EVD_HANDLE evd_handle)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD))
+	{
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+
+	evd_ptr->evd_enabled = DAT_FALSE;
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_evd_enable.c b/dapl/udapl/dapl_evd_enable.c
new file mode 100644
index 0000000..b5991c7
--- /dev/null
+++ b/dapl/udapl/dapl_evd_enable.c
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_enable.c
+ *
+ * PURPOSE: EVENT management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ *              the uDAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_evd_enable
+ *
+ * DAPL Requirements Version xxx, 6.3.2.5
+ *
+ * Modify the size of the event queue of an Event Dispatcher
+ *
+ * Input:
+ * 	evd_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_HANDLE
+ */
+
+DAT_RETURN DAT_API dapl_evd_enable(IN DAT_EVD_HANDLE evd_handle)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD))
+	{
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+
+	evd_ptr->evd_enabled = DAT_TRUE;
+
+	/* We need to enable the callback handler if there is a CNO.  */
+	if (evd_ptr->cno_ptr != NULL &&
+	    evd_ptr->ib_cq_handle != IB_INVALID_HANDLE) {
+		dat_status =
+		    dapls_ib_completion_notify(evd_ptr->header.owner_ia->
+					       hca_ptr->ib_hca_handle, evd_ptr,
+					       IB_NOTIFY_ON_NEXT_COMP);
+
+		/* FIXME report error */
+		dapl_os_assert(dat_status == DAT_SUCCESS);
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_evd_modify_cno.c b/dapl/udapl/dapl_evd_modify_cno.c
new file mode 100644
index 0000000..955a835
--- /dev/null
+++ b/dapl/udapl/dapl_evd_modify_cno.c
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dapl_evd_modify_cno.c
+ *
+ * PURPOSE: Event Management
+ *
+ * Description: Interfaces in this file are completely described in
+ * 		the DAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_evd_modify_cno
+ *
+ * DAPL Requirements Version xxx, 6.3.2.4
+ *
+ * Modify the CNO associated with the EVD
+ *
+ * Input:
+ * 	evd_handle
+ * 	cno_handle
+ *
+ * Output:
+ * 	none
+ *
+ * Returns:
+ * 	DAT_SUCCSSS
+ * 	DAT_INVALID_HANDLE
+ */
+
+DAT_RETURN DAT_API dapl_evd_modify_cno(IN DAT_EVD_HANDLE evd_handle,
+				       IN DAT_CNO_HANDLE cno_handle)
+
+{
+	DAPL_EVD *evd_ptr;
+	DAPL_CNO *cno_ptr;
+	DAPL_CNO *old_cno_ptr;
+	DAT_RETURN dat_status;
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	cno_ptr = (DAPL_CNO *) cno_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	if (cno_handle != NULL && DAPL_BAD_HANDLE(cno_handle, DAPL_MAGIC_CNO)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+		goto bail;
+	}
+	dapl_os_lock(&evd_ptr->header.lock);
+	old_cno_ptr = evd_ptr->cno_ptr;
+	evd_ptr->cno_ptr = cno_ptr;
+	dapl_os_unlock(&evd_ptr->header.lock);
+	if (cno_ptr) {
+		dapl_os_atomic_inc(&(cno_ptr->cno_ref_count));
+	}
+	if (old_cno_ptr) {
+		dapl_os_atomic_dec(&(old_cno_ptr->cno_ref_count));
+	}
+
+	/* We need to enable the callback handler if the EVD is enabled.  */
+	if (evd_ptr->evd_enabled &&
+	    cno_handle != DAT_HANDLE_NULL &&
+	    evd_ptr->ib_cq_handle != IB_INVALID_HANDLE) {
+		dat_status =
+		    dapls_ib_completion_notify(evd_ptr->header.owner_ia->
+					       hca_ptr->ib_hca_handle, evd_ptr,
+					       IB_NOTIFY_ON_NEXT_COMP);
+
+		/* FIXME report error */
+		dapl_os_assert(dat_status == DAT_SUCCESS);
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_evd_query.c b/dapl/udapl/dapl_evd_query.c
new file mode 100644
index 0000000..09abcad
--- /dev/null
+++ b/dapl/udapl/dapl_evd_query.c
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_query.c
+ *
+ * PURPOSE: Event management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+
+/*
+ * dapl_evd_query
+ *
+ * DAPL Requirements Version xxx, 6.3.2.3
+ *
+ * Provides the consumer with arguments of the Event Dispatcher.
+ *
+ * Input:
+ * 	evd_handle
+ * 	evd_mask
+ *
+ * Output:
+ * 	evd_param
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ */
+DAT_RETURN DAT_API
+dapl_evd_query(IN DAT_EVD_HANDLE evd_handle,
+	       IN DAT_EVD_PARAM_MASK evd_param_mask,
+	       OUT DAT_EVD_PARAM * evd_param)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	if (NULL == evd_param) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+
+	/* Note: the spec. allows for events to be directed to a NULL EVD */
+	/* with handle of type DAT_HANDLE_NULL. See 6.3.1                 */
+	if (DAT_HANDLE_NULL == evd_handle) {
+		dapl_os_memzero(evd_param, sizeof(DAT_EVD_PARAM));
+	} else {
+		if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD)) {
+			dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+			goto bail;
+		}
+
+		evd_ptr = (DAPL_EVD *) evd_handle;
+
+		/*
+		 * We may be racing against the thread safe modify
+		 * calls here (dat_evd_{enable,disable,{set,clear}_unwaitable}).
+		 * They are thread safe, so our reads need to be atomic with
+		 * regard to those calls.  The below is ok (a single bit
+		 * read counts as atomic; if it's in transition you'll get one
+		 * of the correct values) but we'll need to be careful
+		 * about reading the state variable atomically when we add
+		 * in waitable/unwaitable.
+		 */
+		evd_param->evd_state =
+		    (evd_ptr->
+		     evd_enabled ? DAT_EVD_STATE_ENABLED :
+		     DAT_EVD_STATE_DISABLED);
+		evd_param->evd_state |=
+		    (evd_ptr->
+		     evd_waitable ? DAT_EVD_STATE_WAITABLE :
+		     DAT_EVD_STATE_UNWAITABLE);
+		evd_param->ia_handle = evd_ptr->header.owner_ia;
+		evd_param->evd_qlen = evd_ptr->qlen;
+		evd_param->cno_handle = (DAT_CNO_HANDLE) evd_ptr->cno_ptr;
+		evd_param->evd_flags = evd_ptr->evd_flags;
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_evd_set_unwaitable.c b/dapl/udapl/dapl_evd_set_unwaitable.c
new file mode 100644
index 0000000..bf41662
--- /dev/null
+++ b/dapl/udapl/dapl_evd_set_unwaitable.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_set_unwaitable.c
+ *
+ * PURPOSE: EVENT management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 3.4.7
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_evd_set_unwaitable
+ *
+ * DAPL Requirements Version 1.1, 6.3.4.7
+ *
+ * Transition the Event Dispatcher into an unwaitable state
+ *
+ * Input:
+ * 	evd_handle
+ *
+ * Output:
+ *	none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INVALID_HANDLE
+ */
+DAT_RETURN DAT_API dapl_evd_set_unwaitable(IN DAT_EVD_HANDLE evd_handle)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_handle, DAPL_MAGIC_EVD))
+	{
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	dapl_os_lock(&evd_ptr->header.lock);
+	evd_ptr->evd_waitable = DAT_FALSE;
+	dapl_os_unlock(&evd_ptr->header.lock);
+
+	/*
+	 * If this evd is waiting, wake it up. There is an obvious race
+	 * condition here where we may wakeup the waiter before it goes to
+	 * sleep; but the wait_object allows this and will do the right
+	 * thing.
+	 */
+	if (evd_ptr->evd_state == DAPL_EVD_STATE_WAITED) {
+#ifdef CQ_WAIT_OBJECT
+		if (evd_ptr->cq_wait_obj_handle)
+			dapls_ib_wait_object_wakeup(evd_ptr->
+						    cq_wait_obj_handle);
+		else
+#endif
+			dapl_os_wait_object_wakeup(&evd_ptr->wait_object);
+	}
+      bail:
+	return dat_status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/udapl/dapl_evd_wait.c b/dapl/udapl/dapl_evd_wait.c
new file mode 100644
index 0000000..8d82d63
--- /dev/null
+++ b/dapl/udapl/dapl_evd_wait.c
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_evd_wait.c
+ *
+ * PURPOSE: EVENT management
+ *
+ * Description: Interfaces in this file are completely defined in 
+ *              the uDAPL 1.1 API specification
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include "dapl_evd_util.h"
+#include "dapl_ring_buffer_util.h"
+#include "dapl_adapter_util.h"
+
+/*
+ * dapl_evd_wait
+ *
+ * UDAPL Requirements Version xxx, 
+ *
+ * Wait, up to specified timeout, for notification event on EVD.
+ * Then return first available event.
+ *
+ * Input:
+ * 	evd_handle
+ * 	timeout
+ *
+ * Output:
+ * 	event
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_STATE
+ */
+
+DAT_RETURN DAT_API dapl_evd_wait(IN DAT_EVD_HANDLE evd_handle,
+				 IN DAT_TIMEOUT time_out,
+				 IN DAT_COUNT threshold,
+				 OUT DAT_EVENT * event, OUT DAT_COUNT * nmore)
+{
+	DAPL_EVD *evd_ptr;
+	DAT_RETURN dat_status;
+	DAT_EVENT *local_event;
+	DAT_BOOLEAN notify_requested = DAT_FALSE;
+	DAT_BOOLEAN waitable;
+	DAPL_EVD_STATE evd_state;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_evd_wait (%p, %d, %d, %p, %p)\n",
+		     evd_handle, time_out, threshold, event, nmore);
+
+	evd_ptr = (DAPL_EVD *) evd_handle;
+	dat_status = DAT_SUCCESS;
+
+	if (DAPL_BAD_HANDLE(evd_ptr, DAPL_MAGIC_EVD)) {
+		/*
+		 * We return directly rather than bailing because
+		 * bailing attempts to update the evd, and we don't have
+		 * one.
+		 */
+		dat_status = DAT_ERROR(DAT_INVALID_HANDLE, 0);
+		goto bail;
+	}
+	if (!event) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
+		goto bail;
+	}
+	if (!nmore) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG5);
+		goto bail;
+	}
+	if (threshold <= 0 ||
+	    (threshold > 1
+	     && evd_ptr->completion_type != DAPL_EVD_STATE_THRESHOLD)
+	    || threshold > evd_ptr->qlen) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+		goto bail;
+	}
+	if (evd_ptr->catastrophic_overflow) {
+		dat_status = DAT_ERROR(DAT_INVALID_STATE, 0);
+		goto bail;
+	}
+	DAPL_CNTR(evd_ptr, DCNT_EVD_WAIT);
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EVD,
+		     "dapl_evd_wait: EVD %p, CQ %p\n",
+		     evd_ptr, (void *)evd_ptr->ib_cq_handle);
+
+	/*
+	 * Make sure there are no other waiters and the evd is active.
+	 * Currently this means only the OPEN state is allowed.
+	 * Do this atomically.  We need to take a lock to synchronize
+	 * with dapl_evd_dequeue(), but the atomic transition allows
+	 * non-locking synchronization with dapl_evd_query() and
+	 * dapl_evd_{query,enable,disable,{set,clear}_unwaitable}.
+	 */
+
+	dapl_os_lock(&evd_ptr->header.lock);
+	waitable = evd_ptr->evd_waitable;
+
+	dapl_os_assert(sizeof(DAT_COUNT) == sizeof(DAPL_EVD_STATE));
+	evd_state = evd_ptr->evd_state;
+	if (evd_ptr->evd_state == DAPL_EVD_STATE_OPEN)
+		evd_ptr->evd_state = DAPL_EVD_STATE_WAITED;
+
+	if (evd_state != DAPL_EVD_STATE_OPEN) {
+		/* Bogus state, bail out */
+		dat_status = DAT_ERROR(DAT_INVALID_STATE, 0);
+		goto bail;
+	}
+
+	if (!waitable) {
+		/* This EVD is not waitable, reset the state and bail */
+		if (evd_ptr->evd_state == DAPL_EVD_STATE_WAITED)
+			evd_ptr->evd_state = evd_state;
+
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE,
+			      DAT_INVALID_STATE_EVD_UNWAITABLE);
+		goto bail;
+	}
+
+	/*
+	 * We now own the EVD, even though we don't have the lock anymore,
+	 * because we're in the WAITED state.
+	 */
+
+	evd_ptr->threshold = threshold;
+
+	for (;;) {
+		/*
+		 * Ideally we'd just check the number of entries on the CQ, but
+		 * we don't have a way to do that.  Because we have to set *nmore
+		 * at some point in this routine, we'll need to do this copy
+		 * sometime even if threshold == 1.
+		 *
+		 * For connection evd or async evd, the function checks and
+		 * return right away if the ib_cq_handle associate with these evd
+		 * equal to IB_INVALID_HANDLE
+		 */
+		dapl_os_unlock(&evd_ptr->header.lock);
+		dapls_evd_copy_cq(evd_ptr);
+		dapl_os_lock(&evd_ptr->header.lock);
+
+		if (dapls_rbuf_count(&evd_ptr->pending_event_queue) >=
+		    threshold) {
+			break;
+		}
+
+		/*
+		 * Do not enable the completion notification if this evd is not 
+		 * a DTO_EVD or RMR_BIND_EVD
+		 */
+		if ((!notify_requested) &&
+		    ((evd_ptr->evd_flags & DAT_EVD_DTO_FLAG) ||
+		     (evd_ptr->evd_flags & DAT_EVD_RMR_BIND_FLAG))) {
+			dat_status =
+			    dapls_ib_completion_notify(evd_ptr->header.
+						       owner_ia->hca_ptr->
+						       ib_hca_handle, evd_ptr,
+						       (evd_ptr->
+							completion_type ==
+							DAPL_EVD_STATE_SOLICITED_WAIT)
+						       ? IB_NOTIFY_ON_SOLIC_COMP
+						       :
+						       IB_NOTIFY_ON_NEXT_COMP);
+
+			DAPL_CNTR(evd_ptr, DCNT_EVD_WAIT_NOTIFY);
+			/* FIXME report error */
+			dapl_os_assert(dat_status == DAT_SUCCESS);
+
+			notify_requested = DAT_TRUE;
+
+			/* Try again.  */
+			continue;
+		}
+
+		/*
+		 * Unused by poster; it has no way to tell how many
+		 * items are on the queue without copying them over to the
+		 * EVD queue, and we're the only ones allowed to dequeue
+		 * from the CQ for synchronization/locking reasons.
+		 */
+		evd_ptr->threshold = threshold;
+
+		DAPL_CNTR(evd_ptr, DCNT_EVD_WAIT_BLOCKED);
+		dapl_os_unlock(&evd_ptr->header.lock);
+
+#ifdef CQ_WAIT_OBJECT
+		if (evd_ptr->cq_wait_obj_handle)
+			dat_status =
+			    dapls_ib_wait_object_wait(evd_ptr->
+						      cq_wait_obj_handle,
+						      time_out);
+		else
+#endif
+			dat_status =
+			    dapl_os_wait_object_wait(&evd_ptr->wait_object,
+						     time_out);
+
+		dapl_os_lock(&evd_ptr->header.lock);
+
+		/*
+		 * FIXME: if the thread loops around and waits again
+		 * the time_out value needs to be updated.
+		 */
+
+		notify_requested = DAT_FALSE;	/* We've used it up.  */
+
+		/* See if we were awakened by evd_set_unwaitable */
+		if (!evd_ptr->evd_waitable) {
+			dat_status = DAT_ERROR(DAT_INVALID_STATE, 0);
+		}
+
+		if (dat_status != DAT_SUCCESS) {
+			/*
+			 * If the status is DAT_TIMEOUT, we'll break out of the
+			 * loop, *not* dequeue an event (because dat_status
+			 * != DAT_SUCCESS), set *nmore (as we should for timeout)
+			 * and return DAT_TIMEOUT.
+			 */
+			break;
+		}
+	}
+
+	evd_ptr->evd_state = DAPL_EVD_STATE_OPEN;
+
+	if (dat_status == DAT_SUCCESS) {
+		local_event = dapls_rbuf_remove(&evd_ptr->pending_event_queue);
+		*event = *local_event;
+		dapls_rbuf_add(&evd_ptr->free_event_queue, local_event);
+	}
+
+	/*
+	 * Valid if dat_status == DAT_SUCCESS || dat_status == DAT_TIMEOUT
+	 * Undefined otherwise, so ok to set it.
+	 */
+	*nmore = dapls_rbuf_count(&evd_ptr->pending_event_queue);
+
+      bail:
+	dapl_os_unlock(&evd_ptr->header.lock);
+	if (dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_RTN,
+			     "dapl_evd_wait () returns 0x%x\n", dat_status);
+	}
+	return dat_status;
+}
diff --git a/dapl/udapl/dapl_init.c b/dapl/udapl/dapl_init.c
new file mode 100644
index 0000000..e0af8f7
--- /dev/null
+++ b/dapl/udapl/dapl_init.c
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_init.c
+ *
+ * PURPOSE: Interface Adapter management
+ * Description: Interfaces in this file are completely described in
+ *		the DAPL 1.1 API, Chapter 6, section 2
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl.h"
+#include <dat2/dat_registry.h>	/* Provider API function prototypes */
+#include "dapl_hca_util.h"
+#include "dapl_init.h"
+#include "dapl_provider.h"
+#include "dapl_mr_util.h"
+#include "dapl_osd.h"
+#include "dapl_adapter_util.h"
+#include "dapl_name_service.h"
+#include "dapl_timer_util.h"
+#include "dapl_vendor.h"
+
+/*
+ * dapl_init
+ *
+ * initialize this provider
+ * includes initialization of all global variables
+ * as well as registering all supported IAs with the dat registry
+ *
+ * This function needs to be called once when the provider is loaded.
+ *
+ * Input:
+ *	none
+ *
+ * Output:
+ *	none
+ *
+ * Return Values:
+ */
+void dapl_init(void)
+{
+	DAT_RETURN dat_status;
+
+	/* set up debug type */
+	g_dapl_dbg_type = dapl_os_get_env_val("DAPL_DBG_TYPE",
+					      DAPL_DBG_TYPE_ERR);
+	/* set up debug destination */
+	g_dapl_dbg_dest = dapl_os_get_env_val("DAPL_DBG_DEST",
+					      DAPL_DBG_DEST_STDOUT);
+
+	/* open log file on first logging call if necessary */
+	if (g_dapl_dbg_dest & DAPL_DBG_DEST_SYSLOG)
+		openlog("libdapl", LOG_ODELAY | LOG_PID | LOG_CONS, LOG_USER);
+
+	dapl_log(DAPL_DBG_TYPE_UTIL, "dapl_init: dbg_type=0x%x,dbg_dest=0x%x\n",
+		 g_dapl_dbg_type, g_dapl_dbg_dest);
+
+	/* See if the user is on a loopback setup */
+	g_dapl_loopback_connection = dapl_os_get_env_bool("DAPL_LOOPBACK");
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, "DAPL: %s Setting Loopback\n",
+		     g_dapl_loopback_connection ? "" : "NOT");
+
+	/* initialize verbs library */
+	dapls_ib_init();
+
+	/* initialize the timer */
+	dapls_timer_init();
+
+	/* Set up name services */
+	dat_status = dapls_ns_init();
+	if (DAT_SUCCESS != dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dapls_ns_init failed %d\n", dat_status);
+		goto bail;
+	}
+
+	/* initialize the provider list */
+	dat_status = dapl_provider_list_create();
+
+	if (DAT_SUCCESS != dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dapl_provider_list_create failed %d\n",
+			     dat_status);
+		goto bail;
+	}
+
+	return;
+
+      bail:
+	dapl_dbg_log(DAPL_DBG_TYPE_ERR, "ERROR: dapl_init failed\n");
+	return;
+}
+
+/*
+ * dapl_fini
+ *
+ * finalize this provider
+ * includes freeing of all global variables
+ * as well as deregistering all supported IAs from the dat registry
+ *
+ * This function needs to be called once when the provider is loaded.
+ *
+ * Input:
+ *	none
+ *
+ * Output:
+ *	none
+ *
+ * Return Values:
+ */
+void dapl_fini(void)
+{
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, "DAPL: ENTER (dapl_fini)\n");
+
+	dat_status = dapl_provider_list_destroy();
+	if (DAT_SUCCESS != dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dapl_provider_list_destroy failed %d\n",
+			     dat_status);
+	}
+
+	dapls_ib_release();
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, "DAPL: Exit (dapl_fini)\n");
+
+	if (g_dapl_dbg_dest & DAPL_DBG_DEST_SYSLOG)
+		closelog();
+
+	return;
+}
+
+/*
+ *
+ * This function is called by the registry to initialize a provider
+ *
+ * The instance data string is expected to have the following form:
+ *
+ * <hca name> <port number>
+ *
+ */
+void DAT_API
+DAT_PROVIDER_INIT_FUNC_NAME(IN const DAT_PROVIDER_INFO * provider_info,
+			    IN const char *instance_data)
+{
+	DAT_PROVIDER *provider;
+	DAPL_HCA *hca_ptr;
+	DAT_RETURN dat_status;
+	char *data;
+	char *name;
+	char *port;
+	unsigned int len;
+	unsigned int i;
+
+	data = NULL;
+	provider = NULL;
+	hca_ptr = NULL;
+
+#if defined(_WIN32) || defined(_WIN64)
+	/* initialize DAPL library here as when called from DLL context in DLLmain()
+	 * the IB (ibal) call hangs.
+	 */
+	dapl_init();
+#endif
+
+	dat_status =
+	    dapl_provider_list_insert(provider_info->ia_name, &provider);
+	if (DAT_SUCCESS != dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dat_provider_list_insert failed: %x\n",
+			     dat_status);
+		goto bail;
+	}
+
+	data = dapl_os_strdup(instance_data);
+	if (NULL == data) {
+		goto bail;
+	}
+
+	len = dapl_os_strlen(data);
+
+	for (i = 0; i < len; i++) {
+		if (' ' == data[i]) {
+			data[i] = '\0';
+			break;
+		}
+	}
+
+	/* if the instance data did not have a valid format */
+	if (i == len) {
+		goto bail;
+	}
+
+	name = data;
+	port = data + (i + 1);
+
+	hca_ptr = dapl_hca_alloc(name, port);
+	if (NULL == hca_ptr) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "%s() dapl_hca_alloc failed?\n");
+		goto bail;
+	}
+
+	provider->extension = hca_ptr;
+	dat_status = dat_registry_add_provider(provider, provider_info);
+	if (DAT_SUCCESS != dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dat_registry_add_provider failed: %x\n",
+			     dat_status);
+	}
+
+      bail:
+	if (NULL != data) {
+		dapl_os_free(data, len + 1);
+	}
+
+	if (DAT_SUCCESS != dat_status) {
+		if (NULL != provider) {
+			(void)dapl_provider_list_remove(provider_info->ia_name);
+		}
+
+		if (NULL != hca_ptr) {
+			dapl_hca_free(hca_ptr);
+		}
+	}
+}
+
+/*
+ *
+ * This function is called by the registry to de-initialize a provider
+ *
+ */
+void DAT_API
+DAT_PROVIDER_FINI_FUNC_NAME(IN const DAT_PROVIDER_INFO * provider_info)
+{
+	DAT_PROVIDER *provider;
+	DAT_RETURN dat_status;
+
+	dat_status =
+	    dapl_provider_list_search(provider_info->ia_name, &provider);
+	if (DAT_SUCCESS != dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dat_registry_add_provider failed: %x\n",
+			     dat_status);
+		return;
+	}
+
+	dat_status = dat_registry_remove_provider(provider, provider_info);
+	if (DAT_SUCCESS != dat_status) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     "dat_registry_add_provider failed: %x\n",
+			     dat_status);
+	}
+
+	/*
+	 * free HCA memory
+	 */
+	dapl_hca_free(provider->extension);
+
+	(void)dapl_provider_list_remove(provider_info->ia_name);
+
+#if defined(_WIN32) || defined(_WIN64)
+	/* cleanup DAPL library - relocated here from OSD DLL context as the IBAL
+	 * calls hung in the DLL context?
+	 */
+	dapl_fini();
+#endif
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/udapl/dapl_lmr_create.c b/dapl/udapl/dapl_lmr_create.c
new file mode 100644
index 0000000..849f4fe
--- /dev/null
+++ b/dapl/udapl/dapl_lmr_create.c
@@ -0,0 +1,506 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_lmr_create.c
+ *
+ * PURPOSE: Memory management
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_lmr_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_vendor.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+STATIC _INLINE_ DAT_RETURN
+dapli_lmr_create_virtual(IN DAPL_IA * ia,
+			 IN DAT_PVOID virt_addr,
+			 IN DAT_VLEN length,
+			 IN DAPL_PZ * pz,
+			 IN DAT_MEM_PRIV_FLAGS privileges,
+			 IN DAT_VA_TYPE va_type,
+			 OUT DAT_LMR_HANDLE * lmr_handle,
+			 OUT DAT_LMR_CONTEXT * lmr_context,
+			 OUT DAT_RMR_CONTEXT * rmr_context,
+			 OUT DAT_VLEN * registered_length,
+			 OUT DAT_VADDR * registered_address);
+
+STATIC _INLINE_ DAT_RETURN
+dapli_lmr_create_lmr(IN DAPL_IA * ia,
+		     IN DAPL_LMR * original_lmr,
+		     IN DAPL_PZ * pz,
+		     IN DAT_MEM_PRIV_FLAGS privileges,
+		     IN DAT_VA_TYPE va_type,
+		     OUT DAT_LMR_HANDLE * lmr_handle,
+		     OUT DAT_LMR_CONTEXT * lmr_context,
+		     OUT DAT_RMR_CONTEXT * rmr_context,
+		     OUT DAT_VLEN * registered_length,
+		     OUT DAT_VADDR * registered_address);
+
+STATIC _INLINE_ DAT_RETURN
+dapli_lmr_create_shared(IN DAPL_IA * ia,
+			IN DAT_REGION_DESCRIPTION reg_desc,
+			IN DAT_VLEN length,
+			IN DAPL_PZ * pz,
+			IN DAT_MEM_PRIV_FLAGS privileges,
+			IN DAT_VA_TYPE va_type,
+			OUT DAT_LMR_HANDLE * lmr_handle,
+			OUT DAT_LMR_CONTEXT * lmr_context,
+			OUT DAT_RMR_CONTEXT * rmr_context,
+			OUT DAT_VLEN * registered_length,
+			OUT DAT_VADDR * registered_address);
+
+/*********************************************************************
+ *                                                                   *
+ * Function Definitions                                              *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_RETURN
+dapli_lmr_create_virtual(IN DAPL_IA * ia,
+			 IN DAT_PVOID virt_addr,
+			 IN DAT_VLEN length,
+			 IN DAPL_PZ * pz,
+			 IN DAT_MEM_PRIV_FLAGS privileges,
+			 IN DAT_VA_TYPE va_type,
+			 OUT DAT_LMR_HANDLE * lmr_handle,
+			 OUT DAT_LMR_CONTEXT * lmr_context,
+			 OUT DAT_RMR_CONTEXT * rmr_context,
+			 OUT DAT_VLEN * registered_length,
+			 OUT DAT_VADDR * registered_address)
+{
+	DAPL_LMR *lmr;
+	DAT_REGION_DESCRIPTION reg_desc;
+	DAT_RETURN dat_status;
+
+	reg_desc.for_va = virt_addr;
+	dat_status = DAT_SUCCESS;
+
+	lmr = dapl_lmr_alloc(ia,
+			     DAT_MEM_TYPE_VIRTUAL,
+			     reg_desc, length, (DAT_PZ_HANDLE) pz, privileges);
+
+	if (NULL == lmr) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_status = dapls_ib_mr_register(ia,
+					  lmr,
+					  virt_addr,
+					  length, privileges, va_type);
+
+	if (DAT_SUCCESS != dat_status) {
+		dapl_lmr_dealloc(lmr);
+		goto bail;
+	}
+
+	/* if the LMR context is already in the hash table */
+	dat_status = dapls_hash_search(ia->hca_ptr->lmr_hash_table,
+				       lmr->param.lmr_context, NULL);
+	if (dat_status == DAT_SUCCESS) {
+		(void)dapls_ib_mr_deregister(lmr);
+		dapl_lmr_dealloc(lmr);
+
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_LMR_IN_USE);
+		goto bail;
+	}
+
+	dat_status = dapls_hash_insert(ia->hca_ptr->lmr_hash_table,
+				       lmr->param.lmr_context, lmr);
+	if (dat_status != DAT_SUCCESS) {
+		(void)dapls_ib_mr_deregister(lmr);
+		dapl_lmr_dealloc(lmr);
+
+		/* The value returned by dapls_hash_insert(.) is not    */
+		/* returned to the consumer because the spec. requires */
+		/* that dat_lmr_create(.) return only certain values.  */
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dapl_os_atomic_inc(&pz->pz_ref_count);
+	*lmr_handle = (DAT_LMR_HANDLE) lmr;
+
+	if (NULL != lmr_context) {
+		*lmr_context = lmr->param.lmr_context;
+	}
+	if (NULL != rmr_context) {
+		*rmr_context = lmr->param.rmr_context;
+	}
+	if (NULL != registered_length) {
+		*registered_length = lmr->param.registered_size;
+	}
+	if (NULL != registered_address) {
+		*registered_address = lmr->param.registered_address;
+	}
+
+      bail:
+	return dat_status;
+}
+
+DAT_RETURN
+dapli_lmr_create_lmr(IN DAPL_IA * ia,
+		     IN DAPL_LMR * original_lmr,
+		     IN DAPL_PZ * pz,
+		     IN DAT_MEM_PRIV_FLAGS privileges,
+		     IN DAT_VA_TYPE va_type,
+		     OUT DAT_LMR_HANDLE * lmr_handle,
+		     OUT DAT_LMR_CONTEXT * lmr_context,
+		     OUT DAT_RMR_CONTEXT * rmr_context,
+		     OUT DAT_VLEN * registered_length,
+		     OUT DAT_VADDR * registered_address)
+{
+	DAPL_LMR *lmr;
+	DAT_REGION_DESCRIPTION reg_desc;
+	DAT_RETURN dat_status;
+	DAPL_HASH_DATA hash_lmr;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_lmr_create_lmr (%p, %p, %p, %x, %x, %p, %p, %p, %p)\n",
+		     ia,
+		     original_lmr,
+		     pz, privileges, va_type,
+		     lmr_handle,
+		     lmr_context, registered_length, registered_address);
+
+	dat_status = dapls_hash_search(ia->hca_ptr->lmr_hash_table,
+				       original_lmr->param.lmr_context,
+				       &hash_lmr);
+	if (dat_status != DAT_SUCCESS) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+		goto bail;
+	}
+	lmr = (DAPL_LMR *) hash_lmr;
+	reg_desc.for_lmr_handle = (DAT_LMR_HANDLE) original_lmr;
+
+	lmr = dapl_lmr_alloc(ia,
+			     DAT_MEM_TYPE_LMR,
+			     reg_desc,
+			     original_lmr->param.length,
+			     (DAT_PZ_HANDLE) pz, privileges);
+
+	if (NULL == lmr) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_status = dapls_ib_mr_register_shared(ia, lmr, privileges, va_type);
+
+	if (DAT_SUCCESS != dat_status) {
+		dapl_lmr_dealloc(lmr);
+		goto bail;
+	}
+
+	/* if the LMR context is already in the hash table */
+	dat_status = dapls_hash_search(ia->hca_ptr->lmr_hash_table,
+				       lmr->param.lmr_context, NULL);
+	if (dat_status == DAT_SUCCESS) {
+		dapls_ib_mr_deregister(lmr);
+		dapl_lmr_dealloc(lmr);
+
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_LMR_IN_USE);
+		goto bail;
+	}
+
+	dat_status = dapls_hash_insert(ia->hca_ptr->lmr_hash_table,
+				       lmr->param.lmr_context, lmr);
+	if (dat_status != DAT_SUCCESS) {
+		dapls_ib_mr_deregister(lmr);
+		dapl_lmr_dealloc(lmr);
+
+		/* The value returned by dapls_hash_insert(.) is not    */
+		/* returned to the consumer because the spec. requires */
+		/* that dat_lmr_create(.) return only certain values.  */
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dapl_os_atomic_inc(&pz->pz_ref_count);
+	*lmr_handle = (DAT_LMR_HANDLE) lmr;
+
+	if (NULL != lmr_context) {
+		*lmr_context = lmr->param.lmr_context;
+	}
+	if (NULL != rmr_context) {
+		*rmr_context = lmr->param.rmr_context;
+	}
+	if (NULL != registered_length) {
+		*registered_length = lmr->param.registered_size;
+	}
+	if (NULL != registered_address) {
+		*registered_address = lmr->param.registered_address;
+	}
+
+      bail:
+	return dat_status;
+}
+
+DAT_RETURN
+dapli_lmr_create_shared(IN DAPL_IA * ia,
+			IN DAT_REGION_DESCRIPTION reg_desc,
+			IN DAT_VLEN length,
+			IN DAPL_PZ * pz,
+			IN DAT_MEM_PRIV_FLAGS privileges,
+			IN DAT_VA_TYPE va_type,
+			OUT DAT_LMR_HANDLE * lmr_handle,
+			OUT DAT_LMR_CONTEXT * lmr_context,
+			OUT DAT_RMR_CONTEXT * rmr_context,
+			OUT DAT_VLEN * registered_length,
+			OUT DAT_VADDR * registered_address)
+{
+	DAPL_LMR *lmr;
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_API,
+		     "dapl_lmr_create_shared_virtual (ia=%p len=%x pz=%p priv=%x)\n",
+		     ia, length, pz, privileges);
+
+	lmr = dapl_lmr_alloc(ia, DAT_MEM_TYPE_LMR, reg_desc, length,	/* length is meaningless */
+			     (DAT_PZ_HANDLE) pz, privileges);
+
+	if (NULL == lmr) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	/*
+	 * Added for the shared memory support - - -
+	 * Save the region description.  We need to copy the shared
+	 * memory id because the region_desc only contains a pointer
+	 * to it.
+	 */
+	dapl_os_memcpy(&lmr->shmid,
+		       reg_desc.for_shared_memory.shared_memory_id,
+		       sizeof(lmr->shmid));
+	lmr->param.region_desc = reg_desc;
+	lmr->param.length = length;
+	lmr->param.mem_type = DAT_MEM_TYPE_SHARED_VIRTUAL;
+	lmr->param.region_desc.for_shared_memory.shared_memory_id = &lmr->shmid;
+
+	dat_status = dapls_ib_mr_register_shared(ia, lmr, privileges, va_type);
+	if (dat_status != DAT_SUCCESS) {
+		dapl_lmr_dealloc(lmr);
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+			      DAT_RESOURCE_MEMORY_REGION);
+		goto bail;
+	}
+
+	/* if the LMR context is already in the hash table */
+	dat_status = dapls_hash_search(ia->hca_ptr->lmr_hash_table,
+				       lmr->param.lmr_context, NULL);
+	if (DAT_SUCCESS == dat_status) {
+		(void)dapls_ib_mr_deregister(lmr);
+		dapl_lmr_dealloc(lmr);
+
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_LMR_IN_USE);
+		goto bail;
+	}
+
+	dat_status = dapls_hash_insert(ia->hca_ptr->lmr_hash_table,
+				       lmr->param.lmr_context, lmr);
+	if (dat_status != DAT_SUCCESS) {
+		(void)dapls_ib_mr_deregister(lmr);
+		dapl_lmr_dealloc(lmr);
+
+		/* The value returned by dapls_hash_insert(.) is not    */
+		/* returned to the consumer because the spec. requires */
+		/* that dat_lmr_create(.) return only certain values.  */
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dapl_os_atomic_inc(&pz->pz_ref_count);
+	*lmr_handle = (DAT_LMR_HANDLE) lmr;
+
+	if (NULL != lmr_context) {
+		*lmr_context = (DAT_LMR_CONTEXT) lmr->param.lmr_context;
+	}
+	if (NULL != rmr_context) {
+		*rmr_context = (DAT_LMR_CONTEXT) lmr->param.rmr_context;
+	}
+	if (NULL != registered_length) {
+		*registered_length = lmr->param.length;
+	}
+	if (NULL != registered_address) {
+		*registered_address = (DAT_VADDR) (uintptr_t)
+		    lmr->param.region_desc.for_shared_memory.virtual_address;
+	}
+      bail:
+
+	return dat_status;
+}
+
+/*
+ * dapl_lmr_create
+ *
+ * Register a memory region with an Interface Adaptor.
+ *
+ * Input:
+ *	ia_handle
+ *	mem_type
+ *	region_description
+ *	length
+ *	pz_handle
+ *	privileges
+ *
+ * Output:
+ *	lmr_handle
+ *	lmr_context
+ *	registered_length
+ *	registered_address
+ *
+ * Returns:
+ * 	DAT_SUCCESS
+ * 	DAT_INSUFFICIENT_RESOURCES
+ * 	DAT_INVALID_PARAMETER
+ * 	DAT_INVALID_HANDLE
+ * 	DAT_INVALID_STATE
+ * 	DAT_MODEL_NOT_SUPPORTED
+ *
+ */
+DAT_RETURN DAT_API
+dapl_lmr_create(IN DAT_IA_HANDLE ia_handle,
+		IN DAT_MEM_TYPE mem_type,
+		IN DAT_REGION_DESCRIPTION region_description,
+		IN DAT_VLEN length,
+		IN DAT_PZ_HANDLE pz_handle,
+		IN DAT_MEM_PRIV_FLAGS privileges,
+		IN DAT_VA_TYPE va_type,
+		OUT DAT_LMR_HANDLE * lmr_handle,
+		OUT DAT_LMR_CONTEXT * lmr_context,
+		OUT DAT_RMR_CONTEXT * rmr_context,
+		OUT DAT_VLEN * registered_length,
+		OUT DAT_VADDR * registered_address)
+{
+	DAPL_IA *ia;
+	DAPL_PZ *pz;
+	DAT_RETURN dat_status;
+
+	if (DAPL_BAD_HANDLE(ia_handle, DAPL_MAGIC_IA)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	if (DAPL_BAD_HANDLE(pz_handle, DAPL_MAGIC_PZ)) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+		goto bail;
+	}
+	if (NULL == lmr_handle) {
+		dat_status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG7);
+		goto bail;
+	}
+
+	ia = (DAPL_IA *) ia_handle;
+	pz = (DAPL_PZ *) pz_handle;
+
+	DAPL_CNTR(ia, DCNT_IA_LMR_CREATE);
+
+	switch (mem_type) {
+	case DAT_MEM_TYPE_VIRTUAL:
+		{
+			dat_status =
+			    dapli_lmr_create_virtual(ia,
+						     region_description.for_va,
+						     length, pz, privileges,
+						     va_type, lmr_handle,
+						     lmr_context, rmr_context,
+						     registered_length,
+						     registered_address);
+			break;
+		}
+	case DAT_MEM_TYPE_LMR:
+		{
+			DAPL_LMR *lmr;
+
+			if (DAPL_BAD_HANDLE
+			    (region_description.for_lmr_handle,
+			     DAPL_MAGIC_LMR)) {
+				dat_status =
+				    DAT_ERROR(DAT_INVALID_HANDLE,
+					      DAT_INVALID_HANDLE_LMR);
+				goto bail;
+			}
+
+			lmr = (DAPL_LMR *) region_description.for_lmr_handle;
+
+			dat_status =
+			    dapli_lmr_create_lmr(ia, lmr, pz, privileges,
+						 va_type, lmr_handle,
+						 lmr_context, rmr_context,
+						 registered_length,
+						 registered_address);
+			break;
+		}
+	case DAT_MEM_TYPE_SHARED_VIRTUAL:
+		{
+#if (VN_MEM_SHARED_VIRTUAL_SUPPORT > 0)
+			dat_status =
+			    dapli_lmr_create_shared(ia, region_description,
+						    length, pz, privileges,
+						    va_type, lmr_handle,
+						    lmr_context, rmr_context,
+						    registered_length,
+						    registered_address);
+#else
+			dat_status =
+			    DAT_ERROR(DAT_NOT_IMPLEMENTED, DAT_NO_SUBTYPE);
+#endif
+			break;
+		}
+	default:
+		{
+			dat_status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+			break;
+		}
+	}
+
+      bail:
+	return dat_status;
+}
diff --git a/dapl/udapl/libdaplofa.map b/dapl/udapl/libdaplofa.map
new file mode 100755
index 0000000..97d3a22
--- /dev/null
+++ b/dapl/udapl/libdaplofa.map
@@ -0,0 +1,7 @@
+DAPL_CMA_2.0 {
+        global:
+		dat_provider_fini;
+		dat_provider_init;
+		dapl_extensions;
+	local: *;
+};
diff --git a/dapl/udapl/libdaploscm.map b/dapl/udapl/libdaploscm.map
new file mode 100755
index 0000000..45edb4d
--- /dev/null
+++ b/dapl/udapl/libdaploscm.map
@@ -0,0 +1,7 @@
+DAPL_SCM_2.0 {
+        global:
+		dat_provider_fini;
+		dat_provider_init;
+		dapl_extensions;
+	local: *;
+};
diff --git a/dapl/udapl/linux/dapl_osd.c b/dapl/udapl/linux/dapl_osd.c
new file mode 100644
index 0000000..78d7735
--- /dev/null
+++ b/dapl/udapl/linux/dapl_osd.c
@@ -0,0 +1,599 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * MODULE: dapl_osd.c
+ *
+ * PURPOSE: Operating System Dependent layer
+ * Description: 
+ *	Provide OS dependent functions with a canonical DAPL
+ *	interface. Designed to be portable and hide OS specific quirks
+ *	of common functions.
+ *		
+ *
+ * $Id:$
+ **********************************************************************/
+
+#include "dapl_osd.h"
+#include "dapl.h"
+#include "dapl_hca_util.h"
+#include "dapl_ia_util.h"
+#include "dapl_rmr_util.h"
+#include "dapl_lmr_util.h"
+#include "dapl_pz_util.h"
+#include "dapl_ep_util.h"
+#include "dapl_cr_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_sp_util.h"
+#include "dapl_adapter_util.h"
+#include "dapl_provider.h"
+#include "dapl_hash.h"
+#include "dapl_timer_util.h"
+#include "dapl_debug.h"
+
+#include <sys/time.h>
+#include <stdlib.h>		/* needed for getenv() */
+#include <pthread.h>		/* needed for pthread_atfork() */
+#include <signal.h>		/* needed for thread setup */
+
+static void dapls_osd_fork_cleanup(void);
+
+/*
+ * dapl_osd_init
+ *
+ * Do Linux initialization:
+ * - Set up fork handler to clean up DAPL resources in the child
+ *   process after a fork().
+ *
+ * Input:
+ *      none
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ */
+void dapl_os_init()
+{
+	int status;
+
+	/*
+	 * Set up fork control
+	 */
+	status = pthread_atfork(NULL, NULL, dapls_osd_fork_cleanup);
+	if (status != 0) {
+		dapl_os_printf("WARNING: pthread_atfork %d\n", status);
+	}
+}
+
+/*
+ * dapl_os_get_time
+ *
+ * Return 64 bit value of current time in microseconds.
+ *
+ * Input:
+ *      loc       User location to place current time
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ */
+
+DAT_RETURN dapl_os_get_time(OUT DAPL_OS_TIMEVAL * loc)
+{
+	struct timeval tv;
+	struct timezone tz;
+
+	gettimeofday(&tv, &tz);
+	*loc = ((DAT_UINT64) (tv.tv_sec) * 1000000L) + (DAT_UINT64) tv.tv_usec;
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_os_get__env_bool
+ *
+ * Return boolean value of passed in environment variable: 1 if present,
+ * 0 if not
+ *
+ * Input:
+ *      
+ *
+ * Returns:
+ *	TRUE or FALSE
+ */
+int dapl_os_get_env_bool(char *env_str)
+{
+	char *env_var;
+
+	env_var = getenv(env_str);
+	if (env_var != NULL) {
+		return 1;
+	}
+
+	return 0;
+}
+
+/*
+ * dapl_os_get_env_val
+ *
+ * Update val to  value of passed in environment variable if present
+ *
+ * Input:
+ *      env_str
+ *	def_val		default value if environment variable does not exist
+ *
+ * Returns:
+ *	TRUE or FALSE
+ */
+int dapl_os_get_env_val(char *env_str, int def_val)
+{
+	char *env_var;
+
+	env_var = getenv(env_str);
+	if (env_var != NULL) {
+		def_val = strtol(env_var, NULL, 0);
+	}
+
+	return def_val;
+}
+
+/*
+ * Wait object routines
+ */
+
+/*
+ * dapl_os_wait_object_init
+ *
+ * Initialize a wait object
+ *
+ * Input:
+ *	wait_obj
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INTERNAL_ERROR
+ */
+DAT_RETURN dapl_os_wait_object_init(IN DAPL_OS_WAIT_OBJECT * wait_obj)
+{
+	wait_obj->signaled = DAT_FALSE;
+	if (0 != pthread_cond_init(&wait_obj->cv, NULL)) {
+		return DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+
+	/* Always returns 0.  */
+	pthread_mutex_init(&wait_obj->lock, NULL);
+
+	return DAT_SUCCESS;
+}
+
+/* Wait on the supplied wait object, up to the specified time_out.
+ * A timeout of DAT_TIMEOUT_INFINITE will wait indefinitely.
+ * Timeout should be specified in micro seconds.
+ *
+ * Functional returns:
+ *	DAT_SUCCESS -- another thread invoked dapl_os_wait object_wakeup
+ * 	DAT_INVALID_STATE -- someone else is already waiting in this wait
+ * 	object.
+ *			     only one waiter is allowed at a time.
+ *	DAT_ABORT -- another thread invoked dapl_os_wait_object_destroy
+ *	DAT_TIMEOUT -- the specified time limit was reached.
+ */
+
+DAT_RETURN
+dapl_os_wait_object_wait(IN DAPL_OS_WAIT_OBJECT * wait_obj,
+			 IN DAT_TIMEOUT timeout_val)
+{
+	DAT_RETURN dat_status;
+	int pthread_status;
+	struct timespec future;
+
+	dat_status = DAT_SUCCESS;
+	pthread_status = 0;
+
+	if (timeout_val != DAT_TIMEOUT_INFINITE) {
+		struct timeval now;
+		struct timezone tz;
+		unsigned int microsecs;
+
+		gettimeofday(&now, &tz);
+#define USEC_PER_SEC 1000000
+		microsecs = now.tv_usec + timeout_val;
+		now.tv_sec = now.tv_sec + microsecs / USEC_PER_SEC;
+		now.tv_usec = microsecs % USEC_PER_SEC;
+
+		/* Convert timeval to timespec */
+		future.tv_sec = now.tv_sec;
+		future.tv_nsec = now.tv_usec * 1000;
+
+		pthread_mutex_lock(&wait_obj->lock);
+		while (wait_obj->signaled == DAT_FALSE && pthread_status == 0) {
+			pthread_status =
+			    pthread_cond_timedwait(&wait_obj->cv,
+						   &wait_obj->lock, &future);
+
+			/*
+			 * No need to reset &future if we go around the loop;
+			 * It's an absolute time.
+			 */
+		}
+		/* Reset the signaled status if we were woken up.  */
+		if (pthread_status == 0) {
+			wait_obj->signaled = DAT_FALSE;
+		}
+		pthread_mutex_unlock(&wait_obj->lock);
+	} else {
+		pthread_mutex_lock(&wait_obj->lock);
+		while (wait_obj->signaled == DAT_FALSE && pthread_status == 0) {
+			pthread_status =
+			    pthread_cond_wait(&wait_obj->cv, &wait_obj->lock);
+		}
+		/* Reset the signaled status if we were woken up.  */
+		if (pthread_status == 0) {
+			wait_obj->signaled = DAT_FALSE;
+		}
+		pthread_mutex_unlock(&wait_obj->lock);
+	}
+
+	if (ETIMEDOUT == pthread_status) {
+		dat_status = DAT_ERROR(DAT_TIMEOUT_EXPIRED, 0);
+	} else if (EINTR == pthread_status) {
+		dat_status = DAT_ERROR(DAT_INTERRUPTED_CALL, 0);
+	} else if (0 != pthread_status) {
+		dat_status = DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+
+	return dat_status;
+}
+
+/*
+ * dapl_os_wait_object_wakeup
+ *
+ * Wakeup a thread waiting on a wait object
+ *
+ * Input:
+ *      wait_obj
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INTERNAL_ERROR
+ */
+DAT_RETURN dapl_os_wait_object_wakeup(IN DAPL_OS_WAIT_OBJECT * wait_obj)
+{
+	pthread_mutex_lock(&wait_obj->lock);
+	wait_obj->signaled = DAT_TRUE;
+	pthread_mutex_unlock(&wait_obj->lock);
+	if (0 != pthread_cond_signal(&wait_obj->cv)) {
+		return DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapl_os_wait_object_destroy
+ *
+ * Destroy a wait object
+ *
+ * Input:
+ *      wait_obj
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ *	DAT_INTERNAL_ERROR
+ */
+DAT_RETURN dapl_os_wait_object_destroy(IN DAPL_OS_WAIT_OBJECT * wait_obj)
+{
+	if (0 != pthread_cond_destroy(&wait_obj->cv)) {
+		return DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+	if (0 != pthread_mutex_destroy(&wait_obj->lock)) {
+		return DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapls_osd_fork_cleanup
+ *
+ * Update val to  value of passed in environment variable if present
+ *
+ * Input:
+ *      env_str
+ *	val		Updated if environment variable exists
+ *
+ * Returns:
+ *	TRUE or FALSE
+ */
+void dapls_osd_fork_cleanup(void)
+{
+	DAPL_PROVIDER_LIST_NODE *cur_node;
+	DAPL_HCA *hca_ptr;
+	DAPL_IA *ia_ptr;
+	DAPL_LMR *lmr_ptr;
+	DAPL_RMR *rmr_ptr;
+	DAPL_PZ *pz_ptr;
+	DAPL_CR *cr_ptr;
+	DAPL_EP *ep_ptr;
+	DAPL_EVD *evd_ptr;
+	DAT_EP_PARAM *param;
+	DAPL_SP *sp_ptr;
+
+	while (NULL != g_dapl_provider_list.head) {
+		cur_node = g_dapl_provider_list.head;
+		g_dapl_provider_list.head = cur_node->next;
+
+		hca_ptr = (DAPL_HCA *) cur_node->data.extension;
+
+		/*
+		 * Walk the list of IA ptrs & clean up. This is purposely
+		 * a destructive list walk, we really don't want to preserve
+		 * any of it.
+		 */
+		while (!dapl_llist_is_empty(&hca_ptr->ia_list_head)) {
+			ia_ptr = (DAPL_IA *)
+			    dapl_llist_peek_head(&hca_ptr->ia_list_head);
+
+			/*
+			 * The rest of the cleanup code is similar to dapl_ia_close,
+			 * the big difference is that we don't release IB resources,
+			 * only memory; the underlying IB subsystem doesn't deal
+			 * with fork at all, so leave IB handles alone.
+			 */
+			while (!dapl_llist_is_empty(&ia_ptr->rmr_list_head)) {
+				rmr_ptr = (DAPL_RMR *)
+				    dapl_llist_peek_head(&ia_ptr->
+							 rmr_list_head);
+				if (rmr_ptr->param.lmr_triplet.
+				    virtual_address != 0) {
+					dapl_os_atomic_dec(&rmr_ptr->lmr->
+							   lmr_ref_count);
+					rmr_ptr->param.lmr_triplet.
+					    virtual_address = 0;
+				}
+				dapl_os_atomic_dec(&rmr_ptr->pz->pz_ref_count);
+				dapl_ia_unlink_rmr(rmr_ptr->header.owner_ia,
+						   rmr_ptr);
+				dapl_rmr_dealloc(rmr_ptr);
+			}
+
+			while (!dapl_llist_is_empty(&ia_ptr->rsp_list_head)) {
+				sp_ptr = (DAPL_SP *)
+				    dapl_llist_peek_head(&ia_ptr->
+							 rsp_list_head);
+				dapl_os_atomic_dec(&
+						   ((DAPL_EVD *) sp_ptr->
+						    evd_handle)->evd_ref_count);
+				dapls_ia_unlink_sp(ia_ptr, sp_ptr);
+				dapls_sp_free_sp(sp_ptr);
+			}
+
+			while (!dapl_llist_is_empty(&ia_ptr->ep_list_head)) {
+				ep_ptr = (DAPL_EP *)
+				    dapl_llist_peek_head(&ia_ptr->ep_list_head);
+				param = &ep_ptr->param;
+				if (param->pz_handle != NULL) {
+					dapl_os_atomic_dec(&
+							   ((DAPL_PZ *) param->
+							    pz_handle)->
+							   pz_ref_count);
+				}
+				if (param->recv_evd_handle != NULL) {
+					dapl_os_atomic_dec(&
+							   ((DAPL_EVD *) param->
+							    recv_evd_handle)->
+							   evd_ref_count);
+				}
+				if (param->request_evd_handle) {
+					dapl_os_atomic_dec(&
+							   ((DAPL_EVD *) param->
+							    request_evd_handle)->
+							   evd_ref_count);
+				}
+				if (param->connect_evd_handle != NULL) {
+					dapl_os_atomic_dec(&
+							   ((DAPL_EVD *) param->
+							    connect_evd_handle)->
+							   evd_ref_count);
+				}
+
+				/* ...and free the resource */
+				dapl_ia_unlink_ep(ia_ptr, ep_ptr);
+				dapl_ep_dealloc(ep_ptr);
+			}
+
+			while (!dapl_llist_is_empty(&ia_ptr->lmr_list_head)) {
+				lmr_ptr = (DAPL_LMR *)
+				    dapl_llist_peek_head(&ia_ptr->
+							 lmr_list_head);
+
+				(void)dapls_hash_remove(lmr_ptr->header.
+							owner_ia->hca_ptr->
+							lmr_hash_table,
+							lmr_ptr->param.
+							lmr_context, NULL);
+
+				pz_ptr = (DAPL_PZ *) lmr_ptr->param.pz_handle;
+				dapl_os_atomic_dec(&pz_ptr->pz_ref_count);
+				dapl_ia_unlink_lmr(lmr_ptr->header.owner_ia,
+						   lmr_ptr);
+				dapl_lmr_dealloc(lmr_ptr);
+			}
+
+			while (!dapl_llist_is_empty(&ia_ptr->psp_list_head)) {
+				sp_ptr = (DAPL_SP *)
+				    dapl_llist_peek_head(&ia_ptr->
+							 psp_list_head);
+				while (!dapl_llist_is_empty
+				       (&sp_ptr->cr_list_head)) {
+					cr_ptr = (DAPL_CR *)
+					    dapl_llist_peek_head(&sp_ptr->
+								 cr_list_head);
+					dapl_sp_remove_cr(sp_ptr, cr_ptr);
+					dapls_cr_free(cr_ptr);
+				}
+
+				dapls_ia_unlink_sp(ia_ptr, sp_ptr);
+				dapl_os_atomic_dec(&
+						   ((DAPL_EVD *) sp_ptr->
+						    evd_handle)->evd_ref_count);
+				dapls_sp_free_sp(sp_ptr);
+			}
+
+			while (!dapl_llist_is_empty(&ia_ptr->pz_list_head)) {
+				pz_ptr = (DAPL_PZ *)
+				    dapl_llist_peek_head(&ia_ptr->pz_list_head);
+				dapl_ia_unlink_pz(pz_ptr->header.owner_ia,
+						  pz_ptr);
+				dapl_pz_dealloc(pz_ptr);
+			}
+
+			while (!dapl_llist_is_empty(&ia_ptr->evd_list_head)) {
+				evd_ptr = (DAPL_EVD *)
+				    dapl_llist_peek_head(&ia_ptr->
+							 evd_list_head);
+				dapl_ia_unlink_evd(evd_ptr->header.owner_ia,
+						   evd_ptr);
+				/* reset the cq_handle to avoid having it removed */
+				evd_ptr->ib_cq_handle = IB_INVALID_HANDLE;
+				dapls_evd_dealloc(evd_ptr);
+			}
+
+			dapl_hca_unlink_ia(ia_ptr->hca_ptr, ia_ptr);
+			/* asycn error evd was taken care of above, reset the pointer */
+			ia_ptr->async_error_evd = NULL;
+			dapls_ia_free(ia_ptr);
+		}		/* end while ( ia_ptr != NULL ) */
+
+		dapl_os_free(cur_node, sizeof(DAPL_PROVIDER_LIST_NODE));
+	}			/* end while (NULL != g_dapl_provider_list.head) */
+}
+
+/*
+ * Structure to contain all elements of a thread in order to enable a
+ * local routine to intercept and do some necessary initialization.
+ */
+struct thread_draft {
+	void (*func) (void *);	/* start routine */
+	void *data;		/* argument to start routine */
+};
+
+void dapli_thread_init(struct thread_draft *thread_draft);
+
+/*
+ * dapls_os_thread_create
+ *
+ * Create a thread for dapl
+ *
+ * Input:
+ *	func		function to invoke thread
+ *	f_arg		argument to pass to function
+ *
+ * Output
+ *	thread_id	handle for thread
+ *
+ * Returns:
+ *	DAT_SUCCESS
+ */
+DAT_RETURN
+dapl_os_thread_create(IN void (*func) (void *),
+		      IN void *data, OUT DAPL_OS_THREAD * thread_id)
+{
+	pthread_attr_t thread_attr;
+	struct thread_draft *thread_draft;
+	int status;
+
+	/*
+	 * Get default set of thread attributes
+	 */
+	status = pthread_attr_init(&thread_attr);
+	if (status != 0) {
+		return DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+
+	/* Create dapl threads as detached from this process */
+	status = pthread_attr_setdetachstate(&thread_attr,
+					     PTHREAD_CREATE_DETACHED);
+	if (status != 0) {
+		return DAT_ERROR(DAT_INTERNAL_ERROR, 0);
+	}
+
+	thread_draft = dapl_os_alloc(sizeof(struct thread_draft));
+
+	thread_draft->func = func;
+	thread_draft->data = data;
+
+	/* Create the thread. Observe that we first invoke a local
+	 * routine to set up OS parameters, before invoking the user
+	 * specified routine.
+	 */
+	status = pthread_create(thread_id,
+				&thread_attr,
+				(void *(*)(void *))dapli_thread_init,
+				(void *)thread_draft);
+
+	/* clean up resources */
+	(void)pthread_attr_destroy(&thread_attr);
+
+	if (status != 0) {
+		return DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, 0);
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * dapli_thread_init
+ *
+ * Need to mask all signals from this thread in order to be a good
+ * citizen. Signals will arrive randomly and will be processed by
+ * whatever thread is running unless they are specifically blocked; and
+ * this should be a user thread, not a dapl thread
+ */
+
+void dapli_thread_init(struct thread_draft *thread_draft)
+{
+	sigset_t sigset;
+	void (*func) (void *);
+	void *data;
+
+	sigfillset(&sigset);
+	pthread_sigmask(SIG_BLOCK, &sigset, NULL);
+
+	func = thread_draft->func;
+	data = thread_draft->data;
+	dapl_os_free(thread_draft, sizeof(struct thread_draft));
+
+	(*func) (data);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/udapl/linux/dapl_osd.h b/dapl/udapl/linux/dapl_osd.h
new file mode 100644
index 0000000..1c098c5
--- /dev/null
+++ b/dapl/udapl/linux/dapl_osd.h
@@ -0,0 +1,586 @@
+/*
+ * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dapl_osd.h
+ *
+ * PURPOSE: Operating System Dependent layer
+ * Description:
+ *	Provide OS dependent data structures & functions with
+ *	a canonical DAPL interface. Designed to be portable
+ *	and hide OS specific quirks of common functions.
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _DAPL_OSD_H_
+#define _DAPL_OSD_H_
+
+/*
+ * This file is defined for Linux systems only, including it on any
+ * other build will cause an error
+ */
+#ifndef __linux__
+#error UNDEFINED OS TYPE
+#endif /* __linux__ */
+
+#if !defined (__i386__) && !defined (__ia64__) && !defined(__x86_64__) && !defined(__PPC__) && !defined(__PPC64__)
+#error UNDEFINED ARCH
+#endif
+
+
+#include <dat2/udat.h>
+#include <assert.h>
+#include <errno.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>			/* for printf */
+#include <sys/time.h>
+#include <syslog.h>
+#include <netdb.h>			/* for getaddrinfo */
+#include <byteswap.h>
+
+#include <sys/ioctl.h>  /* for IOCTL's */
+
+#include "dapl_debug.h"
+
+/*
+ * Include files for setting up a network name
+ */
+#include <sys/socket.h> /* for socket(2) */
+#include <net/if.h>     /* for struct ifreq */
+#include <net/if_arp.h> /* for ARPHRD_ETHER */
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <ctype.h>
+
+#include <sys/poll.h>
+#include <signal.h>
+#include <netinet/tcp.h>
+#include <sys/utsname.h>
+#include <fcntl.h>
+
+#if !defined(SUSE_11) && !defined(REDHAT_EL5) && defined(__ia64__)
+#include <asm/atomic.h>
+#endif
+
+#if defined(SUSE_11) && defined(__ia64__)
+#include <asm/types.h>
+#include <asm/intrinsics.h>
+#endif
+
+/* Useful debug definitions */
+#ifndef STATIC
+#define STATIC static
+#endif /* STATIC */
+#ifndef _INLINE_
+#define _INLINE_ __inline__
+#endif /* _INLINE_ */
+
+#define LINUX_VERSION(a,b) (((a) << 16) + (b))
+
+void dapl_os_init ( void );	/* initialization function */
+
+#define dapl_os_panic(...) 			\
+	do {					\
+	     fprintf(stderr, "PANIC in %s:%i:%s\n", __FILE__, __LINE__, __func__); \
+	     fprintf(stderr, __VA_ARGS__); 	\
+             exit(1);				\
+	} while(0)
+
+#define dapl_ip_addr6(sockaddr) (((struct sockaddr_in6 *)sockaddr)->sin6_addr.s6_addr32)
+
+/*
+ * Atomic operations
+ */
+
+typedef volatile DAT_COUNT DAPL_ATOMIC;
+
+/* atomic function prototypes */
+STATIC _INLINE_ void /* DAT_COUNT */
+dapl_os_atomic_inc (
+	INOUT	DAPL_ATOMIC *v);
+
+STATIC _INLINE_ void /* DAT_COUNT */
+dapl_os_atomic_dec ( 
+	INOUT	DAPL_ATOMIC *v);
+
+STATIC _INLINE_ DAT_COUNT
+dapl_os_atomic_assign (
+    INOUT DAPL_ATOMIC *v,
+    IN	DAT_COUNT match_value,
+    IN	DAT_COUNT new_value );
+
+#define dapl_os_atomic_read(v)	(*v)
+#define dapl_os_atomic_set(v,i)	(*v = i)
+
+int dapl_os_get_env_bool (
+	char		*env_str );
+
+int dapl_os_get_env_val (
+	char		*env_str,
+	int		def_val );
+
+
+
+/* atomic functions */
+
+/* dapl_os_atomic_inc
+ *
+ * get the current value of '*v', and then increment it.
+ *
+ * This is equivalent to an IB atomic fetch and add of 1,
+ * except that a DAT_COUNT might be 32 bits, rather than 64
+ * and it occurs in local memory.
+ */
+
+STATIC _INLINE_ void
+dapl_os_atomic_inc (
+	INOUT	DAPL_ATOMIC *v)
+{
+#ifdef __ia64__
+	DAT_COUNT	old_value;
+#if defined(REDHAT_EL5)
+	old_value = __sync_fetch_and_add(v, 1); 
+#elif !defined(REDHAT_EL4) && (OS_RELEASE >= LINUX_VERSION(2,6))
+	IA64_FETCHADD(old_value,v,1,4,rel);
+#else
+	IA64_FETCHADD(old_value,v,1,4);
+#endif
+#elif defined(__PPC__) || defined(__PPC64__)
+	int tmp;
+
+    __asm__ __volatile__(
+	"1:	lwarx	%0,0,%2\n\
+		addic	%0,%0,1\n\
+		stwcx.	%0,0,%2\n\
+		bne-	1b"
+	: "=&r" (tmp), "+m" (v)
+	: "r" (&v)
+	: "cc");
+#else  /* !__ia64__ */
+    __asm__ __volatile__ (
+	"lock;" "incl %0"
+	:"=m" (*v)
+	:"m" (*v));
+#endif
+    return;
+}
+
+
+/* dapl_os_atomic_dec
+ *
+ * decrement the current value of '*v'. No return value is required.
+ */
+
+STATIC _INLINE_ void
+dapl_os_atomic_dec ( 
+	INOUT	DAPL_ATOMIC *v)
+{
+#ifdef __ia64__
+	DAT_COUNT	old_value;
+#if defined(REDHAT_EL5)
+	old_value = __sync_fetch_and_sub(v, 1); 
+#elif !defined(REDHAT_EL4) && (OS_RELEASE >= LINUX_VERSION(2,6))
+	IA64_FETCHADD(old_value,v,-1,4,rel);
+#else
+	IA64_FETCHADD(old_value,v,-1,4);
+#endif
+#elif defined (__PPC__) || defined(__PPC64__)
+	int tmp;
+
+    __asm__ __volatile__(
+	"1:	lwarx	%0,0,%2\n\
+		addic	%0,%0,-1\n\
+		stwcx.	%0,0,%2\n\
+		bne-	1b"
+	: "=&r" (tmp), "+m" (v)
+	: "r" (&v)
+	: "cc");
+#else  /* !__ia64__ */
+    __asm__ __volatile__ (
+	"lock;" "decl %0"
+	:"=m" (*v)
+	:"m" (*v));
+#endif
+    return;
+}
+
+
+/* dapl_os_atomic_assign
+ *
+ * assign 'new_value' to '*v' if the current value
+ * matches the provided 'match_value'.
+ *
+ * Make no assignment if there is no match.
+ *
+ * Return the current value in any case.
+ *
+ * This matches the IBTA atomic operation compare & swap
+ * except that it is for local memory and a DAT_COUNT may
+ * be only 32 bits, rather than 64.
+ */
+
+STATIC _INLINE_ DAT_COUNT
+dapl_os_atomic_assign (
+    INOUT DAPL_ATOMIC *v,
+    IN	DAT_COUNT match_value,
+    IN	DAT_COUNT new_value )
+{
+    DAT_COUNT	current_value;
+
+    /*
+     * Use the Pentium compare and exchange instruction
+     */
+
+#ifdef __ia64__
+#if defined(REDHAT_EL5)
+    current_value = __sync_val_compare_and_swap(v,match_value,new_value); 
+#elif defined(REDHAT_EL4) 
+    current_value = ia64_cmpxchg("acq",v,match_value,new_value,4);
+#else
+    current_value = ia64_cmpxchg(acq,v,match_value,new_value,4);
+#endif /* __ia64__ */
+#elif defined(__PPC__) || defined(__PPC64__)
+        __asm__ __volatile__ (
+"       lwsync\n\
+1:      lwarx   %0,0,%2         # __cmpxchg_u32\n\
+        cmpw    0,%0,%3\n\
+        bne-    2f\n\
+        stwcx.  %4,0,%2\n\
+        bne-    1b\n\
+        isync\n\
+2:"
+        : "=&r" (current_value), "=m" (*v)
+        : "r" (v), "r" (match_value), "r" (new_value), "m" (*v)
+        : "cc", "memory");
+#else
+    __asm__ __volatile__ (
+        "lock; cmpxchgl %1, %2"
+        : "=a" (current_value)
+        : "q" (new_value), "m" (*v), "0" (match_value)
+        : "memory");
+#endif
+    return current_value;
+}
+
+/*
+ * Thread Functions
+ */
+typedef pthread_t		DAPL_OS_THREAD;
+
+DAT_RETURN 
+dapl_os_thread_create (
+	IN  void			(*func)	(void *),
+	IN  void			*data,
+	OUT DAPL_OS_THREAD		*thread_id );
+
+STATIC _INLINE_ void
+dapl_os_sleep_usec(int usec)
+{
+	struct timespec sleep, remain;
+
+	sleep.tv_sec = 0;
+	sleep.tv_nsec = usec * 1000;
+	nanosleep(&sleep, &remain);
+}
+
+/*
+ * Lock Functions
+ */
+
+typedef pthread_mutex_t 	DAPL_OS_LOCK;
+
+/* function prototypes */
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_lock_init (
+    IN	DAPL_OS_LOCK *m);
+
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_lock (
+    IN	DAPL_OS_LOCK *m);
+
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_unlock (
+    IN	DAPL_OS_LOCK *m);
+
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_lock_destroy (
+    IN	DAPL_OS_LOCK *m);
+
+/* lock functions */
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_lock_init (
+    IN	DAPL_OS_LOCK *m)
+{
+    /* pthread_mutex_init always returns 0 */
+    pthread_mutex_init (m, NULL);
+
+    return DAT_SUCCESS;
+}
+
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_lock (
+    IN	DAPL_OS_LOCK *m)
+{
+    if (0 == pthread_mutex_lock (m))
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_CLASS_ERROR | DAT_INTERNAL_ERROR;
+    }
+}
+
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_unlock (
+    IN	DAPL_OS_LOCK *m)
+{
+    if (0 == pthread_mutex_unlock (m))
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_CLASS_ERROR | DAT_INTERNAL_ERROR;
+    }
+}
+
+STATIC _INLINE_ DAT_RETURN 
+dapl_os_lock_destroy (
+    IN	DAPL_OS_LOCK *m)
+{
+    if (0 == pthread_mutex_destroy (m))
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_CLASS_ERROR | DAT_INTERNAL_ERROR;
+    }
+}
+
+
+/*
+ * Wait Objects
+ */
+
+/*
+ * The wait object invariant: Presuming a call to dapl_os_wait_object_wait
+ * occurs at some point, there will be at least one wakeup after each call
+ * to dapl_os_wait_object_signal.  I.e. Signals are not ignored, though
+ * they may be coallesced.
+ */
+
+typedef struct
+{
+    DAT_BOOLEAN		signaled;
+    pthread_cond_t	cv;
+    pthread_mutex_t	lock;
+} DAPL_OS_WAIT_OBJECT;
+
+/* function prototypes */
+DAT_RETURN 
+dapl_os_wait_object_init (
+    IN DAPL_OS_WAIT_OBJECT *wait_obj);
+
+DAT_RETURN 
+dapl_os_wait_object_wait (
+    IN	DAPL_OS_WAIT_OBJECT *wait_obj, 
+    IN  DAT_TIMEOUT timeout_val);
+
+DAT_RETURN 
+dapl_os_wait_object_wakeup (
+    IN	DAPL_OS_WAIT_OBJECT *wait_obj);
+
+DAT_RETURN 
+dapl_os_wait_object_destroy (
+    IN	DAPL_OS_WAIT_OBJECT *wait_obj);
+
+/*
+ * Memory Functions
+ */
+
+/* function prototypes */
+STATIC _INLINE_ void *dapl_os_alloc (int size);
+
+STATIC _INLINE_ void *dapl_os_realloc (void *ptr, int size);
+
+STATIC _INLINE_ void dapl_os_free (void *ptr, int size);
+
+STATIC _INLINE_ void * dapl_os_memzero (void *loc, int size);
+
+STATIC _INLINE_ void * dapl_os_memcpy (void *dest, const void *src, int len);
+
+STATIC _INLINE_ int dapl_os_memcmp (const void *mem1, const void *mem2, int len);
+
+/* memory functions */
+
+
+STATIC _INLINE_ void *dapl_os_alloc (int size)
+{
+    return malloc (size);
+}
+
+STATIC _INLINE_ void *dapl_os_realloc (void *ptr, int size)
+{
+    return realloc(ptr, size);
+}
+
+STATIC _INLINE_ void dapl_os_free (void *ptr, int size)
+{
+    free (ptr);
+}
+
+STATIC _INLINE_ void * dapl_os_memzero (void *loc, int size)
+{
+    return memset (loc, 0, size);
+}
+
+STATIC _INLINE_ void * dapl_os_memcpy (void *dest, const void *src, int len)
+{
+    return memcpy (dest, src, len);
+}
+
+STATIC _INLINE_ int dapl_os_memcmp (const void *mem1, const void *mem2, int len)
+{
+    return memcmp (mem1, mem2, len);
+}
+
+/*
+ * Memory coherency functions
+ * For i386 Linux, there are no coherency issues so we just return success.
+ */
+STATIC _INLINE_  DAT_RETURN
+dapl_os_sync_rdma_read (
+    IN      const DAT_LMR_TRIPLET	*local_segments,
+    IN      DAT_VLEN			num_segments)
+{
+    return DAT_SUCCESS;
+}
+
+STATIC _INLINE_  DAT_RETURN
+dapl_os_sync_rdma_write (
+    IN      const DAT_LMR_TRIPLET	*local_segments,
+    IN      DAT_VLEN			num_segments)
+{
+    return DAT_SUCCESS;
+}
+
+
+/*
+ * String Functions
+ */
+
+STATIC _INLINE_ unsigned int dapl_os_strlen(const char *str)
+{
+    return strlen(str);
+}
+
+STATIC _INLINE_ char * dapl_os_strdup(const char *str)
+{
+    return strdup(str);
+}
+
+
+/*
+ * Timer Functions
+ */
+
+typedef DAT_UINT64		   DAPL_OS_TIMEVAL;
+typedef struct dapl_timer_entry	   DAPL_OS_TIMER;
+typedef unsigned long long int	   DAPL_OS_TICKS;
+
+/* function prototypes */
+DAT_RETURN dapl_os_get_time (DAPL_OS_TIMEVAL *);
+
+
+/*
+ *
+ * Name Service Helper functions
+ *
+ */
+#if defined(IBHOSTS_NAMING) || defined(CM_BUSTED)
+#define dapls_osd_getaddrinfo(name, addr_ptr) getaddrinfo(name,NULL,NULL,addr_ptr)
+#define dapls_osd_freeaddrinfo(addr) freeaddrinfo (addr)
+
+#endif /* IBHOSTS_NAMING */
+
+/*
+ * *printf format helpers. We use the C string constant concatenation
+ * ability to define 64 bit formats, which unfortunatly are non standard
+ * in the C compiler world. E.g. %llx for gcc, %I64x for Windows
+ */
+#include <inttypes.h>
+#define F64d   "%"PRId64
+#define F64u   "%"PRIu64
+#define F64x   "%"PRIx64
+#define F64X   "%"PRIX64
+
+
+/*
+ *  Conversion Functions
+ */
+
+STATIC _INLINE_ long int
+dapl_os_strtol(const char *nptr, char **endptr, int base)
+{
+    return strtol(nptr, endptr, base);
+}
+
+
+/*
+ *  Helper Functions
+ */
+
+
+#define dapl_os_assert(expression)	assert(expression)
+#define dapl_os_printf(...) 		printf(__VA_ARGS__)
+#define dapl_os_vprintf(fmt,args)	vprintf(fmt,args)
+#define dapl_os_syslog(fmt,args)	vsyslog(LOG_USER|LOG_WARNING,fmt,args)
+
+#define dapl_os_getpid getpid
+
+
+#endif /*  _DAPL_OSD_H_ */
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dat/common/dat_api.c b/dat/common/dat_api.c
new file mode 100755
index 0000000..781c9a6
--- /dev/null
+++ b/dat/common/dat_api.c
@@ -0,0 +1,1077 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_api.c
+ *
+ * PURPOSE: DAT Provider and Consumer registry functions.
+ *	    Also provide small integers for IA_HANDLES
+ *
+ * $Id: dat_api.c 1326 2005-05-20 22:25:31Z jlentini $
+ **********************************************************************/
+
+#include <dat2/udat.h>
+#include <dat2/dat_registry.h>
+#include "dat_osd.h"
+#include "dat_init.h"
+
+/*
+ * structure to deal with IA handles
+ */
+typedef struct {
+	DAT_OS_LOCK handle_lock;
+	unsigned long handle_max;
+	void **handle_array;
+} DAT_HANDLE_VEC;
+
+/*
+ * Number of IA Handle entries allocated at a time.
+ */
+#define DAT_HANDLE_ENTRY_STEP	64
+
+static DAT_HANDLE_VEC g_hv;
+
+/***********************************************************************
+ * Function: dats_handle_init
+ *
+ * Initialize a handle_vector. Happens when the module initializes
+ ***********************************************************************/
+DAT_RETURN dats_handle_vector_init(void)
+{
+	DAT_RETURN dat_status;
+	unsigned long i;
+
+	dat_status = DAT_SUCCESS;
+
+	g_hv.handle_max = DAT_HANDLE_ENTRY_STEP;
+
+	dat_status = dat_os_lock_init(&g_hv.handle_lock);
+	if (DAT_SUCCESS != dat_status) {
+		return dat_status;
+	}
+
+	g_hv.handle_array =
+	    dat_os_alloc(sizeof(void *) * DAT_HANDLE_ENTRY_STEP);
+	if (g_hv.handle_array == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	for (i = 0; i < g_hv.handle_max; i++) {
+		g_hv.handle_array[i] = NULL;
+	}
+
+      bail:
+	return dat_status;
+}
+
+/***********************************************************************
+ * Function: dats_set_ia_handle
+ *
+ * Install an ia_handle into a handle vector and return a small
+ * integer.
+ ***********************************************************************/
+DAT_IA_HANDLE dats_set_ia_handle(IN DAT_IA_HANDLE ia_handle)
+{
+	unsigned long i;
+	void **h;
+
+	dat_os_lock(&g_hv.handle_lock);
+
+	/*
+	 * Don't give out handle zero since that is DAT_HANDLE_NULL!
+	 */
+	for (i = 1; i < g_hv.handle_max; i++) {
+		if (g_hv.handle_array[i] == NULL) {
+			g_hv.handle_array[i] = ia_handle;
+
+			dat_os_unlock(&g_hv.handle_lock);
+
+			dat_os_dbg_print(DAT_OS_DBG_TYPE_PROVIDER_API,
+					 "dat_set_handle %p to %d\n", ia_handle,
+					 i);
+			return DAT_UL_TO_IA_HANDLE(i);
+		}
+	}
+
+	/* Didn't find an entry, grow the list & try again */
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_PROVIDER_API,
+			 "Growing the handle array from %d to %d\n",
+			 g_hv.handle_max,
+			 g_hv.handle_max + DAT_HANDLE_ENTRY_STEP);
+
+	/* reallocate the handle array */
+	h = dat_os_alloc(sizeof(void *) *
+			 (g_hv.handle_max + DAT_HANDLE_ENTRY_STEP));
+	if (h == NULL) {
+		dat_os_unlock(&g_hv.handle_lock);
+		return DAT_UL_TO_IA_HANDLE(-1);
+	}
+	/* copy old data to new area & free old memory */
+	memcpy((void *)h, (void *)g_hv.handle_array,
+	       sizeof(void *) * g_hv.handle_max);
+	dat_os_free(g_hv.handle_array, sizeof(void *) * g_hv.handle_max);
+	g_hv.handle_array = h;
+
+	/* Initialize the new entries */
+	for (i = g_hv.handle_max; i < g_hv.handle_max + DAT_HANDLE_ENTRY_STEP;
+	     i++) {
+		g_hv.handle_array[i] = NULL;
+	}
+	i = g_hv.handle_max;
+	g_hv.handle_array[i] = ia_handle;
+	g_hv.handle_max += DAT_HANDLE_ENTRY_STEP;
+	dat_os_unlock(&g_hv.handle_lock);
+
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_PROVIDER_API,
+			 "dat_set_handle x %p to %d\n", ia_handle, i);
+
+	return DAT_UL_TO_IA_HANDLE(i);
+}
+
+/***********************************************************************
+ * Function: dats_get_ia_handle(
+ *
+ * Get a handle from a handle vector and return it in an OUT parameter
+ ***********************************************************************/
+DAT_RETURN
+dats_get_ia_handle(IN DAT_IA_HANDLE handle, OUT DAT_IA_HANDLE * ia_handle_p)
+{
+	DAT_RETURN dat_status;
+
+	if (DAT_IA_HANDLE_TO_UL(handle) >= g_hv.handle_max) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	*ia_handle_p = g_hv.handle_array[DAT_IA_HANDLE_TO_UL(handle)];
+
+	if (*ia_handle_p == NULL) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	dat_status = DAT_SUCCESS;
+
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_PROVIDER_API,
+			 "dat_get_ia_handle from %d to %p\n",
+			 handle, *ia_handle_p);
+
+	return dat_status;
+}
+
+/***********************************************************************
+ * Function: dats_is_ia_handle
+ *
+ * Unlike other handles, a DAT_IA_HANDLE is a small integer. Therefore, 
+ * we must be able to distinguish between a DAT_IA_HANDLE and other
+ * types of handles (which are actually pointers).
+ * 
+ * The current implementation assumes that any value for which an IA 
+ * handle exists is a DAT_IA_HANDLE. Unfortunately this will result in 
+ * false positives. In particular it may identify a NULL pointer as IA 
+ * handle 0. An implementation that does not have this deficiency would 
+ * be preferable.
+ *
+ ***********************************************************************/
+DAT_RETURN dats_is_ia_handle(IN DAT_HANDLE dat_handle)
+{
+	unsigned long handle = DAT_IA_HANDLE_TO_UL((DAT_IA_HANDLE) dat_handle);
+
+	if (g_hv.handle_max <= handle) {
+		return DAT_FALSE;
+	} else if (NULL == g_hv.handle_array[handle]) {
+		return DAT_FALSE;
+	} else {
+		return DAT_TRUE;
+	}
+}
+
+/***********************************************************************
+ * Function: dats_free_ia_handle
+ *
+ * Free a handle in a handle vector
+ ***********************************************************************/
+DAT_RETURN dats_free_ia_handle(IN DAT_IA_HANDLE handle)
+{
+	DAT_RETURN dat_status;
+
+	if (DAT_IA_HANDLE_TO_UL(handle) >= g_hv.handle_max) {
+		dat_status =
+		    DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+		goto bail;
+	}
+	g_hv.handle_array[DAT_IA_HANDLE_TO_UL(handle)] = NULL;
+	dat_status = DAT_SUCCESS;
+
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_PROVIDER_API,
+			 "dats_free_ia_handle %d\n", handle);
+
+      bail:
+	return dat_status;
+}
+
+/**********************************************************************
+ * API definitions for common API entry points
+ **********************************************************************/
+DAT_RETURN DAT_API dat_ia_query(IN DAT_IA_HANDLE ia_handle,
+				OUT DAT_EVD_HANDLE * async_evd_handle,
+				IN DAT_IA_ATTR_MASK ia_attr_mask,
+				OUT DAT_IA_ATTR * ia_attr,
+				IN DAT_PROVIDER_ATTR_MASK provider_attr_mask,
+				OUT DAT_PROVIDER_ATTR * provider_attr)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_IA_QUERY(dapl_ia_handle,
+					  async_evd_handle,
+					  ia_attr_mask,
+					  ia_attr,
+					  provider_attr_mask, provider_attr);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_set_consumer_context(IN DAT_HANDLE dat_handle,
+					    IN DAT_CONTEXT context)
+{
+	if (dats_is_ia_handle(dat_handle)) {
+		DAT_IA_HANDLE dapl_ia_handle;
+		DAT_RETURN dat_status;
+
+		dat_status = dats_get_ia_handle((DAT_IA_HANDLE) dat_handle,
+						&dapl_ia_handle);
+
+		/* failure to map the handle is unlikely but possible */
+		/* in a mult-threaded environment                     */
+		if (DAT_SUCCESS == dat_status) {
+			return DAT_ERROR(DAT_INVALID_HANDLE,
+					 DAT_INVALID_HANDLE1);
+		}
+
+		dat_handle = dapl_ia_handle;
+	}
+
+	return DAT_SET_CONSUMER_CONTEXT(dat_handle, context);
+}
+
+DAT_RETURN DAT_API dat_get_consumer_context(IN DAT_HANDLE dat_handle,
+					    OUT DAT_CONTEXT * context)
+{
+	if (dats_is_ia_handle(dat_handle)) {
+		DAT_IA_HANDLE dapl_ia_handle;
+		DAT_RETURN dat_status;
+
+		dat_status = dats_get_ia_handle((DAT_IA_HANDLE) dat_handle,
+						&dapl_ia_handle);
+
+		/* failure to map the handle is unlikely but possible */
+		/* in a mult-threaded environment                     */
+		if (DAT_SUCCESS == dat_status) {
+			return DAT_ERROR(DAT_INVALID_HANDLE,
+					 DAT_INVALID_HANDLE1);
+		}
+
+		dat_handle = dapl_ia_handle;
+	}
+
+	return DAT_GET_CONSUMER_CONTEXT(dat_handle, context);
+}
+
+DAT_RETURN DAT_API dat_get_handle_type(IN DAT_HANDLE dat_handle,
+				       OUT DAT_HANDLE_TYPE * type)
+{
+	if (dats_is_ia_handle(dat_handle)) {
+		DAT_IA_HANDLE dapl_ia_handle;
+		DAT_RETURN dat_status;
+
+		dat_status = dats_get_ia_handle((DAT_IA_HANDLE) dat_handle,
+						&dapl_ia_handle);
+
+		/* failure to map the handle is unlikely but possible */
+		/* in a mult-threaded environment                     */
+		if (DAT_SUCCESS == dat_status) {
+			return DAT_ERROR(DAT_INVALID_HANDLE,
+					 DAT_INVALID_HANDLE1);
+		}
+
+		dat_handle = dapl_ia_handle;
+	}
+
+	return DAT_GET_HANDLE_TYPE(dat_handle, type);
+}
+
+DAT_RETURN DAT_API dat_cr_query(IN DAT_CR_HANDLE cr_handle,
+				IN DAT_CR_PARAM_MASK cr_param_mask,
+				OUT DAT_CR_PARAM * cr_param)
+{
+	if (cr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+	}
+	return DAT_CR_QUERY(cr_handle, cr_param_mask, cr_param);
+}
+
+DAT_RETURN DAT_API dat_cr_accept(IN DAT_CR_HANDLE cr_handle,
+				 IN DAT_EP_HANDLE ep_handle,
+				 IN DAT_COUNT private_data_size,
+				 IN const DAT_PVOID private_data)
+{
+	if (cr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+	}
+	return DAT_CR_ACCEPT(cr_handle,
+			     ep_handle, private_data_size, private_data);
+}
+
+DAT_RETURN DAT_API dat_cr_reject(IN DAT_CR_HANDLE cr_handle,
+				 IN DAT_COUNT private_data_size,
+				 IN const DAT_PVOID private_data)
+{
+	if (cr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+	}
+	return DAT_CR_REJECT(cr_handle, private_data_size, private_data);
+}
+
+DAT_RETURN DAT_API dat_evd_resize(IN DAT_EVD_HANDLE evd_handle,
+				  IN DAT_COUNT evd_min_qlen)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_RESIZE(evd_handle, evd_min_qlen);
+}
+
+DAT_RETURN DAT_API dat_evd_post_se(IN DAT_EVD_HANDLE evd_handle,
+				   IN const DAT_EVENT * event)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_POST_SE(evd_handle, event);
+}
+
+DAT_RETURN DAT_API dat_evd_dequeue(IN DAT_EVD_HANDLE evd_handle,
+				   OUT DAT_EVENT * event)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_DEQUEUE(evd_handle, event);
+}
+
+DAT_RETURN DAT_API dat_evd_free(IN DAT_EVD_HANDLE evd_handle)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_FREE(evd_handle);
+}
+
+DAT_RETURN DAT_API dat_evd_query(IN DAT_EVD_HANDLE evd_handle,
+				 IN DAT_EVD_PARAM_MASK evd_param_mask,
+				 OUT DAT_EVD_PARAM * evd_param)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_QUERY(evd_handle, evd_param_mask, evd_param);
+}
+
+DAT_RETURN DAT_API dat_ep_create(IN DAT_IA_HANDLE ia_handle,
+				 IN DAT_PZ_HANDLE pz_handle,
+				 IN DAT_EVD_HANDLE recv_completion_evd_handle,
+				 IN DAT_EVD_HANDLE
+				 request_completion_evd_handle,
+				 IN DAT_EVD_HANDLE connect_evd_handle,
+				 IN const DAT_EP_ATTR * ep_attributes,
+				 OUT DAT_EP_HANDLE * ep_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_EP_CREATE(dapl_ia_handle,
+					   pz_handle,
+					   recv_completion_evd_handle,
+					   request_completion_evd_handle,
+					   connect_evd_handle,
+					   ep_attributes, ep_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_ep_query(IN DAT_EP_HANDLE ep_handle,
+				IN DAT_EP_PARAM_MASK ep_param_mask,
+				OUT DAT_EP_PARAM * ep_param)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_QUERY(ep_handle, ep_param_mask, ep_param);
+}
+
+DAT_RETURN DAT_API dat_ep_modify(IN DAT_EP_HANDLE ep_handle,
+				 IN DAT_EP_PARAM_MASK ep_param_mask,
+				 IN const DAT_EP_PARAM * ep_param)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_MODIFY(ep_handle, ep_param_mask, ep_param);
+}
+
+DAT_RETURN DAT_API dat_ep_connect(IN DAT_EP_HANDLE ep_handle,
+				  IN DAT_IA_ADDRESS_PTR remote_ia_address,
+				  IN DAT_CONN_QUAL remote_conn_qual,
+				  IN DAT_TIMEOUT timeout,
+				  IN DAT_COUNT private_data_size,
+				  IN const DAT_PVOID private_data,
+				  IN DAT_QOS quality_of_service,
+				  IN DAT_CONNECT_FLAGS connect_flags)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_CONNECT(ep_handle,
+			      remote_ia_address,
+			      remote_conn_qual,
+			      timeout,
+			      private_data_size,
+			      private_data, quality_of_service, connect_flags);
+}
+
+DAT_RETURN DAT_API dat_ep_common_connect(IN DAT_EP_HANDLE ep_handle,
+					 IN DAT_IA_ADDRESS_PTR
+					 remote_ia_address,
+					 IN DAT_TIMEOUT timeout,
+					 IN DAT_COUNT private_data_size,
+					 IN const DAT_PVOID private_data)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_COMMON_CONNECT(ep_handle,
+				     remote_ia_address,
+				     timeout, private_data_size, private_data);
+}
+
+DAT_RETURN DAT_API dat_ep_dup_connect(IN DAT_EP_HANDLE ep_handle,
+				      IN DAT_EP_HANDLE ep_dup_handle,
+				      IN DAT_TIMEOUT timeout,
+				      IN DAT_COUNT private_data_size,
+				      IN const DAT_PVOID private_data,
+				      IN DAT_QOS quality_of_service)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_DUP_CONNECT(ep_handle,
+				  ep_dup_handle,
+				  timeout,
+				  private_data_size,
+				  private_data, quality_of_service);
+}
+
+DAT_RETURN DAT_API dat_ep_disconnect(IN DAT_EP_HANDLE ep_handle,
+				     IN DAT_CLOSE_FLAGS close_flags)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_DISCONNECT(ep_handle, close_flags);
+}
+
+DAT_RETURN DAT_API dat_ep_post_send(IN DAT_EP_HANDLE ep_handle,
+				    IN DAT_COUNT num_segments,
+				    IN DAT_LMR_TRIPLET * local_iov,
+				    IN DAT_DTO_COOKIE user_cookie,
+				    IN DAT_COMPLETION_FLAGS completion_flags)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_POST_SEND(ep_handle,
+				num_segments,
+				local_iov, user_cookie, completion_flags);
+}
+
+DAT_RETURN DAT_API dat_ep_post_send_with_invalidate(IN DAT_EP_HANDLE ep_handle,
+						    IN DAT_COUNT num_segments,
+						    IN DAT_LMR_TRIPLET *
+						    local_iov,
+						    IN DAT_DTO_COOKIE
+						    user_cookie,
+						    IN DAT_COMPLETION_FLAGS
+						    completion_flags,
+						    IN DAT_BOOLEAN
+						    invalidate_flag,
+						    IN DAT_RMR_CONTEXT
+						    rmr_context)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_POST_SEND_WITH_INVALIDATE(ep_handle,
+						num_segments,
+						local_iov,
+						user_cookie,
+						completion_flags,
+						invalidate_flag, rmr_context);
+}
+
+DAT_RETURN DAT_API dat_ep_post_recv(IN DAT_EP_HANDLE ep_handle,
+				    IN DAT_COUNT num_segments,
+				    IN DAT_LMR_TRIPLET * local_iov,
+				    IN DAT_DTO_COOKIE user_cookie,
+				    IN DAT_COMPLETION_FLAGS completion_flags)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_POST_RECV(ep_handle,
+				num_segments,
+				local_iov, user_cookie, completion_flags);
+}
+
+DAT_RETURN DAT_API dat_ep_post_rdma_read(IN DAT_EP_HANDLE ep_handle,
+					 IN DAT_COUNT num_segments,
+					 IN DAT_LMR_TRIPLET * local_iov,
+					 IN DAT_DTO_COOKIE user_cookie,
+					 IN const DAT_RMR_TRIPLET * remote_iov,
+					 IN DAT_COMPLETION_FLAGS
+					 completion_flags)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_POST_RDMA_READ(ep_handle,
+				     num_segments,
+				     local_iov,
+				     user_cookie, remote_iov, completion_flags);
+}
+
+DAT_RETURN DAT_API dat_ep_post_rdma_read_to_rmr(IN DAT_EP_HANDLE ep_handle,
+						IN const DAT_RMR_TRIPLET *
+						local_iov,
+						IN DAT_DTO_COOKIE user_cookie,
+						IN const DAT_RMR_TRIPLET *
+						remote_iov,
+						IN DAT_COMPLETION_FLAGS
+						completion_flags)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_POST_RDMA_READ_TO_RMR(ep_handle,
+					    local_iov,
+					    user_cookie,
+					    remote_iov, completion_flags);
+}
+
+DAT_RETURN DAT_API dat_ep_post_rdma_write(IN DAT_EP_HANDLE ep_handle,
+					  IN DAT_COUNT num_segments,
+					  IN DAT_LMR_TRIPLET * local_iov,
+					  IN DAT_DTO_COOKIE user_cookie,
+					  IN const DAT_RMR_TRIPLET * remote_iov,
+					  IN DAT_COMPLETION_FLAGS
+					  completion_flags)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_POST_RDMA_WRITE(ep_handle,
+				      num_segments,
+				      local_iov,
+				      user_cookie,
+				      remote_iov, completion_flags);
+}
+
+DAT_RETURN DAT_API dat_ep_get_status(IN DAT_EP_HANDLE ep_handle,
+				     OUT DAT_EP_STATE * ep_state,
+				     OUT DAT_BOOLEAN * recv_idle,
+				     OUT DAT_BOOLEAN * request_idle)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_GET_STATUS(ep_handle, ep_state, recv_idle, request_idle);
+}
+
+DAT_RETURN DAT_API dat_ep_free(IN DAT_EP_HANDLE ep_handle)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_FREE(ep_handle);
+}
+
+DAT_RETURN DAT_API dat_ep_reset(IN DAT_EP_HANDLE ep_handle)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_RESET(ep_handle);
+}
+
+DAT_RETURN DAT_API dat_lmr_free(IN DAT_LMR_HANDLE lmr_handle)
+{
+	if (lmr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_LMR);
+	}
+	return DAT_LMR_FREE(lmr_handle);
+}
+
+DAT_RETURN DAT_API dat_rmr_create(IN DAT_PZ_HANDLE pz_handle,
+				  OUT DAT_RMR_HANDLE * rmr_handle)
+{
+	if (pz_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+	}
+	return DAT_RMR_CREATE(pz_handle, rmr_handle);
+}
+
+DAT_RETURN DAT_API dat_rmr_create_for_ep(IN DAT_PZ_HANDLE pz_handle,
+					 OUT DAT_RMR_HANDLE * rmr_handle)
+{
+	if (pz_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+	}
+	return DAT_RMR_CREATE_FOR_EP(pz_handle, rmr_handle);
+}
+DAT_RETURN DAT_API dat_rmr_query(IN DAT_RMR_HANDLE rmr_handle,
+				 IN DAT_RMR_PARAM_MASK rmr_param_mask,
+				 OUT DAT_RMR_PARAM * rmr_param)
+{
+	if (rmr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RMR);
+	}
+	return DAT_RMR_QUERY(rmr_handle, rmr_param_mask, rmr_param);
+}
+
+DAT_RETURN DAT_API dat_rmr_bind(IN DAT_RMR_HANDLE rmr_handle,
+				IN DAT_LMR_HANDLE lmr_handle,
+				IN const DAT_LMR_TRIPLET * lmr_triplet,
+				IN DAT_MEM_PRIV_FLAGS mem_priv,
+				IN DAT_VA_TYPE va_type,
+				IN DAT_EP_HANDLE ep_handle,
+				IN DAT_RMR_COOKIE user_cookie,
+				IN DAT_COMPLETION_FLAGS completion_flags,
+				OUT DAT_RMR_CONTEXT * context)
+{
+	if (rmr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RMR);
+	}
+	return DAT_RMR_BIND(rmr_handle,
+			    lmr_handle,
+			    lmr_triplet,
+			    mem_priv,
+			    va_type,
+			    ep_handle, user_cookie, completion_flags, context);
+}
+
+DAT_RETURN DAT_API dat_rmr_free(IN DAT_RMR_HANDLE rmr_handle)
+{
+	if (rmr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RMR);
+	}
+	return DAT_RMR_FREE(rmr_handle);
+}
+
+DAT_RETURN DAT_API dat_lmr_sync_rdma_read(IN DAT_IA_HANDLE ia_handle,
+					  IN const DAT_LMR_TRIPLET *
+					  local_segments,
+					  IN DAT_VLEN num_segments)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_LMR_SYNC_RDMA_READ(dapl_ia_handle,
+						    local_segments,
+						    num_segments);
+
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_lmr_sync_rdma_write(IN DAT_IA_HANDLE ia_handle,
+					   IN const DAT_LMR_TRIPLET *
+					   local_segments,
+					   IN DAT_VLEN num_segments)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_LMR_SYNC_RDMA_WRITE(dapl_ia_handle,
+						     local_segments,
+						     num_segments);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_psp_create(IN DAT_IA_HANDLE ia_handle,
+				  IN DAT_CONN_QUAL conn_qual,
+				  IN DAT_EVD_HANDLE evd_handle,
+				  IN DAT_PSP_FLAGS psp_flags,
+				  OUT DAT_PSP_HANDLE * psp_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_PSP_CREATE(dapl_ia_handle,
+					    conn_qual,
+					    evd_handle, psp_flags, psp_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_psp_create_any(IN DAT_IA_HANDLE ia_handle,
+				      OUT DAT_CONN_QUAL * conn_qual,
+				      IN DAT_EVD_HANDLE evd_handle,
+				      IN DAT_PSP_FLAGS psp_flags,
+				      OUT DAT_PSP_HANDLE * psp_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_PSP_CREATE_ANY(dapl_ia_handle,
+						conn_qual,
+						evd_handle,
+						psp_flags, psp_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_psp_query(IN DAT_PSP_HANDLE psp_handle,
+				 IN DAT_PSP_PARAM_MASK psp_param_mask,
+				 OUT DAT_PSP_PARAM * psp_param)
+{
+	if (psp_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PSP);
+	}
+	return DAT_PSP_QUERY(psp_handle, psp_param_mask, psp_param);
+}
+
+DAT_RETURN DAT_API dat_psp_free(IN DAT_PSP_HANDLE psp_handle)
+{
+	if (psp_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PSP);
+	}
+	return DAT_PSP_FREE(psp_handle);
+}
+
+DAT_RETURN DAT_API dat_csp_create(IN DAT_IA_HANDLE ia_handle,
+				  IN DAT_COMM * comm,
+				  IN DAT_IA_ADDRESS_PTR address,
+				  IN DAT_EVD_HANDLE evd_handle,
+				  OUT DAT_CSP_HANDLE * csp_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_CSP_CREATE(dapl_ia_handle,
+					    comm,
+					    address, evd_handle, csp_handle);
+	}
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_csp_query(IN DAT_CSP_HANDLE csp_handle,
+				 IN DAT_CSP_PARAM_MASK csp_param_mask,
+				 OUT DAT_CSP_PARAM * csp_param)
+{
+	if (csp_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CSP);
+	}
+	return DAT_CSP_QUERY(csp_handle, csp_param_mask, csp_param);
+}
+
+DAT_RETURN DAT_API dat_csp_free(IN DAT_CSP_HANDLE csp_handle)
+{
+	if (csp_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CSP);
+	}
+	return DAT_CSP_FREE(csp_handle);
+}
+
+DAT_RETURN DAT_API dat_rsp_create(IN DAT_IA_HANDLE ia_handle,
+				  IN DAT_CONN_QUAL conn_qual,
+				  IN DAT_EP_HANDLE ep_handle,
+				  IN DAT_EVD_HANDLE evd_handle,
+				  OUT DAT_RSP_HANDLE * rsp_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_RSP_CREATE(dapl_ia_handle,
+					    conn_qual,
+					    ep_handle, evd_handle, rsp_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_rsp_query(IN DAT_RSP_HANDLE rsp_handle,
+				 IN DAT_RSP_PARAM_MASK rsp_param_mask,
+				 OUT DAT_RSP_PARAM * rsp_param)
+{
+	if (rsp_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
+	}
+	return DAT_RSP_QUERY(rsp_handle, rsp_param_mask, rsp_param);
+}
+
+DAT_RETURN DAT_API dat_rsp_free(IN DAT_RSP_HANDLE rsp_handle)
+{
+	if (rsp_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RSP);
+	}
+	return DAT_RSP_FREE(rsp_handle);
+}
+
+DAT_RETURN DAT_API dat_pz_create(IN DAT_IA_HANDLE ia_handle,
+				 OUT DAT_PZ_HANDLE * pz_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_PZ_CREATE(dapl_ia_handle, pz_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_pz_query(IN DAT_PZ_HANDLE pz_handle,
+				IN DAT_PZ_PARAM_MASK pz_param_mask,
+				OUT DAT_PZ_PARAM * pz_param)
+{
+	if (pz_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+	}
+	return DAT_PZ_QUERY(pz_handle, pz_param_mask, pz_param);
+}
+
+DAT_RETURN DAT_API dat_pz_free(IN DAT_PZ_HANDLE pz_handle)
+{
+	if (pz_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PZ);
+	}
+	return DAT_PZ_FREE(pz_handle);
+}
+
+DAT_RETURN DAT_API dat_ep_create_with_srq(IN DAT_IA_HANDLE ia_handle,
+					  IN DAT_PZ_HANDLE pz_handle,
+					  IN DAT_EVD_HANDLE recv_evd_handle,
+					  IN DAT_EVD_HANDLE request_evd_handle,
+					  IN DAT_EVD_HANDLE connect_evd_handle,
+					  IN DAT_SRQ_HANDLE srq_handle,
+					  IN const DAT_EP_ATTR * ep_attributes,
+					  OUT DAT_EP_HANDLE * ep_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_EP_CREATE_WITH_SRQ(dapl_ia_handle,
+						    pz_handle,
+						    recv_evd_handle,
+						    request_evd_handle,
+						    connect_evd_handle,
+						    srq_handle,
+						    ep_attributes, ep_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_ep_recv_query(IN DAT_EP_HANDLE ep_handle,
+				     OUT DAT_COUNT * nbufs_allocated,
+				     OUT DAT_COUNT * bufs_alloc_span)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_RECV_QUERY(ep_handle, nbufs_allocated, bufs_alloc_span);
+}
+
+DAT_RETURN DAT_API dat_ep_set_watermark(IN DAT_EP_HANDLE ep_handle,
+					IN DAT_COUNT soft_high_watermark,
+					IN DAT_COUNT hard_high_watermark)
+{
+	if (ep_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
+	}
+	return DAT_EP_SET_WATERMARK(ep_handle,
+				    soft_high_watermark, hard_high_watermark);
+}
+
+/* SRQ functions */
+
+DAT_RETURN DAT_API dat_srq_create(IN DAT_IA_HANDLE ia_handle,
+				  IN DAT_PZ_HANDLE pz_handle,
+				  IN DAT_SRQ_ATTR * srq_attr,
+				  OUT DAT_SRQ_HANDLE * srq_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_SRQ_CREATE(dapl_ia_handle,
+					    pz_handle, srq_attr, srq_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_srq_free(IN DAT_SRQ_HANDLE srq_handle)
+{
+	return DAT_SRQ_FREE(srq_handle);
+}
+
+DAT_RETURN DAT_API dat_srq_post_recv(IN DAT_SRQ_HANDLE srq_handle,
+				     IN DAT_COUNT num_segments,
+				     IN DAT_LMR_TRIPLET * local_iov,
+				     IN DAT_DTO_COOKIE user_cookie)
+{
+	if (srq_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+	}
+	return DAT_SRQ_POST_RECV(srq_handle,
+				 num_segments, local_iov, user_cookie);
+}
+
+DAT_RETURN DAT_API dat_srq_query(IN DAT_SRQ_HANDLE srq_handle,
+				 IN DAT_SRQ_PARAM_MASK srq_param_mask,
+				 OUT DAT_SRQ_PARAM * srq_param)
+{
+	if (srq_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+	}
+	return DAT_SRQ_QUERY(srq_handle, srq_param_mask, srq_param);
+}
+
+DAT_RETURN DAT_API dat_srq_resize(IN DAT_SRQ_HANDLE srq_handle,
+				  IN DAT_COUNT srq_max_recv_dto)
+{
+	if (srq_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+	}
+	return DAT_SRQ_RESIZE(srq_handle, srq_max_recv_dto);
+}
+
+DAT_RETURN DAT_API dat_srq_set_lw(IN DAT_SRQ_HANDLE srq_handle,
+				  IN DAT_COUNT low_watermark)
+{
+	if (srq_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_SRQ);
+	}
+	return DAT_SRQ_SET_LW(srq_handle, low_watermark);
+}
+
+#ifdef DAT_EXTENSIONS
+
+extern int g_dat_extensions;
+
+DAT_RETURN DAT_API dat_extension_op(IN DAT_HANDLE handle,
+				    IN DAT_EXTENDED_OP ext_op, IN ...)
+{
+	DAT_RETURN status;
+	DAT_IA_HANDLE dapl_handle;
+	va_list args;
+
+	/* If not IA handle then just passthrough */
+	if (dats_get_ia_handle(handle, &dapl_handle) != DAT_SUCCESS) {
+		dapl_handle = handle;
+	}
+
+	/* verify provider extension support */
+	if (!g_dat_extensions) {
+		return DAT_ERROR(DAT_NOT_IMPLEMENTED, 0);
+	}
+
+	/* extension will validate the handle based on op */
+	va_start(args, ext_op);
+	status = DAT_HANDLE_EXTENDEDOP(dapl_handle, ext_op, args);
+	va_end(args);
+
+	return status;
+}
+#endif
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dat/common/dat_dictionary.c b/dat/common/dat_dictionary.c
new file mode 100644
index 0000000..6716ff6
--- /dev/null
+++ b/dat/common/dat_dictionary.c
@@ -0,0 +1,420 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_dictionary.c
+ *
+ * PURPOSE: dictionary data structure
+ *
+ * $Id: dat_dictionary.c,v 1.17 2005/05/20 22:24:01 jlentini Exp $
+ **********************************************************************/
+
+#include "dat_dictionary.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Structures                                                        *
+ *                                                                   *
+ *********************************************************************/
+
+typedef struct DAT_DICTIONARY_NODE {
+	DAT_PROVIDER_INFO key;
+	DAT_DICTIONARY_DATA data;
+	struct DAT_DICTIONARY_NODE *prev;
+	struct DAT_DICTIONARY_NODE *next;
+} DAT_DICTIONARY_NODE;
+
+struct DAT_DICTIONARY {
+	DAT_DICTIONARY_NODE *head;
+	DAT_DICTIONARY_NODE *tail;
+	DAT_COUNT size;
+};
+
+/*********************************************************************
+ *                                                                   *
+ * Function Declarations                                             *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_RETURN
+dat_dictionary_key_dup(const DAT_PROVIDER_INFO * old_key,
+		       DAT_PROVIDER_INFO * new_key);
+
+static DAT_BOOLEAN
+dat_dictionary_key_is_equal(const DAT_PROVIDER_INFO * key_a,
+			    const DAT_PROVIDER_INFO * key_b);
+
+/*********************************************************************
+ *                                                                   *
+ * External Functions                                                *
+ *                                                                   *
+ *********************************************************************/
+
+/***********************************************************************
+ * Function: dat_dictionary_create
+ ***********************************************************************/
+
+DAT_RETURN dat_dictionary_create(OUT DAT_DICTIONARY ** pp_dictionary)
+{
+	DAT_DICTIONARY *p_dictionary;
+	DAT_RETURN status;
+
+	dat_os_assert(NULL != pp_dictionary);
+
+	status = DAT_SUCCESS;
+
+	/* create the dictionary */
+	p_dictionary = dat_os_alloc(sizeof(DAT_DICTIONARY));
+	if (NULL == p_dictionary) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_os_memset(p_dictionary, '\0', sizeof(DAT_DICTIONARY));
+
+	/* create the head node */
+	p_dictionary->head = dat_os_alloc(sizeof(DAT_DICTIONARY_NODE));
+	if (NULL == p_dictionary->head) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_os_memset(p_dictionary->head, '\0', sizeof(DAT_DICTIONARY_NODE));
+
+	/* create the tail node */
+	p_dictionary->tail = dat_os_alloc(sizeof(DAT_DICTIONARY_NODE));
+	if (NULL == p_dictionary->tail) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_os_memset(p_dictionary->tail, '\0', sizeof(DAT_DICTIONARY_NODE));
+
+	p_dictionary->head->next = p_dictionary->tail;
+	p_dictionary->tail->prev = p_dictionary->head;
+
+	*pp_dictionary = p_dictionary;
+
+      bail:
+	if (DAT_SUCCESS != status) {
+		if (NULL != p_dictionary) {
+			if (NULL != p_dictionary->head) {
+				dat_os_free(p_dictionary->head,
+					    sizeof(DAT_DICTIONARY_NODE));
+			}
+
+			if (NULL != p_dictionary->tail) {
+				dat_os_free(p_dictionary->tail,
+					    sizeof(DAT_DICTIONARY_NODE));
+			}
+
+			dat_os_free(p_dictionary, sizeof(DAT_DICTIONARY));
+		}
+	}
+
+	return status;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_destroy
+ ***********************************************************************/
+
+DAT_RETURN dat_dictionary_destroy(IN DAT_DICTIONARY * p_dictionary)
+{
+	DAT_DICTIONARY_NODE *cur_node;
+
+	dat_os_assert(NULL != p_dictionary);
+
+	while (NULL != p_dictionary->head) {
+		cur_node = p_dictionary->head;
+		p_dictionary->head = cur_node->next;
+
+		dat_os_free(cur_node, sizeof(DAT_DICTIONARY_NODE));
+	}
+
+	dat_os_free(p_dictionary, sizeof(DAT_DICTIONARY));
+
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_size
+ ***********************************************************************/
+
+DAT_RETURN
+dat_dictionary_size(IN DAT_DICTIONARY * p_dictionary, OUT DAT_COUNT * p_size)
+{
+	dat_os_assert(NULL != p_dictionary);
+	dat_os_assert(NULL != p_size);
+
+	*p_size = p_dictionary->size;
+
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_entry_create
+ ***********************************************************************/
+
+DAT_RETURN dat_dictionary_entry_create(OUT DAT_DICTIONARY_ENTRY * p_entry)
+{
+	DAT_DICTIONARY_NODE *node;
+	DAT_RETURN dat_status;
+
+	dat_os_assert(NULL != p_entry);
+
+	dat_status = DAT_SUCCESS;
+
+	node = dat_os_alloc(sizeof(DAT_DICTIONARY_NODE));
+	if (NULL == node) {
+		dat_status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	*p_entry = node;
+
+      bail:
+	return dat_status;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_entry_destroy
+ ***********************************************************************/
+
+DAT_RETURN dat_dictionary_entry_destroy(OUT DAT_DICTIONARY_ENTRY entry)
+{
+	dat_os_free(entry, sizeof(DAT_DICTIONARY_NODE));
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_insert
+ ***********************************************************************/
+
+DAT_RETURN
+dat_dictionary_insert(IN DAT_DICTIONARY * p_dictionary,
+		      IN DAT_DICTIONARY_ENTRY entry,
+		      IN const DAT_PROVIDER_INFO * key,
+		      IN DAT_DICTIONARY_DATA data)
+{
+	DAT_RETURN dat_status;
+	DAT_DICTIONARY_NODE *cur_node, *prev_node, *next_node;
+
+	dat_os_assert(NULL != p_dictionary);
+	dat_os_assert(NULL != entry);
+
+	cur_node = entry;
+
+	if (DAT_SUCCESS == dat_dictionary_search(p_dictionary, key, NULL)) {
+		dat_status = DAT_ERROR(DAT_PROVIDER_ALREADY_REGISTERED, 0);
+		goto bail;
+	}
+
+	dat_status = dat_dictionary_key_dup(key, &cur_node->key);
+	if (DAT_SUCCESS != dat_status) {
+		goto bail;
+	}
+
+	/* insert node at end of list to preserve registration order */
+	prev_node = p_dictionary->tail->prev;
+	next_node = p_dictionary->tail;
+
+	cur_node->data = data;
+	cur_node->next = next_node;
+	cur_node->prev = prev_node;
+
+	prev_node->next = cur_node;
+	next_node->prev = cur_node;
+
+	p_dictionary->size++;
+
+      bail:
+	return dat_status;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_search
+ ***********************************************************************/
+
+DAT_RETURN
+dat_dictionary_search(IN DAT_DICTIONARY * p_dictionary,
+		      IN const DAT_PROVIDER_INFO * key,
+		      OUT DAT_DICTIONARY_DATA * p_data)
+{
+	DAT_DICTIONARY_NODE *cur_node;
+	DAT_RETURN status;
+
+	dat_os_assert(NULL != p_dictionary);
+
+	status = DAT_ERROR(DAT_PROVIDER_NOT_FOUND, DAT_NAME_NOT_REGISTERED);
+
+	for (cur_node = p_dictionary->head->next;
+	     p_dictionary->tail != cur_node; cur_node = cur_node->next) {
+		if (DAT_TRUE ==
+		    dat_dictionary_key_is_equal(&cur_node->key, key)) {
+			if (NULL != p_data) {
+				*p_data = cur_node->data;
+			}
+
+			status = DAT_SUCCESS;
+			goto bail;
+		}
+	}
+
+      bail:
+	return status;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_enumerate
+ ***********************************************************************/
+
+DAT_RETURN
+dat_dictionary_enumerate(IN DAT_DICTIONARY * p_dictionary,
+			 IN DAT_DICTIONARY_DATA array[],
+			 IN DAT_COUNT array_size)
+{
+	DAT_DICTIONARY_NODE *cur_node;
+	DAT_COUNT i;
+	DAT_RETURN status;
+
+	dat_os_assert(NULL != p_dictionary);
+	dat_os_assert(NULL != array);
+
+	status = DAT_SUCCESS;
+
+	if (array_size < p_dictionary->size) {
+		status = DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, 0);
+		goto bail;
+	}
+
+	for (cur_node = p_dictionary->head->next, i = 0;
+	     p_dictionary->tail != cur_node; cur_node = cur_node->next, i++) {
+		array[i] = cur_node->data;
+	}
+
+      bail:
+	return status;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_remove
+ ***********************************************************************/
+
+DAT_RETURN
+dat_dictionary_remove(IN DAT_DICTIONARY * p_dictionary,
+		      IN DAT_DICTIONARY_ENTRY * p_entry,
+		      IN const DAT_PROVIDER_INFO * key,
+		      OUT DAT_DICTIONARY_DATA * p_data)
+{
+	DAT_DICTIONARY_NODE *cur_node, *prev_node, *next_node;
+	DAT_RETURN status;
+
+	dat_os_assert(NULL != p_dictionary);
+	dat_os_assert(NULL != p_entry);
+
+	status = DAT_ERROR(DAT_PROVIDER_NOT_FOUND, DAT_NAME_NOT_REGISTERED);
+
+	for (cur_node = p_dictionary->head->next;
+	     p_dictionary->tail != cur_node; cur_node = cur_node->next) {
+		if (DAT_TRUE ==
+		    dat_dictionary_key_is_equal(&cur_node->key, key)) {
+			if (NULL != p_data) {
+				*p_data = cur_node->data;
+			}
+
+			prev_node = cur_node->prev;
+			next_node = cur_node->next;
+
+			prev_node->next = next_node;
+			next_node->prev = prev_node;
+
+			*p_entry = cur_node;
+
+			p_dictionary->size--;
+
+			status = DAT_SUCCESS;
+			goto bail;
+		}
+	}
+
+      bail:
+	return status;
+}
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+/***********************************************************************
+ * Function: dat_dictionary_key_create
+ ***********************************************************************/
+
+DAT_RETURN
+dat_dictionary_key_dup(const DAT_PROVIDER_INFO * old_key,
+		       DAT_PROVIDER_INFO * new_key)
+{
+	dat_os_assert(NULL != old_key);
+	dat_os_assert(NULL != new_key);
+
+	dat_os_strncpy(new_key->ia_name, old_key->ia_name, DAT_NAME_MAX_LENGTH);
+	new_key->dapl_version_major = old_key->dapl_version_major;
+	new_key->dapl_version_minor = old_key->dapl_version_minor;
+	new_key->is_thread_safe = old_key->is_thread_safe;
+
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_dictionary_key_is_equal
+ ***********************************************************************/
+
+DAT_BOOLEAN
+dat_dictionary_key_is_equal(const DAT_PROVIDER_INFO * key_a,
+			    const DAT_PROVIDER_INFO * key_b)
+{
+	if ((dat_os_strlen(key_a->ia_name) == dat_os_strlen(key_b->ia_name)) &&
+	    (!dat_os_strncmp
+	     (key_a->ia_name, key_b->ia_name, dat_os_strlen(key_a->ia_name)))
+	    && (key_a->dapl_version_major == key_b->dapl_version_major)
+	    && (key_a->dapl_version_minor == key_b->dapl_version_minor)
+	    && (key_a->is_thread_safe == key_b->is_thread_safe)) {
+		return DAT_TRUE;
+	} else {
+		return DAT_FALSE;
+	}
+}
diff --git a/dat/common/dat_dictionary.h b/dat/common/dat_dictionary.h
new file mode 100644
index 0000000..b496266
--- /dev/null
+++ b/dat/common/dat_dictionary.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dat_dictionary.h
+ *
+ * PURPOSE: dictionary data structure
+ *
+ * $Id: dat_dictionary.h,v 1.10 2005/03/24 05:58:27 jlentini Exp $
+ **********************************************************************/
+
+#ifndef _DAT_DICTIONARY_H_
+#define _DAT_DICTIONARY_H_
+
+
+#include "dat_osd.h"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Typedefs                                                          *
+ *                                                                   *
+ *********************************************************************/
+
+typedef struct DAT_DICTIONARY   DAT_DICTIONARY;
+typedef void *                  DAT_DICTIONARY_DATA;
+typedef void *                  DAT_DICTIONARY_ENTRY;
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAT_RETURN
+dat_dictionary_create (
+    OUT DAT_DICTIONARY **pp_dictionary);
+
+extern DAT_RETURN
+dat_dictionary_destroy (
+    IN  DAT_DICTIONARY *p_dictionary);
+
+extern DAT_RETURN
+dat_dictionary_size (
+    IN  DAT_DICTIONARY *p_dictionary,
+    OUT DAT_COUNT *p_size);
+
+extern DAT_RETURN
+dat_dictionary_entry_create (
+    OUT DAT_DICTIONARY_ENTRY *p_entry);
+
+extern DAT_RETURN
+dat_dictionary_entry_destroy (
+    IN  DAT_DICTIONARY_ENTRY entry);
+
+extern DAT_RETURN
+dat_dictionary_insert (
+    IN  DAT_DICTIONARY *p_dictionary,
+    IN  DAT_DICTIONARY_ENTRY entry,
+    IN  const DAT_PROVIDER_INFO *key,
+    IN  DAT_DICTIONARY_DATA data);
+
+extern DAT_RETURN
+dat_dictionary_search (
+    IN  DAT_DICTIONARY *p_dictionary,
+    IN  const DAT_PROVIDER_INFO *key,
+    OUT DAT_DICTIONARY_DATA *p_data);
+
+extern DAT_RETURN
+dat_dictionary_enumerate (
+    IN  DAT_DICTIONARY *p_dictionary,
+    IN  DAT_DICTIONARY_DATA array[],
+    IN  DAT_COUNT array_size);
+
+
+extern DAT_RETURN
+dat_dictionary_remove (
+    IN  DAT_DICTIONARY *p_dictionary,
+    IN  DAT_DICTIONARY_ENTRY *p_entry,
+    IN  const DAT_PROVIDER_INFO *key,
+    OUT DAT_DICTIONARY_DATA *p_data);
+
+#endif
diff --git a/dat/common/dat_dr.c b/dat/common/dat_dr.c
new file mode 100644
index 0000000..0460e81
--- /dev/null
+++ b/dat/common/dat_dr.c
@@ -0,0 +1,327 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_dr.c
+ *
+ * PURPOSE: dynamic registry implementation
+ *
+ * $Id: dat_dr.c,v 1.17 2005/03/24 05:58:27 jlentini Exp $
+ **********************************************************************/
+
+#include <dat2/dat_platform_specific.h>
+#include "dat_dr.h"
+#include "dat_dictionary.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Global Variables                                                  *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_OS_LOCK g_dr_lock;
+static DAT_DICTIONARY *g_dr_dictionary = NULL;
+
+/*********************************************************************
+ *                                                                   *
+ * External Functions                                                *
+ *                                                                   *
+ *********************************************************************/
+
+//***********************************************************************
+// Function: dat_dr_init
+//***********************************************************************
+
+DAT_RETURN dat_dr_init(void)
+{
+	DAT_RETURN status;
+
+	status = dat_os_lock_init(&g_dr_lock);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	status = dat_dictionary_create(&g_dr_dictionary);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	return DAT_SUCCESS;
+}
+
+//***********************************************************************
+// Function: dat_dr_fini
+//***********************************************************************
+
+DAT_RETURN dat_dr_fini(void)
+{
+	DAT_RETURN status;
+
+	status = dat_os_lock_destroy(&g_dr_lock);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	status = dat_dictionary_destroy(g_dr_dictionary);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	return DAT_SUCCESS;
+}
+
+//***********************************************************************
+// Function: dat_dr_insert
+//***********************************************************************
+
+DAT_RETURN
+dat_dr_insert(IN const DAT_PROVIDER_INFO * info, IN DAT_DR_ENTRY * entry)
+{
+	DAT_RETURN status;
+	DAT_DICTIONARY_ENTRY dict_entry = NULL;
+	DAT_DR_ENTRY *data;
+
+	data = dat_os_alloc(sizeof(DAT_DR_ENTRY));
+	if (NULL == data) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	*data = *entry;
+
+	status = dat_dictionary_entry_create(&dict_entry);
+	if (DAT_SUCCESS != status) {
+		goto bail;
+	}
+
+	dat_os_lock(&g_dr_lock);
+
+	status = dat_dictionary_insert(g_dr_dictionary,
+				       dict_entry,
+				       info, (DAT_DICTIONARY_DATA *) data);
+
+	dat_os_unlock(&g_dr_lock);
+
+      bail:
+	if (DAT_SUCCESS != status) {
+		if (NULL != data) {
+			dat_os_free(data, sizeof(DAT_DR_ENTRY));
+		}
+
+		if (NULL != dict_entry) {
+			(void)dat_dictionary_entry_destroy(dict_entry);
+		}
+	}
+
+	return status;
+}
+
+//***********************************************************************
+// Function: dat_dr_remove
+//***********************************************************************
+
+DAT_RETURN dat_dr_remove(IN const DAT_PROVIDER_INFO * info)
+{
+	DAT_DICTIONARY_ENTRY dict_entry;
+	DAT_RETURN status;
+	DAT_DICTIONARY_DATA data;
+
+	dict_entry = NULL;
+	dat_os_lock(&g_dr_lock);
+
+	status = dat_dictionary_search(g_dr_dictionary, info, &data);
+
+	if (DAT_SUCCESS != status) {
+		/* return status from dat_dictionary_search() */
+		goto bail;
+	}
+
+	if (0 != ((DAT_DR_ENTRY *) data)->ref_count) {
+		status = DAT_ERROR(DAT_PROVIDER_IN_USE, 0);
+		goto bail;
+	}
+
+	status = dat_dictionary_remove(g_dr_dictionary,
+				       &dict_entry, info, &data);
+	if (DAT_SUCCESS != status) {
+		/* return status from dat_dictionary_remove() */
+		goto bail;
+	}
+
+	dat_os_free(data, sizeof(DAT_DR_ENTRY));
+
+      bail:
+	dat_os_unlock(&g_dr_lock);
+
+	if (NULL != dict_entry) {
+		(void)dat_dictionary_entry_destroy(dict_entry);
+	}
+
+	return status;
+}
+
+//***********************************************************************
+// Function: dat_dr_provider_open
+//***********************************************************************
+
+DAT_RETURN
+dat_dr_provider_open(IN const DAT_PROVIDER_INFO * info,
+		     OUT DAT_IA_OPEN_FUNC * p_ia_open_func)
+{
+	DAT_RETURN status;
+	DAT_DICTIONARY_DATA data;
+
+	dat_os_lock(&g_dr_lock);
+	status = dat_dictionary_search(g_dr_dictionary, info, &data);
+	dat_os_unlock(&g_dr_lock);
+
+	if (DAT_SUCCESS == status) {
+		((DAT_DR_ENTRY *) data)->ref_count++;
+		*p_ia_open_func = ((DAT_DR_ENTRY *) data)->ia_open_func;
+	}
+
+	return status;
+}
+
+//***********************************************************************
+// Function: dat_dr_provider_close
+//***********************************************************************
+
+DAT_RETURN dat_dr_provider_close(IN const DAT_PROVIDER_INFO * info)
+{
+	DAT_RETURN status;
+	DAT_DICTIONARY_DATA data;
+
+	dat_os_lock(&g_dr_lock);
+	status = dat_dictionary_search(g_dr_dictionary, info, &data);
+	dat_os_unlock(&g_dr_lock);
+
+	if (DAT_SUCCESS == status) {
+		((DAT_DR_ENTRY *) data)->ref_count--;
+	}
+
+	return status;
+}
+
+//***********************************************************************
+// Function: dat_dr_size
+//***********************************************************************
+
+DAT_RETURN dat_dr_size(OUT DAT_COUNT * size)
+{
+	return dat_dictionary_size(g_dr_dictionary, size);
+}
+
+//***********************************************************************
+// Function: dat_dr_list
+//***********************************************************************
+
+DAT_RETURN
+dat_dr_list(IN DAT_COUNT max_to_return,
+	    OUT DAT_COUNT * entries_returned,
+	    OUT DAT_PROVIDER_INFO * (dat_provider_list[]))
+{
+	DAT_DR_ENTRY **array;
+	DAT_COUNT array_size;
+	DAT_COUNT i;
+	DAT_RETURN status;
+
+	array = NULL;
+	status = DAT_SUCCESS;
+
+	/* The dictionary size may increase between the call to      */
+	/* dat_dictionary_size() and dat_dictionary_enumerate().     */
+	/* Therefore we loop until a successful enumeration is made. */
+	*entries_returned = 0;
+	for (;;) {
+		status = dat_dictionary_size(g_dr_dictionary, &array_size);
+		if (status != DAT_SUCCESS) {
+			goto bail;
+		}
+
+		if (array_size == 0) {
+			status = DAT_SUCCESS;
+			goto bail;
+		}
+
+		array = dat_os_alloc(array_size * sizeof(DAT_DR_ENTRY *));
+		if (array == NULL) {
+			status =
+			    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				      DAT_RESOURCE_MEMORY);
+			goto bail;
+		}
+
+		dat_os_lock(&g_dr_lock);
+
+		status = dat_dictionary_enumerate(g_dr_dictionary,
+						  (DAT_DICTIONARY_DATA *) array,
+						  array_size);
+
+		dat_os_unlock(&g_dr_lock);
+
+		if (DAT_SUCCESS == status) {
+			break;
+		} else {
+			dat_os_free(array, array_size * sizeof(DAT_DR_ENTRY *));
+			array = NULL;
+			continue;
+		}
+	}
+
+	for (i = 0; (i < max_to_return) && (i < array_size); i++) {
+		if (NULL == dat_provider_list[i]) {
+			status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		}
+
+		*dat_provider_list[i] = array[i]->info;
+	}
+
+	*entries_returned = i;
+
+      bail:
+	if (NULL != array) {
+		dat_os_free(array, array_size * sizeof(DAT_DR_ENTRY *));
+	}
+
+	return status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dat/common/dat_dr.h b/dat/common/dat_dr.h
new file mode 100644
index 0000000..3012252
--- /dev/null
+++ b/dat/common/dat_dr.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dat_dr.h
+ *
+ * PURPOSE: dynamic registry interface declarations
+ *
+ * $Id: dat_dr.h,v 1.12 2005/03/24 05:58:27 jlentini Exp $
+ **********************************************************************/
+
+#ifndef __DAT_DR_H__
+#define __DAT_DR_H__
+
+
+#include "dat_osd.h"
+#include <dat2/dat_registry.h> /* Provider API function prototypes */
+
+
+/*********************************************************************
+ *                                                                   *
+ * Strucutres                                                        *
+ *                                                                   *
+ *********************************************************************/
+
+typedef struct
+{
+    DAT_COUNT 			ref_count;
+    DAT_IA_OPEN_FUNC 		ia_open_func;
+    DAT_PROVIDER_INFO 		info;
+} DAT_DR_ENTRY;
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Declarations                                             *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAT_RETURN
+dat_dr_init ( void );
+
+extern DAT_RETURN
+dat_dr_fini ( void );
+
+extern DAT_RETURN
+dat_dr_insert (
+    IN  const DAT_PROVIDER_INFO *info,
+    IN  DAT_DR_ENTRY 		*entry );
+
+extern DAT_RETURN
+dat_dr_remove (
+    IN  const DAT_PROVIDER_INFO *info );
+
+
+extern DAT_RETURN
+dat_dr_provider_open (
+    IN  const DAT_PROVIDER_INFO *info,
+    OUT DAT_IA_OPEN_FUNC	*p_ia_open_func );
+
+extern DAT_RETURN
+dat_dr_provider_close (
+    IN  const DAT_PROVIDER_INFO *info);
+
+extern DAT_RETURN
+dat_dr_size (
+    OUT DAT_COUNT               *size);
+
+extern DAT_RETURN
+dat_dr_list (
+    IN  DAT_COUNT               max_to_return,
+    OUT DAT_COUNT               *entries_returned,
+    OUT DAT_PROVIDER_INFO       * (dat_provider_list[]) );
+
+#endif
diff --git a/dat/common/dat_init.c b/dat/common/dat_init.c
new file mode 100644
index 0000000..71a56a0
--- /dev/null
+++ b/dat/common/dat_init.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_init.c
+ *
+ * PURPOSE: DAT registry implementation for uDAPL
+ * Description: init and fini functions for DAT module.
+ *
+ * $Id: dat_init.c,v 1.18 2005/03/24 05:58:27 jlentini Exp $
+ **********************************************************************/
+
+#include <dat2/dat_platform_specific.h>
+#include "dat_init.h"
+#include "dat_dr.h"
+#include "dat_osd.h"
+
+#ifndef DAT_NO_STATIC_REGISTRY
+#include "dat_sr.h"
+#endif
+
+/*********************************************************************
+ *                                                                   *
+ * Global Variables                                                  *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * Ideally, the following two rules could be enforced:
+ *
+ * - The DAT Registry's initialization function is executed before that
+ *   of any DAT Providers and hence all calls into the registry occur
+ *   after the registry module is initialized.
+ *
+ * - The DAT Registry's deinitialization function is executed after that
+ *   of any DAT Providers and hence all calls into the registry occur
+ *   before the registry module is deinitialized.
+ *
+ * However, on many platforms few guarantees are provided regarding the
+ * order in which module initialization and deinitialization functions
+ * are invoked.
+ *
+ * To understand why these rules are difficult to enforce using only
+ * features common to all platforms, consider the Linux platform. The order
+ * in which Linux shared libraries are loaded into a process's address space
+ * is undefined. When a DAT consumer explicitly links to DAT provider
+ * libraries, the order in which library initialization and deinitialization
+ * functions are invoked becomes important. In this scenario, a DAPL provider
+ * may call dat_registry_add_provider() before the registry has been 
+ * initialized.
+ *
+ * We assume that modules are loaded with a single thread. Given
+ * this assumption, we can use a simple state variable to determine
+ * the state of the DAT registry.
+ */
+
+static DAT_MODULE_STATE g_module_state = DAT_MODULE_STATE_UNINITIALIZED;
+
+//***********************************************************************
+// Function: dat_module_get_state
+//***********************************************************************
+
+DAT_MODULE_STATE dat_module_get_state(void)
+{
+	return g_module_state;
+}
+
+//***********************************************************************
+// Function: dat_init
+//***********************************************************************
+
+void dat_init(void)
+{
+	if (DAT_MODULE_STATE_UNINITIALIZED == g_module_state) {
+		/*
+		 * update the module state flag immediately in case there
+		 * is a recursive call to dat_init().
+		 */
+		g_module_state = DAT_MODULE_STATE_INITIALIZING;
+
+		dat_os_dbg_init();
+
+		dats_handle_vector_init();
+
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_GENERIC,
+				 "DAT Registry: Started (dat_init)\n");
+
+#ifndef DAT_NO_STATIC_REGISTRY
+		dat_sr_init();
+#endif
+		dat_dr_init();
+
+		g_module_state = DAT_MODULE_STATE_INITIALIZED;
+	}
+}
+
+//***********************************************************************
+// Function: dat_fini
+//***********************************************************************
+
+void dat_fini(void)
+{
+	if (DAT_MODULE_STATE_INITIALIZED == g_module_state) {
+		g_module_state = DAT_MODULE_STATE_DEINITIALIZING;
+
+		dat_dr_fini();
+#ifndef DAT_NO_STATIC_REGISTRY
+		dat_sr_fini();
+#endif
+
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_GENERIC,
+				 "DAT Registry: Stopped (dat_fini)\n");
+
+		g_module_state = DAT_MODULE_STATE_DEINITIALIZED;
+	}
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dat/common/dat_init.h b/dat/common/dat_init.h
new file mode 100644
index 0000000..4596b01
--- /dev/null
+++ b/dat/common/dat_init.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dat_init.h
+ *
+ * PURPOSE: DAT registry global data
+ *
+ * $Id: dat_init.h,v 1.16 2005/03/24 05:58:27 jlentini Exp $
+ **********************************************************************/
+
+#ifndef _DAT_INIT_H_
+#define _DAT_INIT_H_
+
+#include "dat_osd.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Enumerations                                                      *
+ *                                                                   *
+ *********************************************************************/
+
+typedef enum
+{
+    DAT_MODULE_STATE_UNINITIALIZED,
+    DAT_MODULE_STATE_INITIALIZING,
+    DAT_MODULE_STATE_INITIALIZED,
+    DAT_MODULE_STATE_DEINITIALIZING,
+    DAT_MODULE_STATE_DEINITIALIZED
+} DAT_MODULE_STATE;
+
+/*********************************************************************
+ *                                                                   *
+ * Function Prototypes                                               *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_MODULE_STATE
+dat_module_get_state ( void ) ;
+
+#if defined(_MSC_VER) || defined(_WIN64) || defined(_WIN32)
+/* NT. MSC compiler, Win32/64 platform */
+void
+dat_init ( void );
+
+void
+dat_fini ( void );
+
+#else /* GNU C */
+
+void
+dat_init ( void ) __attribute__ ((constructor));
+
+void
+dat_fini ( void ) __attribute__ ((destructor));
+#endif
+
+extern DAT_RETURN 
+dats_handle_vector_init ( void );
+
+extern DAT_IA_HANDLE
+dats_set_ia_handle (
+	IN  DAT_IA_HANDLE		ia_handle);
+
+extern DAT_RETURN 
+dats_get_ia_handle(
+	IN	DAT_IA_HANDLE		handle,
+	OUT	DAT_IA_HANDLE		*ia_handle_p);
+
+extern DAT_BOOLEAN
+dats_is_ia_handle (
+	IN  DAT_HANDLE          	dat_handle);
+
+extern DAT_RETURN 
+dats_free_ia_handle(
+	IN	DAT_IA_HANDLE		handle);
+
+#endif
diff --git a/dat/common/dat_sr.c b/dat/common/dat_sr.c
new file mode 100755
index 0000000..95b9333
--- /dev/null
+++ b/dat/common/dat_sr.c
@@ -0,0 +1,447 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_sr.c
+ *
+ * PURPOSE: static registry implementation
+ *
+ * $Id: dat_sr.c,v 1.17 2005/03/24 05:58:27 jlentini Exp $
+ **********************************************************************/
+
+#include "dat_sr.h"
+
+#include "dat_dictionary.h"
+#include "udat_sr_parser.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Global Variables                                                  *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_OS_LOCK g_sr_lock;
+static DAT_DICTIONARY *g_sr_dictionary = NULL;
+
+/*********************************************************************
+ *                                                                   *
+ * External Functions                                                *
+ *                                                                   *
+ *********************************************************************/
+
+//***********************************************************************
+// Function: dat_sr_init
+//***********************************************************************
+
+DAT_RETURN dat_sr_init(void)
+{
+	DAT_RETURN status;
+
+	status = dat_os_lock_init(&g_sr_lock);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	status = dat_dictionary_create(&g_sr_dictionary);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	/*
+	 * Since DAT allows providers to be loaded by either the static
+	 * registry or explicitly through OS dependent methods, do not
+	 * return an error if no providers are loaded via the static registry.
+	 */
+
+	(void)dat_sr_load();
+
+	return DAT_SUCCESS;
+}
+
+//***********************************************************************
+// Function: dat_sr_fini
+//***********************************************************************
+
+extern DAT_RETURN dat_sr_fini(void)
+{
+	DAT_RETURN status;
+
+	status = dat_os_lock_destroy(&g_sr_lock);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	status = dat_dictionary_destroy(g_sr_dictionary);
+	if (DAT_SUCCESS != status) {
+		return status;
+	}
+
+	return DAT_SUCCESS;
+}
+
+//***********************************************************************
+// Function: dat_sr_insert
+//***********************************************************************
+
+extern DAT_RETURN
+dat_sr_insert(IN const DAT_PROVIDER_INFO * info, IN DAT_SR_ENTRY * entry)
+{
+	DAT_RETURN status;
+	DAT_SR_ENTRY *data;
+	DAT_OS_SIZE lib_path_size;
+	DAT_OS_SIZE lib_path_len;
+	DAT_OS_SIZE ia_params_size;
+	DAT_OS_SIZE ia_params_len;
+	DAT_DICTIONARY_ENTRY dict_entry;
+	DAT_DICTIONARY_DATA prev_data;
+
+	if (NULL == (data = dat_os_alloc(sizeof(DAT_SR_ENTRY)))) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_os_memset(data, '\0', sizeof(DAT_SR_ENTRY));
+
+	lib_path_len = strlen(entry->lib_path);
+	lib_path_size = (lib_path_len + 1) * sizeof(char);
+
+	if (NULL == (data->lib_path = dat_os_alloc(lib_path_size))) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_os_strncpy(data->lib_path, entry->lib_path, lib_path_len);
+	data->lib_path[lib_path_len] = '\0';
+
+	ia_params_len = strlen(entry->ia_params);
+	ia_params_size = (ia_params_len + 1) * sizeof(char);
+
+	if (NULL == (data->ia_params = dat_os_alloc(ia_params_size))) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto bail;
+	}
+
+	dat_os_strncpy(data->ia_params, entry->ia_params, ia_params_len);
+	data->ia_params[ia_params_len] = '\0';
+
+	data->info = entry->info;
+	data->lib_handle = entry->lib_handle;
+	data->ref_count = entry->ref_count;
+	data->next = NULL;
+
+	dict_entry = NULL;
+	status = dat_dictionary_entry_create(&dict_entry);
+	if (DAT_SUCCESS != status) {
+		goto bail;
+	}
+
+	dat_os_lock(&g_sr_lock);
+
+	status = dat_dictionary_search(g_sr_dictionary, info, &prev_data);
+	if (DAT_SUCCESS == status) {
+		/* We already have a dictionary entry, so we don't need a new one.
+		 * This means there are multiple duplicate names in dat.conf,
+		 * but presumably they have different paths. Simply link the
+		 * new entry at the end of the chain of like-named entries.
+		 */
+		(void)dat_dictionary_entry_destroy(dict_entry);
+		dict_entry = NULL;
+
+		/* Find the next available slot in this chain */
+		while (NULL != ((DAT_SR_ENTRY *) prev_data)->next) {
+			prev_data = ((DAT_SR_ENTRY *) prev_data)->next;
+		}
+		dat_os_assert(NULL != prev_data);
+		((DAT_SR_ENTRY *) prev_data)->next = data;
+	} else {
+		status = dat_dictionary_insert(g_sr_dictionary,
+					       dict_entry,
+					       info,
+					       (DAT_DICTIONARY_DATA *) data);
+	}
+
+	dat_os_unlock(&g_sr_lock);
+
+      bail:
+	if (DAT_SUCCESS != status) {
+		if (NULL != data) {
+			if (NULL != data->lib_path) {
+				dat_os_free(data->lib_path, lib_path_size);
+			}
+
+			if (NULL != data->ia_params) {
+				dat_os_free(data->ia_params, ia_params_size);
+			}
+
+			dat_os_free(data, sizeof(DAT_SR_ENTRY));
+		}
+
+		if (NULL != dict_entry) {
+			(void)dat_dictionary_entry_destroy(dict_entry);
+		}
+	}
+
+	return status;
+}
+
+//***********************************************************************
+// Function: dat_sr_size
+//***********************************************************************
+
+extern DAT_RETURN dat_sr_size(OUT DAT_COUNT * size)
+{
+	return dat_dictionary_size(g_sr_dictionary, size);
+}
+
+//***********************************************************************
+// Function: dat_sr_list
+//***********************************************************************
+
+extern DAT_RETURN
+dat_sr_list(IN DAT_COUNT max_to_return,
+	    OUT DAT_COUNT * entries_returned,
+	    OUT DAT_PROVIDER_INFO * (dat_provider_list[]))
+{
+	DAT_SR_ENTRY **array;
+	DAT_COUNT array_size;
+	DAT_COUNT i;
+	DAT_RETURN status;
+
+	array = NULL;
+	status = DAT_SUCCESS;
+
+	/* The dictionary size may increase between the call to      */
+	/* dat_dictionary_size() and dat_dictionary_enumerate().     */
+	/* Therefore we loop until a successful enumeration is made. */
+	*entries_returned = 0;
+	for (;;) {
+		status = dat_dictionary_size(g_sr_dictionary, &array_size);
+		if (DAT_SUCCESS != status) {
+			goto bail;
+		}
+
+		if (array_size == 0) {
+			status = DAT_SUCCESS;
+			goto bail;
+		}
+
+		array = dat_os_alloc(array_size * sizeof(DAT_SR_ENTRY *));
+		if (array == NULL) {
+			status =
+			    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
+				      DAT_RESOURCE_MEMORY);
+			goto bail;
+		}
+
+		dat_os_lock(&g_sr_lock);
+
+		status = dat_dictionary_enumerate(g_sr_dictionary,
+						  (DAT_DICTIONARY_DATA *) array,
+						  array_size);
+
+		dat_os_unlock(&g_sr_lock);
+
+		if (DAT_SUCCESS == status) {
+			break;
+		} else {
+			dat_os_free(array, array_size * sizeof(DAT_SR_ENTRY *));
+			array = NULL;
+			continue;
+		}
+	}
+
+	for (i = 0; (i < max_to_return) && (i < array_size); i++) {
+		if (NULL == dat_provider_list[i]) {
+			status =
+			    DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+			goto bail;
+		}
+
+		*dat_provider_list[i] = array[i]->info;
+	}
+
+	*entries_returned = i;
+
+      bail:
+	if (NULL != array) {
+		dat_os_free(array, array_size * sizeof(DAT_SR_ENTRY *));
+	}
+
+	return status;
+}
+
+//***********************************************************************
+// Function: dat_sr_provider_open
+//***********************************************************************
+
+extern DAT_RETURN dat_sr_provider_open(IN const DAT_PROVIDER_INFO * info)
+{
+	DAT_RETURN status;
+	DAT_SR_ENTRY *data;
+	DAT_DICTIONARY_DATA dict_data;
+
+	dat_os_lock(&g_sr_lock);
+
+	status = dat_dictionary_search(g_sr_dictionary, info, &dict_data);
+
+	if (DAT_SUCCESS == status) {
+		data = (DAT_SR_ENTRY *) dict_data;
+		while (data != NULL) {
+			if (0 == data->ref_count) {
+				/*
+				 * Try to open the path. If it fails, try the next
+				 * path in the chain. Only the first successful library
+				 * open matters, the others will be unused.
+				 */
+				dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+						 "DAT Registry: IA %s, trying to load library %s\n",
+						 data->info.ia_name,
+						 data->lib_path);
+
+				status = dat_os_library_load(data->lib_path,
+							     &data->lib_handle);
+
+				if (status == DAT_SUCCESS) {
+#ifdef DAT_DBG
+					dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+							 "DAT2 Registry: IA %s, loaded library %s\n",
+							 data->info.ia_name,
+							 data->lib_path);
+#endif
+					data->ref_count++;
+					data->init_func =
+					    dat_os_library_sym(data->lib_handle,
+							       DAT_PROVIDER_INIT_FUNC_STR);
+					data->fini_func =
+					    dat_os_library_sym(data->lib_handle,
+							       DAT_PROVIDER_FINI_FUNC_STR);
+					/* Warning: DAT and DAPL libraries not ext compatible */
+#ifdef DAT_EXTENSIONS
+					{
+						void *fncptr;
+
+						fncptr =
+						    dat_os_library_sym(data->
+								       lib_handle,
+								       "dapl_extensions");
+
+						if ((dat_os_library_error() !=
+						     NULL)
+						    || (fncptr == NULL)) {
+							dat_os_dbg_print
+							    (DAT_OS_DBG_TYPE_SR,
+							     "DAT Registry: WARNING: library %s, "
+							     "extended DAT expected extended uDAPL: %s\n",
+							     data->lib_path,
+							     strerror(errno));
+						}
+					}
+#endif
+					if (NULL != data->init_func) {
+						(*data->init_func) (&data->info,
+								    data->
+								    ia_params);
+					} else {
+						dat_os_dbg_print
+						    (DAT_OS_DBG_TYPE_SR,
+						     "DAT Registry: Cannot find library init func (%s)\n",
+						     DAT_PROVIDER_INIT_FUNC_STR);
+					}
+
+					/* exit after we find the first valid entry */
+					break;
+				} else {
+					dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+							 "DAT Registry: static registry unable to "
+							 "load library %s\n",
+							 data->lib_path);
+				}
+			} else {
+				data->ref_count++;
+				break;
+			}
+			data = data->next;
+		}
+	}
+
+	dat_os_unlock(&g_sr_lock);
+
+	return status;
+}
+
+//***********************************************************************
+// Function: dat_sr_provider_close
+//***********************************************************************
+
+extern DAT_RETURN dat_sr_provider_close(IN const DAT_PROVIDER_INFO * info)
+{
+	DAT_RETURN status;
+	DAT_SR_ENTRY *data;
+	DAT_DICTIONARY_DATA dict_data;
+
+	dat_os_lock(&g_sr_lock);
+
+	status = dat_dictionary_search(g_sr_dictionary, info, &dict_data);
+
+	if (DAT_SUCCESS == status) {
+		data = (DAT_SR_ENTRY *) dict_data;
+		while (data != NULL) {
+			if (1 == data->ref_count) {
+				dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+						 "DAT Registry: IA %s, unloading library %s\n",
+						 data->info.ia_name,
+						 data->lib_path);
+
+				if (NULL != data->fini_func) {
+					(*data->fini_func) (&data->info);
+				}
+
+				status =
+				    dat_os_library_unload(data->lib_handle);
+				if (status == DAT_SUCCESS) {
+					data->ref_count--;
+				}
+				break;
+			} else if (data->ref_count > 0) {
+				data->ref_count--;
+				break;
+			}
+			data = data->next;
+		}
+	}
+
+	dat_os_unlock(&g_sr_lock);
+
+	return status;
+}
diff --git a/dat/common/dat_sr.h b/dat/common/dat_sr.h
new file mode 100644
index 0000000..86be8a0
--- /dev/null
+++ b/dat/common/dat_sr.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dat_sr.h
+ *
+ * PURPOSE: static registry (SR) inteface declarations
+ *
+ * $Id: dat_sr.h,v 1.12 2005/03/24 05:58:28 jlentini Exp $
+ **********************************************************************/
+
+#ifndef _DAT_SR_H_
+#define _DAT_SR_H_
+
+
+#include <dat2/udat.h>
+#include <dat2/dat_registry.h>
+
+#include "dat_osd.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Strucutres                                                        *
+ *                                                                   *
+ *********************************************************************/
+
+typedef struct DAT_SR_ENTRY
+{
+    DAT_PROVIDER_INFO 		info;
+    char * 			lib_path;
+    char * 			ia_params;
+    DAT_OS_LIBRARY_HANDLE 	lib_handle;
+    DAT_PROVIDER_INIT_FUNC 	init_func;
+    DAT_PROVIDER_FINI_FUNC	fini_func;
+    DAT_COUNT 			ref_count;
+    struct DAT_SR_ENTRY         *next;
+} DAT_SR_ENTRY;
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Declarations                                             *
+ *                                                                   *
+ *********************************************************************/
+
+extern DAT_RETURN
+dat_sr_init ( void );
+
+extern DAT_RETURN
+dat_sr_fini ( void );
+
+extern DAT_RETURN
+dat_sr_insert (
+    IN  const DAT_PROVIDER_INFO *info,
+    IN  DAT_SR_ENTRY 		*entry );
+
+extern DAT_RETURN
+dat_sr_size (
+    OUT DAT_COUNT               *size);
+
+extern DAT_RETURN
+dat_sr_list (
+    IN  DAT_COUNT               max_to_return,
+    OUT DAT_COUNT               *entries_returned,
+    OUT DAT_PROVIDER_INFO       * (dat_provider_list[]) );
+
+extern DAT_RETURN
+dat_sr_provider_open (
+    IN  const DAT_PROVIDER_INFO *info );
+
+extern DAT_RETURN
+dat_sr_provider_close (
+    IN  const DAT_PROVIDER_INFO *info );
+
+
+#endif
diff --git a/dat/common/dat_strerror.c b/dat/common/dat_strerror.c
new file mode 100644
index 0000000..4480bef
--- /dev/null
+++ b/dat/common/dat_strerror.c
@@ -0,0 +1,611 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_strerror.c
+ *
+ * PURPOSE: Convert DAT_RETURN values to humman readable string
+ *
+ * $Id: dat_strerror.c,v 1.10 2005/03/24 05:58:28 jlentini Exp $
+ **********************************************************************/
+
+#ifdef __KDAPL__
+#include <dat2/kdat.h>
+#else /*__UDAPL__*/
+#include <dat2/udat.h>
+#endif				/* __UDAPL__ */
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Declarations                                    *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_RETURN
+dat_strerror_major(IN DAT_RETURN value, OUT const char **message);
+
+static DAT_RETURN
+dat_strerror_minor(IN DAT_RETURN value, OUT const char **message);
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_RETURN
+dat_strerror_major(IN DAT_RETURN value, OUT const char **message)
+{
+	switch (DAT_GET_TYPE(value)) {
+	case DAT_SUCCESS:
+		{
+			*message = "DAT_SUCCESS";
+			return DAT_SUCCESS;
+		}
+	case DAT_ABORT:
+		{
+			*message = "DAT_ABORT";
+			return DAT_SUCCESS;
+		}
+	case DAT_CONN_QUAL_IN_USE:
+		{
+			*message = "DAT_CONN_QUAL_IN_USE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INSUFFICIENT_RESOURCES:
+		{
+			*message = "DAT_INSUFFICIENT_RESOURCES";
+			return DAT_SUCCESS;
+		}
+	case DAT_INTERNAL_ERROR:
+		{
+			*message = "DAT_INTERNAL_ERROR";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE:
+		{
+			*message = "DAT_INVALID_HANDLE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_PARAMETER:
+		{
+			*message = "DAT_INVALID_PARAMETER";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE:
+		{
+			*message = "DAT_INVALID_STATE";
+			return DAT_SUCCESS;
+		}
+	case DAT_LENGTH_ERROR:
+		{
+			*message = "DAT_LENGTH_ERROR";
+			return DAT_SUCCESS;
+		}
+	case DAT_MODEL_NOT_SUPPORTED:
+		{
+			*message = "DAT_MODEL_NOT_SUPPORTED";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROVIDER_NOT_FOUND:
+		{
+			*message = "DAT_PROVIDER_NOT_FOUND";
+			return DAT_SUCCESS;
+		}
+	case DAT_PRIVILEGES_VIOLATION:
+		{
+			*message = "DAT_PRIVILEGES_VIOLATION";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROTECTION_VIOLATION:
+		{
+			*message = "DAT_PROTECTION_VIOLATION";
+			return DAT_SUCCESS;
+		}
+	case DAT_QUEUE_EMPTY:
+		{
+			*message = "DAT_QUEUE_EMPTY";
+			return DAT_SUCCESS;
+		}
+	case DAT_QUEUE_FULL:
+		{
+			*message = "DAT_QUEUE_FULL";
+			return DAT_SUCCESS;
+		}
+	case DAT_TIMEOUT_EXPIRED:
+		{
+			*message = "DAT_TIMEOUT_EXPIRED";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROVIDER_ALREADY_REGISTERED:
+		{
+			*message = "DAT_PROVIDER_ALREADY_REGISTERED";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROVIDER_IN_USE:
+		{
+			*message = "DAT_PROVIDER_IN_USE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ADDRESS:
+		{
+			*message = "DAT_INVALID_ADDRESS";
+			return DAT_SUCCESS;
+		}
+	case DAT_INTERRUPTED_CALL:
+		{
+			*message = "DAT_INTERRUPTED_CALL";
+			return DAT_SUCCESS;
+		}
+	case DAT_NOT_IMPLEMENTED:
+		{
+			*message = "DAT_NOT_IMPLEMENTED";
+			return DAT_SUCCESS;
+		}
+	default:
+		{
+			*message = "unknown error";
+			return DAT_INVALID_PARAMETER;
+		}
+	}
+}
+
+static DAT_RETURN
+dat_strerror_minor(IN DAT_RETURN value, OUT const char **message)
+{
+	switch (DAT_GET_SUBTYPE(value)) {
+
+	case DAT_NO_SUBTYPE:	/* NO subtype */
+		{
+			*message = "";
+			return DAT_SUCCESS;
+		}
+	case DAT_SUB_INTERRUPTED:
+		{
+			*message = "DAT_SUB_INTERRUPTED";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_MEMORY:
+		{
+			*message = "DAT_RESOURCE_MEMORY";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_DEVICE:
+		{
+			*message = "DAT_RESOURCE_DEVICE";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_TEP:
+		{
+			*message = "DAT_RESOURCE_TEP";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_TEVD:
+		{
+			*message = "DAT_RESOURCE_TEVD";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_PROTECTION_DOMAIN:
+		{
+			*message = "DAT_RESOURCE_PROTECTION_DOMAIN";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_MEMORY_REGION:
+		{
+			*message = "DAT_RESOURCE_MEMORY_REGION";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_ERROR_HANDLER:
+		{
+			*message = "DAT_RESOURCE_ERROR_HANDLER";
+			return DAT_SUCCESS;
+		}
+	case DAT_RESOURCE_CREDITS:
+		{
+			*message = "DAT_RESOURCE_CREDITS";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_IA:
+		{
+			*message = "DAT_INVALID_HANDLE_IA";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_EP:
+		{
+			*message = "DAT_INVALID_HANDLE_EP";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_LMR:
+		{
+			*message = "DAT_INVALID_HANDLE_LMR";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_RMR:
+		{
+			*message = "DAT_INVALID_HANDLE_RMR";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_PZ:
+		{
+			*message = "DAT_INVALID_HANDLE_PZ";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_PSP:
+		{
+			*message = "DAT_INVALID_HANDLE_PSP";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_RSP:
+		{
+			*message = "DAT_INVALID_HANDLE_RSP";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_CR:
+		{
+			*message = "DAT_INVALID_HANDLE_CR";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_CNO:
+		{
+			*message = "DAT_INVALID_HANDLE_CNO";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_EVD_CR:
+		{
+			*message = "DAT_INVALID_HANDLE_EVD_CR";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_EVD_REQUEST:
+		{
+			*message = "DAT_INVALID_HANDLE_EVD_REQUEST";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_EVD_RECV:
+		{
+			*message = "DAT_INVALID_HANDLE_EVD_RECV";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_EVD_CONN:
+		{
+			*message = "DAT_INVALID_HANDLE_EVD_CONN";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_HANDLE_EVD_ASYNC:
+		{
+			*message = "DAT_INVALID_HANDLE_EVD_ASYNC";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG1:
+		{
+			*message = "DAT_INVALID_ARG1";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG2:
+		{
+			*message = "DAT_INVALID_ARG2";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG3:
+		{
+			*message = "DAT_INVALID_ARG3";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG4:
+		{
+			*message = "DAT_INVALID_ARG4";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG5:
+		{
+			*message = "DAT_INVALID_ARG5";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG6:
+		{
+			*message = "DAT_INVALID_ARG6";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG7:
+		{
+			*message = "DAT_INVALID_ARG7";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG8:
+		{
+			*message = "DAT_INVALID_ARG8";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG9:
+		{
+			*message = "DAT_INVALID_ARG9";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ARG10:
+		{
+			*message = "DAT_INVALID_ARG10";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_UNCONNECTED:
+		{
+			*message = "DAT_INVALID_STATE_EP_UNCONNECTED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_ACTCONNPENDING:
+		{
+			*message = "DAT_INVALID_STATE_EP_ACTCONNPENDING";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_PASSCONNPENDING:
+		{
+			*message = "DAT_INVALID_STATE_EP_PASSCONNPENDING";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_TENTCONNPENDING:
+		{
+			*message = "DAT_INVALID_STATE_EP_TENTCONNPENDING";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_CONNECTED:
+		{
+			*message = "DAT_INVALID_STATE_EP_CONNECTED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_DISCONNECTED:
+		{
+			*message = "DAT_INVALID_STATE_EP_DISCONNECTED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_RESERVED:
+		{
+			*message = "DAT_INVALID_STATE_EP_RESERVED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_COMPLPENDING:
+		{
+			*message = "DAT_INVALID_STATE_EP_COMPLPENDING";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_DISCPENDING:
+		{
+			*message = "DAT_INVALID_STATE_EP_DISCPENDING";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_PROVIDERCONTROL:
+		{
+			*message = "DAT_INVALID_STATE_EP_PROVIDERCONTROL";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EP_NOTREADY:
+		{
+			*message = "DAT_INVALID_STATE_EP_NOTREADY";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_CNO_IN_USE:
+		{
+			*message = "DAT_INVALID_STATE_CNO_IN_USE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_CNO_DEAD:
+		{
+			*message = "DAT_INVALID_STATE_CNO_DEAD";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_OPEN:
+		{
+			*message = "DAT_INVALID_STATE_EVD_OPEN";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_ENABLED:
+		{
+			*message = "DAT_INVALID_STATE_EVD_ENABLED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_DISABLED:
+		{
+			*message = "DAT_INVALID_STATE_EVD_DISABLED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_WAITABLE:
+		{
+			*message = "DAT_INVALID_STATE_EVD_WAITABLE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_UNWAITABLE:
+		{
+			*message = "DAT_INVALID_STATE_EVD_UNWAITABLE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_IN_USE:
+		{
+			*message = "DAT_INVALID_STATE_EVD_IN_USE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_CONFIG_NOTIFY:
+		{
+			*message = "DAT_INVALID_STATE_EVD_CONFIG_NOTIFY";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_CONFIG_SOLICITED:
+		{
+			*message = "DAT_INVALID_STATE_EVD_CONFIG_SOLICITED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_CONFIG_THRESHOLD:
+		{
+			*message = "DAT_INVALID_STATE_EVD_CONFIG_THRESHOLD";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_WAITER:
+		{
+			*message = "DAT_INVALID_STATE_EVD_WAITER";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_EVD_ASYNC:
+		{
+			*message = "DAT_INVALID_STATE_EVD_ASYNC";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_IA_IN_USE:
+		{
+			*message = "DAT_INVALID_STATE_IA_IN_USE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_LMR_IN_USE:
+		{
+			*message = "DAT_INVALID_STATE_LMR_IN_USE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_LMR_FREE:
+		{
+			*message = "DAT_INVALID_STATE_LMR_FREE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_PZ_IN_USE:
+		{
+			*message = "DAT_INVALID_STATE_PZ_IN_USE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_STATE_PZ_FREE:
+		{
+			*message = "DAT_INVALID_STATE_PZ_FREE";
+			return DAT_SUCCESS;
+		}
+	case DAT_PRIVILEGES_READ:
+		{
+			*message = "DAT_PRIVILEGES_READ";
+			return DAT_SUCCESS;
+		}
+	case DAT_PRIVILEGES_WRITE:
+		{
+			*message = "DAT_PRIVILEGES_WRITE";
+			return DAT_SUCCESS;
+		}
+	case DAT_PRIVILEGES_RDMA_READ:
+		{
+			*message = "DAT_PRIVILEGES_RDMA_READ";
+			return DAT_SUCCESS;
+		}
+	case DAT_PRIVILEGES_RDMA_WRITE:
+		{
+			*message = "DAT_PRIVILEGES_RDMA_WRITE";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROTECTION_READ:
+		{
+			*message = "DAT_PROTECTION_READ";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROTECTION_WRITE:
+		{
+			*message = "DAT_PROTECTION_WRITE";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROTECTION_RDMA_READ:
+		{
+			*message = "DAT_PROTECTION_RDMA_READ";
+			return DAT_SUCCESS;
+		}
+	case DAT_PROTECTION_RDMA_WRITE:
+		{
+			*message = "DAT_PROTECTION_RDMA_WRITE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ADDRESS_UNSUPPORTED:
+		{
+			*message = "DAT_INVALID_ADDRESS_UNSUPPORTED";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ADDRESS_UNREACHABLE:
+		{
+			*message = "DAT_INVALID_ADDRESS_UNREACHABLE";
+			return DAT_SUCCESS;
+		}
+	case DAT_INVALID_ADDRESS_MALFORMED:
+		{
+			*message = "DAT_INVALID_ADDRESS_MALFORMED";
+			return DAT_SUCCESS;
+		}
+	case DAT_NAME_NOT_REGISTERED:
+		{
+			*message = "DAT_NAME_NOT_REGISTERED";
+			return DAT_SUCCESS;
+		}
+	case DAT_MAJOR_NOT_FOUND:
+		{
+			*message = "DAT_MAJOR_NOT_FOUND";
+			return DAT_SUCCESS;
+		}
+	case DAT_MINOR_NOT_FOUND:
+		{
+			*message = "DAT_MINOR_NOT_FOUND";
+			return DAT_SUCCESS;
+		}
+	case DAT_THREAD_SAFETY_NOT_FOUND:
+		{
+			*message = "DAT_THREAD_SAFETY_NOT_FOUND";
+			return DAT_SUCCESS;
+		}
+	default:
+		{
+			*message = "unknown minor error";
+			return DAT_INVALID_PARAMETER;
+		}
+	}
+}
+
+/*********************************************************************
+ *                                                                   *
+ * External Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_RETURN DAT_API
+dat_strerror(IN DAT_RETURN value,
+	     OUT const char **major_message, OUT const char **minor_message)
+{
+	/*
+	 * The DAT specification contains a note to implementers
+	 * suggesting that the consumer's DAT_RETURN value be used
+	 * as an index into a table of text strings. However,
+	 * the DAT_RETURN values are not consecutive. Therefore this
+	 * implementation does not follow the suggested implementation.
+	 */
+
+	if (DAT_SUCCESS != dat_strerror_major(value, major_message)) {
+		return DAT_INVALID_PARAMETER;
+	} else if (minor_message != NULL) {
+		if (DAT_SUCCESS != dat_strerror_minor(value, minor_message)) {
+			return DAT_INVALID_PARAMETER;
+		}
+	}
+
+	return DAT_SUCCESS;
+}
diff --git a/dat/include/dat2/dat.h b/dat/include/dat2/dat.h
new file mode 100755
index 0000000..cf0b7ec
--- /dev/null
+++ b/dat/include/dat2/dat.h
@@ -0,0 +1,1379 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/***************************************************************
+ *
+ * HEADER: dat.h
+ *
+ * PURPOSE: defines the common DAT API for uDAPL and kDAPL.
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 2.0"
+ *
+ * Mapping rules:
+ *      All global symbols are prepended with DAT_ or dat_
+ *      All DAT objects have an 'api' tag which, such as 'EP' or 'LMR'
+ *      The method table is in the provider definition structure.
+ *
+ *
+ ***************************************************************/
+#ifndef _DAT_H_
+#define _DAT_H_
+
+#include <dat2/dat_error.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* Generic DAT types */
+
+typedef char *  DAT_NAME_PTR;	/* Format for ia_name and attributes */
+#define DAT_NAME_MAX_LENGTH     256
+
+/*
+ * Used for provider, vendor, transport, hardware-specific attributes
+ * definitions.
+ */
+
+typedef struct dat_named_attr
+{
+    const char                  * name;      /* Name of attribute */
+    const char                  * value;     /* Value of attribute */
+} DAT_NAMED_ATTR;
+
+typedef enum dat_boolean
+{
+    DAT_FALSE                        = 0,
+    DAT_TRUE                         = 1
+} DAT_BOOLEAN;
+
+#ifdef DAT_EXTENSIONS
+#define DAT_IB_EXTENSION 1
+#define DAT_IW_EXTENSION 2
+#endif /* DAT_EXTENSIONS */
+
+typedef DAT_UINT32 DAT_HA_LB;
+#define DAT_HA_LB_NONE		(DAT_HA_LB)0
+#define DAT_HA_LB_INTERCOMM 	(DAT_HA_LB)1
+#define DAT_HA_LB_INTRACOMM 	(DAT_HA_LB)2
+
+typedef union dat_context
+{
+    DAT_PVOID                   as_ptr;
+    DAT_UINT64                  as_64;
+    DAT_UVERYLONG               as_index;
+} DAT_CONTEXT;
+
+typedef DAT_CONTEXT     DAT_DTO_COOKIE;
+typedef DAT_CONTEXT     DAT_RMR_COOKIE;
+
+typedef enum dat_completion_flags
+{
+	/* Completes with notification                                     */
+    DAT_COMPLETION_DEFAULT_FLAG      = 0x00,
+	/* Completions suppressed if successful                            */
+    DAT_COMPLETION_SUPPRESS_FLAG     = 0x01,
+	/* Sender controlled notification for recv completion              */
+    DAT_COMPLETION_SOLICITED_WAIT_FLAG = 0x02,
+	/* Completions with unsignaled notifications                       */
+    DAT_COMPLETION_UNSIGNALLED_FLAG  = 0x04,
+	/* Do not start processing until all previous RDMA reads complete. */
+    DAT_COMPLETION_BARRIER_FENCE_FLAG = 0x08,
+        /* Only valid for uDAPL as EP attribute for Recv Completion flags.
+         * Waiter unblocking is controlled by the Threshold value of
+	 * dat_evd_wait. UNSIGNALLED for RECV is not allowed when EP has
+	 * this attribute. */
+    DAT_COMPLETION_EVD_THRESHOLD_FLAG = 0x10,
+        /* Only valid for kDAPL
+	 * Do not start processing LMR invalidate until all
+	 * previously posted DTOs to the EP Request Queue
+	 * have been completed.
+	 * The value for LMR Invalidate Fence does not
+	 * conflict with uDAPL so it can be extended
+	 * to uDAPL usage later.
+	 */
+     DAT_COMPLETION_LMR_INVALIDATE_FENCE_FLAG = 0x20
+} DAT_COMPLETION_FLAGS;
+
+
+typedef DAT_UINT32       DAT_TIMEOUT;		 /* microseconds */
+
+/* timeout = infinity */
+#define DAT_TIMEOUT_INFINITE    ((DAT_TIMEOUT) ~0)
+
+/* dat handles */
+typedef DAT_PVOID        DAT_HANDLE;
+typedef DAT_HANDLE       DAT_CR_HANDLE;
+typedef DAT_HANDLE       DAT_EP_HANDLE;
+typedef DAT_HANDLE       DAT_EVD_HANDLE;
+typedef DAT_HANDLE       DAT_IA_HANDLE;
+typedef DAT_HANDLE       DAT_LMR_HANDLE;
+typedef DAT_HANDLE       DAT_PSP_HANDLE;
+typedef DAT_HANDLE       DAT_PZ_HANDLE;
+typedef DAT_HANDLE       DAT_RMR_HANDLE;
+typedef DAT_HANDLE       DAT_RSP_HANDLE;
+typedef DAT_HANDLE       DAT_SRQ_HANDLE;
+typedef DAT_HANDLE       DAT_CSP_HANDLE;
+
+typedef enum dat_dtos
+{
+        DAT_DTO_SEND,
+	DAT_DTO_RDMA_WRITE,
+	DAT_DTO_RDMA_READ,
+	DAT_DTO_RECEIVE,
+	DAT_DTO_RECEIVE_WITH_INVALIDATE,
+	DAT_DTO_BIND_MW,  /* DAT 2.0 review, binds are reported via DTO events */
+	DAT_DTO_LMR_FMR, 		/* kdat specific		*/
+	DAT_DTO_LMR_INVALIDATE	/* kdat specific		*/
+#ifdef DAT_EXTENSIONS
+	,DAT_DTO_EXTENSION_BASE /* To be used by DAT extensions
+				   as a starting point of extension DTOs */
+#endif /* DAT_EXTENSIONS */
+} DAT_DTOS;
+
+
+/* dat NULL handles */
+#define DAT_HANDLE_NULL ((DAT_HANDLE)NULL)
+
+typedef DAT_SOCK_ADDR* DAT_IA_ADDRESS_PTR;
+
+typedef DAT_UINT64      DAT_CONN_QUAL;
+typedef DAT_UINT64      DAT_PORT_QUAL;
+
+/* QOS definitions */
+typedef enum dat_qos
+{
+    DAT_QOS_BEST_EFFORT              = 0x00,
+    DAT_QOS_HIGH_THROUGHPUT          = 0x01,
+    DAT_QOS_LOW_LATENCY              = 0x02,
+        /* not low latency, nor high throughput */
+    DAT_QOS_ECONOMY                  = 0x04,
+        /* both low latency and high throughput */
+    DAT_QOS_PREMIUM                  = 0x08
+} DAT_QOS;
+
+/*
+ * FLAGS
+ */
+
+/* for backward compatibility */
+#define DAT_CONNECT_MULTIPATH_REQUESTED_FLAG	DAT_CONNECT_MULTIPATH_FLAG
+
+typedef enum dat_connect_flags
+{
+    DAT_CONNECT_DEFAULT_FLAG         		= 0x00,
+    DAT_CONNECT_MULTIPATH_REQUESTED_FLAG	= 0x01,
+    DAT_CONNECT_MULTIPATH_REQUIRED_FLAG		= 0x02
+} DAT_CONNECT_FLAGS;
+
+typedef enum dat_close_flags
+{
+    DAT_CLOSE_ABRUPT_FLAG            = 0x00,
+    DAT_CLOSE_GRACEFUL_FLAG          = 0x01
+} DAT_CLOSE_FLAGS;
+
+#define DAT_CLOSE_DEFAULT DAT_CLOSE_ABRUPT_FLAG
+
+typedef enum dat_evd_flags
+{
+    DAT_EVD_SOFTWARE_FLAG            = 0x001,
+    DAT_EVD_CR_FLAG                  = 0x010,
+    DAT_EVD_DTO_FLAG                 = 0x020,
+    DAT_EVD_CONNECTION_FLAG          = 0x040,
+    DAT_EVD_RMR_BIND_FLAG            = 0x080,
+    DAT_EVD_ASYNC_FLAG               = 0x100,
+
+        /* DAT events only, no software events */
+    DAT_EVD_DEFAULT_FLAG             = 0x1F0
+#ifdef DAT_EXTENSIONS
+/* To be used by DAT extensions as a starting point for extended evd flags */
+    ,DAT_EVD_EXTENSION_BASE	     = 0x200
+#endif /* DAT_EXTENSIONS */
+} DAT_EVD_FLAGS;
+
+typedef enum dat_psp_flags
+{
+    DAT_PSP_CONSUMER_FLAG            = 0x00, /* Consumer creates an Endpoint */
+    DAT_PSP_PROVIDER_FLAG            = 0x01  /* Provider creates an Endpoint */
+} DAT_PSP_FLAGS;
+
+/*
+ * Memory Buffers
+ *
+ * Both LMR and RMR triplets specify 64-bit addresses in the local host's byte
+ * order, even when that exceeds the size of a DAT_PVOID for the host
+ * architecture.
+ */
+
+/*
+ * Both LMR and RMR Triplets specify 64-bit addresses in the local host
+ * order, even when that exceeds the size of a void pointer for the host
+ * architecture. The DAT_VADDR type that represents addresses is in the
+ * native byte-order of the local host. Helper macros that allow Consumers
+ * to convert DAT_VADDR into various orders that might be useful for
+ * inclusion of RMR Triplets into a payload of a message follow.
+ *
+ * DAT defines the following macros to convert the fields on an RMR Triplet
+ * to defined byte orders to allow their export by the Consumer over wire
+ * protocols. DAT does not define how the two peers decide which byte should be
+ * used.
+ *
+ * DAT_LMRC_TO_LSB(lmrc) returns the supplied LMR Context in ls-byte
+ * order.
+ * DAT_LMRC_TO_MSB(lmrc) returns the supplied LMR Context in ms-byte
+ * order.
+ * DAT_RMRC_TO_LSB(rmrc) returns the supplied RMR Context in ls-byte
+ * order.
+ * DAT_RMRC_TO_MSB(rmrc) returns the supplied RMR Context in ms-byte
+ * order.
+ * DAT_VADDR_TO_LSB(vaddr) returns the supplied Virtual Address in ls-byte
+ * order.
+ * DAT_VADDR_TO_MSB(vaddr) returns the supplied Virtual Address in
+ * ms-byte order.
+ * DAT_VLEN_TO_LSB(vlen) returns the supplied length in ls-byte order.
+ * DAT_VLEN_TO_MSB(vlen) returns the supplied length in ms-byte order.
+ *
+ * Consumers are free to use 64-bit or 32-bit arithmetic for local or remote
+ * memory address and length manipulation in their preferred byte-order. Only the
+ * LMR and RMR Triplets passed to a Provider as part of a Posted DTO are
+ * required to be in 64-bit address and local host order formats. Providers shall
+ * convert RMR_Triplets to a Transport-required wire format.
+ *
+ * For the best performance, Consumers should align each buffer segment to
+ * the boundary specified by the dat_optimal_alignment.
+ */
+typedef DAT_UINT32       DAT_LMR_CONTEXT;
+typedef DAT_UINT32       DAT_RMR_CONTEXT;
+
+typedef DAT_UINT64       DAT_VLEN;
+typedef DAT_UINT64       DAT_VADDR;
+typedef DAT_UINT32       DAT_SEG_LENGTH; /* The maximum data segment length */
+
+typedef struct dat_provider_attr  DAT_PROVIDER_ATTR;
+typedef struct dat_evd_param      DAT_EVD_PARAM;
+typedef struct dat_lmr_param      DAT_LMR_PARAM;
+typedef enum dat_lmr_param_mask   DAT_LMR_PARAM_MASK;
+
+/* It is legal for the Consumer to specify zero for segment_length
+ * of the dat_lmr_triplet. When 0 is specified for the
+ * segment_length then the other two elements of the
+ * dat_lmr_triplet are irrelevant and can be invalid.
+ */
+
+typedef struct dat_lmr_triplet
+{
+    DAT_VADDR                   virtual_address;/* 64-bit address */
+    DAT_SEG_LENGTH              segment_length; /* 32-bit length */
+    DAT_LMR_CONTEXT		lmr_context; /* 32-bit lmr_context */
+} DAT_LMR_TRIPLET;
+
+typedef struct dat_rmr_triplet
+{
+    DAT_VADDR                   virtual_address;/* 64-bit address */
+    DAT_SEG_LENGTH              segment_length; /* 32-bit length */
+    DAT_RMR_CONTEXT		rmr_context; /* 32-bit rmr_context */
+} DAT_RMR_TRIPLET;
+
+/* Memory privileges */
+
+typedef enum dat_mem_priv_flags
+{
+    DAT_MEM_PRIV_NONE_FLAG           = 0x00,
+    DAT_MEM_PRIV_LOCAL_READ_FLAG     = 0x01,
+    DAT_MEM_PRIV_REMOTE_READ_FLAG    = 0x02,
+    DAT_MEM_PRIV_LOCAL_WRITE_FLAG    = 0x10,
+    DAT_MEM_PRIV_REMOTE_WRITE_FLAG   = 0x20,
+    DAT_MEM_PRIV_ALL_FLAG            = 0x33
+#ifdef DAT_EXTENSIONS
+/* To be used by DAT extensions as a starting
+	point of extension memory privileges */
+    ,DAT_MEM_PRIV_EXTENSION_BASE	= 0x40
+#endif /* DAT_EXTENSIONS */
+
+} DAT_MEM_PRIV_FLAGS;
+
+/* For backward compatibility with DAT-1.0, memory privileges values are
+ * supported
+ */
+#define DAT_MEM_PRIV_READ_FLAG  (DAT_MEM_PRIV_LOCAL_READ_FLAG | DAT_MEM_PRIV_REMOTE_READ_FLAG)
+#define DAT_MEM_PRIV_WRITE_FLAG (DAT_MEM_PRIV_LOCAL_WRITE_FLAG | DAT_MEM_PRIV_REMOTE_WRITE_FLAG)
+
+/* LMR VA types */
+typedef enum dat_va_type
+{
+	DAT_VA_TYPE_VA		= 0x0,
+	DAT_VA_TYPE_ZB		= 0x1
+} DAT_VA_TYPE;
+
+/* RMR Arguments & RMR Arguments Mask */
+
+/* DAPL 2.0 addition */
+/* Defines RMR protection scope */
+typedef enum dat_rmr_scope
+{
+	DAT_RMR_SCOPE_EP,  /* bound to at most one EP at a time. */
+	DAT_RMR_SCOPE_PZ,  /* bound to a Protection Zone         */
+	DAT_RMR_SCOPE_ANY  /* Supports all types                 */
+} DAT_RMR_SCOPE;
+
+typedef struct dat_rmr_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_PZ_HANDLE               pz_handle;
+    DAT_LMR_TRIPLET             lmr_triplet;
+    DAT_MEM_PRIV_FLAGS          mem_priv;
+    DAT_RMR_CONTEXT             rmr_context;
+    DAT_RMR_SCOPE               rmr_scope;
+    DAT_VA_TYPE                 va_type;
+} DAT_RMR_PARAM;
+
+typedef enum dat_rmr_param_mask
+{
+    DAT_RMR_FIELD_IA_HANDLE          = 0x01,
+    DAT_RMR_FIELD_PZ_HANDLE          = 0x02,
+    DAT_RMR_FIELD_LMR_TRIPLET        = 0x04,
+    DAT_RMR_FIELD_MEM_PRIV           = 0x08,
+    DAT_RMR_FIELD_RMR_CONTEXT        = 0x10,
+    DAT_RMR_FIELD_RMR_SCOPE          = 0x20,
+    DAT_RMR_FIELD_VA_TYPE            = 0x40,
+
+    DAT_RMR_FIELD_ALL                = 0x7F
+} DAT_RMR_PARAM_MASK;
+
+/* Provider attributes */
+
+typedef enum dat_iov_ownership
+{
+        /* Not a modification by the Provider; the Consumer can use anytime. */
+    DAT_IOV_CONSUMER                 = 0x0,
+        /* Provider does not modify returned IOV DTO on completion.   */
+    DAT_IOV_PROVIDER_NOMOD           = 0x1,
+        /* Provider can modify IOV DTO on completion; can't trust it. */
+    DAT_IOV_PROVIDER_MOD             = 0x2
+} DAT_IOV_OWNERSHIP;
+
+typedef enum dat_ep_creator_for_psp
+{
+    DAT_PSP_CREATES_EP_NEVER,        /* Provider never creates Endpoint.    */
+    DAT_PSP_CREATES_EP_IFASKED,      /* Provider creates Endpoint if asked. */
+    DAT_PSP_CREATES_EP_ALWAYS        /* Provider always creates Endpoint.   */
+} DAT_EP_CREATOR_FOR_PSP;
+
+/* General Interface Adapter attributes. These apply to both udat and kdat. */
+
+/* To support backwards compatibility for DAPL-1.0 */
+#define max_rdma_read_per_ep 		max_rdma_read_per_ep_in
+#define DAT_IA_FIELD_IA_MAX_DTO_PER_OP  DAT_IA_FIELD_IA_MAX_DTO_PER_EP_IN
+
+/* To support backwards compatibility for DAPL-1.0 & DAPL-1.1 */
+#define max_mtu_size max_message_size
+
+/* Query for provider IA extension support */
+typedef enum dat_extension
+{
+	DAT_EXTENSION_NONE,/* no extension supported. */
+	DAT_EXTENSION_IB,  /* IB extension.           */
+	DAT_EXTENSION_IW   /* iWARP extension.        */
+} DAT_EXTENSION;
+
+typedef struct dat_ia_attr DAT_IA_ATTR;
+
+/* To support backwards compatibility for DAPL-1.0 & DAPL-1.1 */
+#define DAT_IA_FIELD_IA_MAX_MTU_SIZE DAT_IA_FIELD_IA_MAX_MESSAGE_SIZE
+
+typedef DAT_UINT64 DAT_IA_ATTR_MASK;
+
+#define DAT_IA_FIELD_IA_ADAPTER_NAME                     UINT64_C(0x000000001)
+#define DAT_IA_FIELD_IA_VENDOR_NAME                      UINT64_C(0x000000002)
+#define DAT_IA_FIELD_IA_HARDWARE_MAJOR_VERSION           UINT64_C(0x000000004)
+#define DAT_IA_FIELD_IA_HARDWARE_MINOR_VERSION           UINT64_C(0x000000008)
+#define DAT_IA_FIELD_IA_FIRMWARE_MAJOR_VERSION           UINT64_C(0x000000010)
+#define DAT_IA_FIELD_IA_FIRMWARE_MINOR_VERSION           UINT64_C(0x000000020)
+#define DAT_IA_FIELD_IA_ADDRESS_PTR                      UINT64_C(0x000000040)
+#define DAT_IA_FIELD_IA_MAX_EPS                          UINT64_C(0x000000080)
+#define DAT_IA_FIELD_IA_MAX_DTO_PER_EP                   UINT64_C(0x000000100)
+#define DAT_IA_FIELD_IA_MAX_RDMA_READ_PER_EP_IN          UINT64_C(0x000000200)
+#define DAT_IA_FIELD_IA_MAX_RDMA_READ_PER_EP_OUT         UINT64_C(0x000000400)
+#define DAT_IA_FIELD_IA_MAX_EVDS                         UINT64_C(0x000000800)
+#define DAT_IA_FIELD_IA_MAX_EVD_QLEN                     UINT64_C(0x000001000)
+#define DAT_IA_FIELD_IA_MAX_IOV_SEGMENTS_PER_DTO         UINT64_C(0x000002000)
+#define DAT_IA_FIELD_IA_MAX_LMRS                         UINT64_C(0x000004000)
+#define DAT_IA_FIELD_IA_MAX_LMR_BLOCK_SIZE               UINT64_C(0x000008000)
+#define DAT_IA_FIELD_IA_MAX_LMR_VIRTUAL_ADDRESS          UINT64_C(0x000010000)
+#define DAT_IA_FIELD_IA_MAX_PZS                          UINT64_C(0x000020000)
+#define DAT_IA_FIELD_IA_MAX_MESSAGE_SIZE                 UINT64_C(0x000040000)
+#define DAT_IA_FIELD_IA_MAX_RDMA_SIZE                    UINT64_C(0x000080000)
+#define DAT_IA_FIELD_IA_MAX_RMRS                         UINT64_C(0x000100000)
+#define DAT_IA_FIELD_IA_MAX_RMR_TARGET_ADDRESS           UINT64_C(0x000200000)
+#define DAT_IA_FIELD_IA_MAX_SRQS                         UINT64_C(0x000400000)
+#define DAT_IA_FIELD_IA_MAX_EP_PER_SRQ                   UINT64_C(0x000800000)
+#define DAT_IA_FIELD_IA_MAX_RECV_PER_SRQ                 UINT64_C(0x001000000)
+#define DAT_IA_FIELD_IA_MAX_IOV_SEGMENTS_PER_RDMA_READ   UINT64_C(0x002000000)
+#define DAT_IA_FIELD_IA_MAX_IOV_SEGMENTS_PER_RDMA_WRITE  UINT64_C(0x004000000)
+#define DAT_IA_FIELD_IA_MAX_RDMA_READ_IN                 UINT64_C(0x008000000)
+#define DAT_IA_FIELD_IA_MAX_RDMA_READ_OUT                UINT64_C(0x010000000)
+#define DAT_IA_FIELD_IA_MAX_RDMA_READ_PER_EP_IN_GUARANTEED  UINT64_C(0x020000000)
+#define DAT_IA_FIELD_IA_MAX_RDMA_READ_PER_EP_OUT_GUARANTEED UINT64_C(0x040000000)
+#define DAT_IA_FIELD_IA_ZB_SUPPORTED			UINT64_C(0x080000000)
+#define DAT_IA_FIELD_IA_EXTENSIONS_SUPPORTED		UINT64_C(0x100000000)
+
+/* To support backwards compatibility for DAPL-1.0 & DAPL-1.1 */
+#define DAT_IA_ALL					 DAT_IA_FIELD_ALL
+#define DAT_IA_FIELD_NONE				 UINT64_C(0x0)
+
+/* Endpoint attributes */
+
+typedef enum dat_service_type
+{
+    DAT_SERVICE_TYPE_RC		  /* reliable connections */
+#ifdef DAT_EXTENSIONS
+    ,DAT_SERVICE_TYPE_EXTENSION_BASE /* To be used by DAT extensions
+				   as a starting point of extension services */
+#endif /* DAT_EXTENSIONS */
+} DAT_SERVICE_TYPE;
+
+typedef struct dat_ep_attr
+{
+    DAT_SERVICE_TYPE            service_type;
+    DAT_SEG_LENGTH              max_message_size;
+    DAT_SEG_LENGTH              max_rdma_size;
+    DAT_QOS                     qos;
+    DAT_COMPLETION_FLAGS        recv_completion_flags;
+    DAT_COMPLETION_FLAGS        request_completion_flags;
+    DAT_COUNT                   max_recv_dtos;
+    DAT_COUNT                   max_request_dtos;
+    DAT_COUNT                   max_recv_iov;
+    DAT_COUNT                   max_request_iov;
+    DAT_COUNT                   max_rdma_read_in;
+    DAT_COUNT                   max_rdma_read_out;
+    DAT_COUNT                   srq_soft_hw;
+    DAT_COUNT                   max_rdma_read_iov;
+    DAT_COUNT                   max_rdma_write_iov;
+    DAT_COUNT                   ep_transport_specific_count;
+    DAT_NAMED_ATTR *            ep_transport_specific;
+    DAT_COUNT                   ep_provider_specific_count;
+    DAT_NAMED_ATTR *            ep_provider_specific;
+} DAT_EP_ATTR;
+
+/* Endpoint Parameters */
+
+/* For backwards compatibility */
+#define DAT_EP_STATE_ERROR DAT_EP_STATE_DISCONNECTED
+
+typedef enum dat_ep_state
+{
+    DAT_EP_STATE_UNCONNECTED,                  /* quiescent state */
+    DAT_EP_STATE_UNCONFIGURED_UNCONNECTED,
+    DAT_EP_STATE_RESERVED,
+    DAT_EP_STATE_UNCONFIGURED_RESERVED,
+    DAT_EP_STATE_PASSIVE_CONNECTION_PENDING,
+    DAT_EP_STATE_UNCONFIGURED_PASSIVE,
+    DAT_EP_STATE_ACTIVE_CONNECTION_PENDING,
+    DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING,
+    DAT_EP_STATE_UNCONFIGURED_TENTATIVE,
+    DAT_EP_STATE_CONNECTED,
+    DAT_EP_STATE_DISCONNECT_PENDING,
+    DAT_EP_STATE_DISCONNECTED,
+    DAT_EP_STATE_COMPLETION_PENDING,
+    DAT_EP_STATE_CONNECTED_SINGLE_PATH,
+    DAT_EP_STATE_CONNECTED_MULTI_PATH
+} DAT_EP_STATE;
+
+typedef struct dat_ep_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_EP_STATE                ep_state;
+    DAT_COMM                    comm;
+    DAT_IA_ADDRESS_PTR          local_ia_address_ptr;
+    DAT_PORT_QUAL               local_port_qual;
+    DAT_IA_ADDRESS_PTR          remote_ia_address_ptr;
+    DAT_PORT_QUAL               remote_port_qual;
+    DAT_PZ_HANDLE               pz_handle;
+    DAT_EVD_HANDLE              recv_evd_handle;
+    DAT_EVD_HANDLE              request_evd_handle;
+    DAT_EVD_HANDLE              connect_evd_handle;
+    DAT_SRQ_HANDLE              srq_handle;
+    DAT_EP_ATTR                 ep_attr;
+} DAT_EP_PARAM;
+
+typedef DAT_UINT64 DAT_EP_PARAM_MASK;
+#define DAT_EP_FIELD_IA_HANDLE                           UINT64_C(0x00000001)
+#define DAT_EP_FIELD_EP_STATE                            UINT64_C(0x00000002)
+#define DAT_EP_FIELD_COMM				 UINT64_C(0x00000004)
+#define DAT_EP_FIELD_LOCAL_IA_ADDRESS_PTR                UINT64_C(0x00000008)
+#define DAT_EP_FIELD_LOCAL_PORT_QUAL                     UINT64_C(0x00000010)
+#define DAT_EP_FIELD_REMOTE_IA_ADDRESS_PTR               UINT64_C(0x00000020)
+#define DAT_EP_FIELD_REMOTE_PORT_QUAL                    UINT64_C(0x00000040)
+#define DAT_EP_FIELD_PZ_HANDLE                           UINT64_C(0x00000080)
+#define DAT_EP_FIELD_RECV_EVD_HANDLE                     UINT64_C(0x00000100)
+#define DAT_EP_FIELD_REQUEST_EVD_HANDLE                  UINT64_C(0x00000200)
+#define DAT_EP_FIELD_CONNECT_EVD_HANDLE                  UINT64_C(0x00000400)
+#define DAT_EP_FIELD_SRQ_HANDLE                          UINT64_C(0x00000800)
+    /* Remainder of values from EP_ATTR, 0x00001000 and up */
+#define DAT_EP_FIELD_EP_ATTR_SERVICE_TYPE                UINT64_C(0x00001000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_MESSAGE_SIZE            UINT64_C(0x00002000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_RDMA_SIZE               UINT64_C(0x00004000)
+#define DAT_EP_FIELD_EP_ATTR_QOS                         UINT64_C(0x00008000)
+#define DAT_EP_FIELD_EP_ATTR_RECV_COMPLETION_FLAGS       UINT64_C(0x00010000)
+#define DAT_EP_FIELD_EP_ATTR_REQUEST_COMPLETION_FLAGS    UINT64_C(0x00020000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_RECV_DTOS               UINT64_C(0x00040000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_DTOS            UINT64_C(0x00080000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_RECV_IOV                UINT64_C(0x00100000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_IOV             UINT64_C(0x00200000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_RDMA_READ_IN            UINT64_C(0x00400000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_RDMA_READ_OUT           UINT64_C(0x00800000)
+#define DAT_EP_FIELD_EP_ATTR_SRQ_SOFT_HW                 UINT64_C(0x01000000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_RDMA_READ_IOV           UINT64_C(0x02000000)
+#define DAT_EP_FIELD_EP_ATTR_MAX_RDMA_WRITE_IOV          UINT64_C(0x04000000)
+#define DAT_EP_FIELD_EP_ATTR_NUM_TRANSPORT_ATTR          UINT64_C(0x08000000)
+#define DAT_EP_FIELD_EP_ATTR_TRANSPORT_SPECIFIC_ATTR     UINT64_C(0x10000000)
+#define DAT_EP_FIELD_EP_ATTR_NUM_PROVIDER_ATTR           UINT64_C(0x20000000)
+#define DAT_EP_FIELD_EP_ATTR_PROVIDER_SPECIFIC_ATTR      UINT64_C(0x40000000)
+#define DAT_EP_FIELD_EP_ATTR_ALL                         UINT64_C(0x7FFFF000)
+
+#define DAT_EP_FIELD_ALL                                 UINT64_C(0x7FFFFFFF)
+
+#define DAT_WATERMARK_INFINITE                           ((DAT_COUNT)~0)
+#define DAT_HW_DEFAULT                                   DAT_WATERMARK_INFINITE
+#define DAT_SRQ_LW_DEFAULT                               0x0
+
+typedef enum dat_srq_state
+{
+    DAT_SRQ_STATE_OPERATIONAL,
+    DAT_SRQ_STATE_ERROR
+} DAT_SRQ_STATE;
+
+#define DAT_VALUE_UNKNOWN (((DAT_COUNT) ~0)-1)
+
+typedef struct dat_srq_attr
+{
+    DAT_COUNT                   max_recv_dtos;
+    DAT_COUNT                   max_recv_iov;
+    DAT_COUNT                   low_watermark;
+} DAT_SRQ_ATTR;
+
+typedef struct dat_srq_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_SRQ_STATE               srq_state;
+    DAT_PZ_HANDLE               pz_handle;
+    DAT_COUNT                   max_recv_dtos;
+    DAT_COUNT                   max_recv_iov;
+    DAT_COUNT                   low_watermark;
+    DAT_COUNT                   available_dto_count;
+    DAT_COUNT                   outstanding_dto_count;
+} DAT_SRQ_PARAM;
+
+typedef enum dat_srq_param_mask
+{
+    DAT_SRQ_FIELD_IA_HANDLE          = 0x001,
+    DAT_SRQ_FIELD_SRQ_STATE          = 0x002,
+    DAT_SRQ_FIELD_PZ_HANDLE          = 0x004,
+    DAT_SRQ_FIELD_MAX_RECV_DTO       = 0x008,
+    DAT_SRQ_FIELD_MAX_RECV_IOV       = 0x010,
+    DAT_SRQ_FIELD_LOW_WATERMARK      = 0x020,
+    DAT_SRQ_FIELD_AVAILABLE_DTO_COUNT = 0x040,
+    DAT_SRQ_FIELD_OUTSTANDING_DTO_COUNT = 0x080,
+
+    DAT_SRQ_FIELD_ALL = 0x0FF
+} DAT_SRQ_PARAM_MASK;
+
+/* PZ Parameters */
+
+typedef struct dat_pz_param
+{
+    DAT_IA_HANDLE               ia_handle;
+} DAT_PZ_PARAM;
+
+typedef enum dat_pz_param_mask
+{
+    DAT_PZ_FIELD_IA_HANDLE           = 0x01,
+
+    DAT_PZ_FIELD_ALL                 = 0x01
+} DAT_PZ_PARAM_MASK;
+
+/* PSP Parameters */
+
+typedef struct dat_psp_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_CONN_QUAL               conn_qual;
+    DAT_EVD_HANDLE              evd_handle;
+    DAT_PSP_FLAGS               psp_flags;
+} DAT_PSP_PARAM;
+
+typedef enum dat_psp_param_mask
+{
+    DAT_PSP_FIELD_IA_HANDLE          = 0x01,
+    DAT_PSP_FIELD_CONN_QUAL          = 0x02,
+    DAT_PSP_FIELD_EVD_HANDLE         = 0x04,
+    DAT_PSP_FIELD_PSP_FLAGS          = 0x08,
+
+    DAT_PSP_FIELD_ALL                = 0x0F
+} DAT_PSP_PARAM_MASK;
+
+/* RSP Parameters */
+
+typedef struct dat_rsp_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_CONN_QUAL               conn_qual;
+    DAT_EVD_HANDLE              evd_handle;
+    DAT_EP_HANDLE               ep_handle;
+} DAT_RSP_PARAM;
+
+typedef enum dat_rsp_param_mask
+{
+    DAT_RSP_FIELD_IA_HANDLE          = 0x01,
+    DAT_RSP_FIELD_CONN_QUAL          = 0x02,
+    DAT_RSP_FIELD_EVD_HANDLE         = 0x04,
+    DAT_RSP_FIELD_EP_HANDLE          = 0x08,
+
+    DAT_RSP_FIELD_ALL                = 0x0F
+} DAT_RSP_PARAM_MASK;
+
+/* CSP Parameters */
+typedef struct dat_csp_param
+{
+	DAT_IA_HANDLE		ia_handle;
+	DAT_COMM                *comm;
+	DAT_IA_ADDRESS_PTR      address_ptr;
+	DAT_EVD_HANDLE          evd_handle;
+} DAT_CSP_PARAM;
+
+typedef enum dat_csp_param_mask
+{
+	DAT_CSP_FIELD_IA_HANDLE    = 0x01,
+	DAT_CSP_FIELD_COMM         = 0x02,
+	DAT_CSP_FIELD_IA_ADDRESS   = 0x04,
+	DAT_CSP_FIELD_EVD_HANDLE   = 0x08,
+
+	DAT_CSP_FIELD_ALL          = 0x0F
+} DAT_CSP_PARAM_MASK;
+
+/* Connection Request Parameters.
+ *
+ * The Connection Request does not provide Remote Endpoint attributes.
+ * If a local Consumer needs this information, the remote Consumer should
+ * encode it into Private Data.
+ */
+
+typedef struct dat_cr_param
+{
+	/* Remote IA whose Endpoint requested the connection. */
+    DAT_IA_ADDRESS_PTR          remote_ia_address_ptr;
+
+	/* Port qualifier of the remote Endpoint of the requested connection.*/
+    DAT_PORT_QUAL               remote_port_qual;
+
+	/* Size of the Private Data. */
+    DAT_COUNT                   private_data_size;
+
+	/* Pointer to the Private Data passed by remote side in the Connection
+	 * Request.
+	 */
+    DAT_PVOID                   private_data;
+        /* The local Endpoint provided by the Service Point for the requested
+	 * connection. It is the only Endpoint that can accept a Connection
+	 * Request on this Service Point. The value DAT_HANDLE_NULL
+	 * represents that there is no associated local Endpoint for the
+	 * requested connection.
+	 */
+    DAT_EP_HANDLE               local_ep_handle;
+} DAT_CR_PARAM;
+
+typedef enum dat_cr_param_mask
+{
+    DAT_CR_FIELD_REMOTE_IA_ADDRESS_PTR = 0x01,
+    DAT_CR_FIELD_REMOTE_PORT_QUAL    = 0x02,
+    DAT_CR_FIELD_PRIVATE_DATA_SIZE   = 0x04,
+    DAT_CR_FIELD_PRIVATE_DATA        = 0x08,
+    DAT_CR_FIELD_LOCAL_EP_HANDLE     = 0x10,
+
+    DAT_CR_FIELD_ALL                 = 0x1F
+} DAT_CR_PARAM_MASK;
+
+/************************** Events ******************************/
+
+/* Completion status flags */
+
+    /* DTO completion status */
+
+    /* For backwards compatibility */
+#define DAT_DTO_LENGTH_ERROR    DAT_DTO_ERR_LOCAL_LENGTH
+#define DAT_DTO_FAILURE         DAT_DTO_ERR_FLUSHED
+
+typedef enum dat_dto_completion_status
+{
+    DAT_DTO_SUCCESS                  = 0,
+    DAT_DTO_ERR_FLUSHED              = 1,
+    DAT_DTO_ERR_LOCAL_LENGTH         = 2,
+    DAT_DTO_ERR_LOCAL_EP             = 3,
+    DAT_DTO_ERR_LOCAL_PROTECTION     = 4,
+    DAT_DTO_ERR_BAD_RESPONSE         = 5,
+    DAT_DTO_ERR_REMOTE_ACCESS        = 6,
+    DAT_DTO_ERR_REMOTE_RESPONDER     = 7,
+    DAT_DTO_ERR_TRANSPORT            = 8,
+    DAT_DTO_ERR_RECEIVER_NOT_READY   = 9,
+    DAT_DTO_ERR_PARTIAL_PACKET       = 10,
+    DAT_RMR_OPERATION_FAILED         = 11,
+    DAT_DTO_ERR_LOCAL_MM_ERROR	     = 12 /* kdat specific */	
+} DAT_DTO_COMPLETION_STATUS;
+
+    /* RMR completion status */
+
+    /* For backwards compatibility */
+#define DAT_RMR_BIND_SUCCESS    DAT_DTO_SUCCESS
+#define DAT_RMR_BIND_FAILURE    DAT_DTO_ERR_FLUSHED
+
+/* RMR completion status */
+#define DAT_RMR_BIND_COMPLETION_STATUS DAT_DTO_COMPLETION_STATUS
+
+/* Completion group structs (six total) */
+
+/* DTO completion event data */
+/* transfered_length is not defined if status is not DAT_SUCCESS */
+/* invalidate_flag and rmr_context are not defined if status is not DAT_SUCCESS */
+
+typedef struct dat_dto_completion_event_data
+{
+    DAT_EP_HANDLE               ep_handle;
+    DAT_DTO_COOKIE              user_cookie;
+    DAT_DTO_COMPLETION_STATUS   status;
+    DAT_SEG_LENGTH              transfered_length;
+    DAT_DTOS			operation;
+    DAT_RMR_CONTEXT		rmr_context;
+} DAT_DTO_COMPLETION_EVENT_DATA;
+
+    /* RMR bind  completion event data */
+typedef struct dat_rmr_bind_completion_event_data
+{
+    DAT_RMR_HANDLE              rmr_handle;
+    DAT_RMR_COOKIE              user_cookie;
+    DAT_RMR_BIND_COMPLETION_STATUS status;
+} DAT_RMR_BIND_COMPLETION_EVENT_DATA;
+
+typedef union dat_sp_handle
+{
+    DAT_RSP_HANDLE              rsp_handle;
+    DAT_PSP_HANDLE              psp_handle;
+    DAT_CSP_HANDLE		csp_handle;
+} DAT_SP_HANDLE;
+
+    /* Connection Request Arrival event data */
+typedef struct dat_cr_arrival_event_data
+{
+        /* Handle to the Service Point that received the Connection Request
+	 * from the remote side. If the Service Point was Reserved, sp_handle is
+	 * DAT_HANDLE_NULL because the reserved Service Point is
+	 * automatically destroyed upon generating this event. Can be PSP,
+	 * CSP, or RSP.
+	*/
+    DAT_SP_HANDLE               sp_handle;
+
+	/* Address of the IA on which the Connection Request arrived. */
+    DAT_IA_ADDRESS_PTR          local_ia_address_ptr;
+
+	/* Connection Qualifier of the IA on which the Service Point received a
+	 * Connection Request. 
+	 */
+    DAT_CONN_QUAL               conn_qual;
+
+        /* The Connection Request instance created by a Provider for the 
+	 * arrived Connection Request. Consumers can find out private_data 
+	 * passed by a remote Consumer from cr_handle. It is up to a Consumer
+	 * to dat_cr_accept or dat_cr_reject of the Connection Request.
+	 */
+    DAT_CR_HANDLE               cr_handle;
+
+    /* The binary indicator whether the arrived privata data was trancated
+     * or not.
+     *  The default value of 0 means not truncation of received private data. */
+    DAT_BOOLEAN                 truncate_flag;
+
+} DAT_CR_ARRIVAL_EVENT_DATA;
+
+
+    /* Connection event data */
+typedef struct dat_connection_event_data
+{
+    DAT_EP_HANDLE               ep_handle;
+    DAT_COUNT                   private_data_size;
+    DAT_PVOID                   private_data;
+} DAT_CONNECTION_EVENT_DATA;
+
+/* Async Error event data */
+
+/* For unaffiliated asynchronous event dat_handle is ia_handle. For
+ * Endpoint affiliated asynchronous event dat_handle is ep_handle. For
+ * EVD affiliated asynchronous event dat_handle is evd_handle. For SRQ
+ * affiliated asynchronous event dat_handle is srq_handle. For Memory
+ * affiliated asynchronous event dat_handle is either lmr_handle,
+ * rmr_handle or pz_handle.
+ */
+typedef struct dat_asynch_error_event_data
+{
+    DAT_HANDLE                  dat_handle; /* either IA, EP, EVD, SRQ, */
+                                            /* LMR, RMR, or PZ handle   */
+    DAT_COUNT                   reason;     /* object specific          */
+} DAT_ASYNCH_ERROR_EVENT_DATA;
+
+/* The reason is object type specific and its values are defined below. */
+typedef enum ia_async_error_reason
+{
+    DAT_IA_CATASTROPHIC_ERROR,
+    DAT_IA_OTHER_ERROR
+} DAT_IA_ASYNC_ERROR_REASON;
+
+typedef enum ep_async_error_reason
+{
+    DAT_EP_TRANSFER_TO_ERROR,
+    DAT_EP_OTHER_ERROR,
+    DAT_SRQ_SOFT_HIGH_WATERMARK_EVENT
+} DAT_EP_ASYNC_ERROR_REASON;
+
+typedef enum evd_async_error_reason
+{
+    DAT_EVD_OVERFLOW_ERROR,
+    DAT_EVD_OTHER_ERROR
+} DAT_EVD_ASYNC_ERROR_REASON;
+
+typedef enum srq_async_error_reason
+{
+    DAT_SRQ_TRANSFER_TO_ERROR,
+    DAT_SRQ_OTHER_ERROR,
+    DAT_SRQ_LOW_WATERMARK_EVENT
+} DAT_SRQ_ASYNC_ERROR_REASON;
+
+typedef enum lmr_async_error_reason
+{
+    DAT_LMR_OTHER_ERROR
+} DAT_LMR_ASYNC_ERROR_REASON;
+
+typedef enum rmr_async_error_reason
+{
+    DAT_RMR_OTHER_ERROR
+} DAT_RMR_ASYNC_ERROR_REASON;
+
+typedef enum pz_async_error_reason
+{
+    DAT_PZ_OTHER_ERROR
+} DAT_PZ_ASYNC_ERROR_REASON;
+
+/* Software event data */
+typedef struct dat_software_event_data
+{
+    DAT_PVOID pointer;
+} DAT_SOFTWARE_EVENT_DATA;
+
+typedef enum dat_event_number
+{
+    DAT_DTO_COMPLETION_EVENT                     = 0x00001,
+    DAT_RMR_BIND_COMPLETION_EVENT                = 0x01001,
+    DAT_CONNECTION_REQUEST_EVENT                 = 0x02001,
+    DAT_CONNECTION_EVENT_ESTABLISHED             = 0x04001,
+    DAT_CONNECTION_EVENT_PEER_REJECTED           = 0x04002,
+    DAT_CONNECTION_EVENT_NON_PEER_REJECTED       = 0x04003,
+    DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR = 0x04004,
+    DAT_CONNECTION_EVENT_DISCONNECTED            = 0x04005,
+    DAT_CONNECTION_EVENT_BROKEN                  = 0x04006,
+    DAT_CONNECTION_EVENT_TIMED_OUT               = 0x04007,
+    DAT_CONNECTION_EVENT_UNREACHABLE             = 0x04008,
+    DAT_ASYNC_ERROR_EVD_OVERFLOW                 = 0x08001,
+    DAT_ASYNC_ERROR_IA_CATASTROPHIC              = 0x08002,
+    DAT_ASYNC_ERROR_EP_BROKEN                    = 0x08003,
+    DAT_ASYNC_ERROR_TIMED_OUT                    = 0x08004,
+    DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR      = 0x08005,
+    DAT_HA_DOWN_TO_1                             = 0x08101,
+    DAT_HA_UP_TO_MULTI_PATH                      = 0x08102,
+
+    DAT_SOFTWARE_EVENT                           = 0x10001
+#ifdef DAT_EXTENSIONS
+    ,DAT_EXTENSION_EVENT                         = 0x20000,
+    DAT_IB_EXTENSION_RANGE_BASE                  = 0x40000,
+    DAT_IW_EXTENSION_RANGE_BASE                  = 0x80000
+#endif /* DAT_EXTENSIONS */
+			    
+} DAT_EVENT_NUMBER;
+
+/* Union for event Data */
+
+typedef union dat_event_data
+{
+    DAT_DTO_COMPLETION_EVENT_DATA      dto_completion_event_data;
+    DAT_RMR_BIND_COMPLETION_EVENT_DATA rmr_completion_event_data;
+    DAT_CR_ARRIVAL_EVENT_DATA          cr_arrival_event_data;
+    DAT_CONNECTION_EVENT_DATA          connect_event_data;
+    DAT_ASYNCH_ERROR_EVENT_DATA        asynch_error_event_data;
+    DAT_SOFTWARE_EVENT_DATA            software_event_data;
+} DAT_EVENT_DATA;
+
+/* Event struct that holds all event information */
+
+typedef struct dat_event
+{
+    DAT_EVENT_NUMBER            event_number;
+    DAT_EVD_HANDLE              evd_handle;
+    DAT_EVENT_DATA              event_data;
+    DAT_UINT64                  event_extension_data[8];        
+} DAT_EVENT;
+
+/* Provider/registration info */
+
+typedef struct dat_provider_info
+{
+    char                        ia_name[DAT_NAME_MAX_LENGTH];
+    DAT_UINT32                  dapl_version_major;
+    DAT_UINT32                  dapl_version_minor;
+    DAT_BOOLEAN                 is_thread_safe;
+} DAT_PROVIDER_INFO;
+
+/***************************************************************
+ *
+ * FUNCTION PROTOTYPES
+ ***************************************************************/
+
+/*
+ * IA functions
+ *
+ * Note that there are actual 'dat_ia_open' and 'dat_ia_close'
+ * functions, it is not just a re-directing #define. That is
+ * because the functions may have to ensure that the provider
+ * library is loaded before it can call it, and may choose to
+ * unload the library after the last close.
+ */
+
+extern DAT_RETURN DAT_API dat_ia_openv (
+	IN      const DAT_NAME_PTR,	/* provider             */
+	IN      DAT_COUNT,		/* asynch_evd_min_qlen  */
+	INOUT   DAT_EVD_HANDLE *,	/* asynch_evd_handle    */
+	OUT     DAT_IA_HANDLE *,	/* ia_handle            */
+	IN      DAT_UINT32,		/* dat major version number */
+	IN      DAT_UINT32,		/* dat minor version number */
+	IN      DAT_BOOLEAN);		/* dat thread safety    */
+
+#define dat_ia_open(name, qlen, async_evd, ia) \
+	dat_ia_openv((name), (qlen), (async_evd), (ia), \
+		DAT_VERSION_MAJOR, DAT_VERSION_MINOR, \
+		DAT_THREADSAFE)
+
+extern  DAT_RETURN DAT_API dat_ia_query (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_EVD_HANDLE *,	/* async_evd_handle     */
+	IN      DAT_IA_ATTR_MASK,	/* ia_attr_mask         */
+	OUT     DAT_IA_ATTR *,		/* ia_attr              */
+	IN      DAT_PROVIDER_ATTR_MASK,	/* provider_attr_mask   */
+	OUT     DAT_PROVIDER_ATTR * );	/* provider_attr        */
+
+extern  DAT_RETURN DAT_API dat_ia_close (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+/* helper functions */
+
+extern DAT_RETURN DAT_API dat_set_consumer_context (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	IN      DAT_CONTEXT);		/* context              */
+
+extern DAT_RETURN DAT_API dat_get_consumer_context (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	OUT     DAT_CONTEXT * );	/* context              */
+
+extern DAT_RETURN DAT_API dat_get_handle_type (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	OUT     DAT_HANDLE_TYPE * );	/* handle_type          */
+
+/* CR functions */
+
+extern DAT_RETURN DAT_API dat_cr_query (
+	IN      DAT_CR_HANDLE,		/* cr_handle            */
+	IN      DAT_CR_PARAM_MASK,	/* cr_param_mask        */
+	OUT     DAT_CR_PARAM * );	/* cr_param             */
+
+extern DAT_RETURN DAT_API dat_cr_accept (
+	IN      DAT_CR_HANDLE,		/* cr_handle            */
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* private_data_size    */
+	IN      const DAT_PVOID );	/* private_data         */
+
+extern DAT_RETURN DAT_API dat_cr_reject (
+	IN      DAT_CR_HANDLE, 		/* cr_handle            */
+	IN	DAT_COUNT,		/* private_data_size	*/
+	IN const DAT_PVOID );		/* private_data		*/
+
+/* For DAT-1.1 and above, this function is defined for both uDAPL and
+ * kDAPL. For DAT-1.0, it is only defined for uDAPL.
+ */
+extern DAT_RETURN DAT_API dat_cr_handoff (
+	IN      DAT_CR_HANDLE,		/* cr_handle            */
+	IN      DAT_CONN_QUAL);		/* handoff              */
+
+/* EVD functions */
+
+extern DAT_RETURN DAT_API dat_evd_resize (
+	IN      DAT_EVD_HANDLE,	        /* evd_handle           */
+	IN      DAT_COUNT );	        /* evd_min_qlen         */
+
+extern DAT_RETURN DAT_API dat_evd_post_se (
+	IN      DAT_EVD_HANDLE,	        /* evd_handle           */
+	IN      const DAT_EVENT * );    /* event                */
+
+extern DAT_RETURN DAT_API dat_evd_dequeue (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	OUT     DAT_EVENT * );		/* event                */
+
+extern DAT_RETURN DAT_API dat_evd_query (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_EVD_PARAM_MASK,	/* evd_param_mask       */
+	OUT     DAT_EVD_PARAM * );	/* evd_param            */
+
+extern DAT_RETURN DAT_API dat_evd_free (
+	IN      DAT_EVD_HANDLE );	/* evd_handle           */
+
+/* EP functions */
+
+extern DAT_RETURN DAT_API dat_ep_create (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_EVD_HANDLE,		/* recv_completion_evd_handle */
+	IN      DAT_EVD_HANDLE,		/* request_completion_evd_handle */
+	IN      DAT_EVD_HANDLE,		/* connect_evd_handle   */
+	IN      const DAT_EP_ATTR *,	/* ep_attributes        */
+	OUT     DAT_EP_HANDLE * );	/* ep_handle            */
+
+extern DAT_RETURN DAT_API dat_ep_query (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EP_PARAM_MASK,	/* ep_param_mask        */
+	OUT     DAT_EP_PARAM * );	/* ep_param             */
+
+extern DAT_RETURN DAT_API dat_ep_modify (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EP_PARAM_MASK,	/* ep_param_mask        */
+	IN      const DAT_EP_PARAM * ); /* ep_param             */
+
+extern DAT_RETURN DAT_API dat_ep_connect (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_IA_ADDRESS_PTR,	/* remote_ia_address    */
+	IN      DAT_CONN_QUAL,		/* remote_conn_qual     */
+	IN      DAT_TIMEOUT,		/* timeout              */
+	IN      DAT_COUNT,		/* private_data_size    */
+	IN      const DAT_PVOID,	/* private_data         */
+	IN      DAT_QOS,		/* quality_of_service   */
+	IN      DAT_CONNECT_FLAGS );	/* connect_flags        */
+
+extern DAT_RETURN DAT_API dat_ep_dup_connect (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EP_HANDLE,		/* ep_dup_handle        */
+	IN      DAT_TIMEOUT,		/* timeout              */
+	IN      DAT_COUNT,		/* private_data_size    */
+	IN      const DAT_PVOID,	/* private_data         */
+	IN      DAT_QOS);		/* quality_of_service   */
+
+extern DAT_RETURN DAT_API dat_ep_common_connect (
+	IN      DAT_EP_HANDLE,          /* ep_handle            */
+	IN      DAT_IA_ADDRESS_PTR,     /* remote_ia_address    */
+	IN      DAT_TIMEOUT,            /* timeout              */
+	IN      DAT_COUNT,              /* private_data_size    */
+	IN      const DAT_PVOID );      /* private_data         */
+
+extern DAT_RETURN DAT_API dat_ep_disconnect (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+extern DAT_RETURN DAT_API dat_ep_post_send (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+extern DAT_RETURN DAT_API dat_ep_post_send_with_invalidate (
+	IN      DAT_EP_HANDLE,          /* ep_handle            */
+	IN      DAT_COUNT,              /* num_segments         */
+	IN      DAT_LMR_TRIPLET *,      /* local_iov            */
+	IN      DAT_DTO_COOKIE,         /* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS,	/* completion_flags     */
+	IN	DAT_BOOLEAN,		/* invalidate_flag 	*/
+	IN	DAT_RMR_CONTEXT );	/* RMR to invalidate	*/
+
+extern DAT_RETURN DAT_API dat_ep_post_recv (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+extern DAT_RETURN DAT_API dat_ep_post_rdma_read (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      const DAT_RMR_TRIPLET *,/* remote_iov           */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+extern DAT_RETURN DAT_API dat_ep_post_rdma_read_to_rmr (
+	IN      DAT_EP_HANDLE,          /* ep_handle            */
+	IN const DAT_RMR_TRIPLET *,      /* local_iov            */
+	IN      DAT_DTO_COOKIE,         /* user_cookie          */
+	IN      const DAT_RMR_TRIPLET *,/* remote_iov           */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+extern DAT_RETURN DAT_API dat_ep_post_rdma_write (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      const DAT_RMR_TRIPLET *,/* remote_iov           */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+extern DAT_RETURN DAT_API dat_ep_get_status (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	OUT     DAT_EP_STATE *,		/* ep_state             */
+	OUT     DAT_BOOLEAN *,		/* recv_idle            */
+	OUT     DAT_BOOLEAN * );	/* request_idle         */
+
+extern DAT_RETURN DAT_API dat_ep_free (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+extern DAT_RETURN DAT_API dat_ep_reset (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+extern DAT_RETURN DAT_API dat_ep_create_with_srq (
+        IN      DAT_IA_HANDLE,          /* ia_handle            */
+        IN      DAT_PZ_HANDLE,          /* pz_handle            */
+        IN      DAT_EVD_HANDLE,         /* recv_evd_handle      */
+        IN      DAT_EVD_HANDLE,         /* request_evd_handle   */
+        IN      DAT_EVD_HANDLE,         /* connect_evd_handle   */
+        IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+        IN      const DAT_EP_ATTR *,    /* ep_attributes        */
+        OUT     DAT_EP_HANDLE *);       /* ep_handle            */
+
+extern DAT_RETURN DAT_API dat_ep_recv_query (
+        IN      DAT_EP_HANDLE,          /* ep_handle            */
+        OUT     DAT_COUNT *,            /* nbufs_allocated      */
+        OUT     DAT_COUNT *);           /* bufs_alloc_span      */
+
+extern DAT_RETURN DAT_API dat_ep_set_watermark (
+        IN      DAT_EP_HANDLE,          /* ep_handle            */
+        IN      DAT_COUNT,              /* soft_high_watermark  */
+        IN      DAT_COUNT);             /* hard_high_watermark  */
+
+/* LMR functions */
+
+extern DAT_RETURN DAT_API dat_lmr_free (
+	IN      DAT_LMR_HANDLE);	/* lmr_handle           */
+
+/* Non-coherent memory functions */
+
+extern DAT_RETURN DAT_API dat_lmr_sync_rdma_read (
+	IN      DAT_IA_HANDLE,          /* ia_handle            */
+	IN      const DAT_LMR_TRIPLET *, /* local_segments      */
+	IN      DAT_VLEN);              /* num_segments         */
+
+extern DAT_RETURN DAT_API dat_lmr_sync_rdma_write (
+	IN      DAT_IA_HANDLE,          /* ia_handle            */
+	IN      const DAT_LMR_TRIPLET *, /* local_segments      */
+	IN      DAT_VLEN);              /* num_segments         */
+
+/* RMR functions */
+
+extern DAT_RETURN DAT_API dat_rmr_create (
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	OUT     DAT_RMR_HANDLE *);	/* rmr_handle           */
+
+extern DAT_RETURN DAT_API dat_rmr_create_for_ep (
+	IN      DAT_PZ_HANDLE,          /* pz_handle            */
+	OUT     DAT_RMR_HANDLE *);      /* rmr_handle           */
+
+extern DAT_RETURN DAT_API dat_rmr_query (
+	IN      DAT_RMR_HANDLE,		/* rmr_handle           */
+	IN      DAT_RMR_PARAM_MASK,	/* rmr_param_mask       */
+	OUT     DAT_RMR_PARAM *);	/* rmr_param            */
+
+extern DAT_RETURN DAT_API dat_rmr_bind (
+	IN      DAT_RMR_HANDLE,		/* rmr_handle           */
+	IN	DAT_LMR_HANDLE,		/* lmr_handle		*/
+	IN      const DAT_LMR_TRIPLET *,/* lmr_triplet          */
+	IN      DAT_MEM_PRIV_FLAGS,	/* mem_priv             */
+	IN	DAT_VA_TYPE,		/* va_type		*/
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_RMR_COOKIE,		/* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS,	/* completion_flags     */
+	OUT     DAT_RMR_CONTEXT * );	/* context              */
+
+extern DAT_RETURN DAT_API dat_rmr_free (
+	IN      DAT_RMR_HANDLE);	/* rmr_handle           */
+
+/* PSP functions */
+
+extern DAT_RETURN DAT_API dat_psp_create (
+	IN      DAT_IA_HANDLE,          /* ia_handle            */
+	IN      DAT_CONN_QUAL,          /* conn_qual            */
+	IN      DAT_EVD_HANDLE,         /* evd_handle           */
+	IN      DAT_PSP_FLAGS,          /* psp_flags            */
+	OUT     DAT_PSP_HANDLE * );     /* psp_handle           */
+
+extern DAT_RETURN DAT_API dat_psp_create_any (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_CONN_QUAL *,	/* conn_qual            */
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_PSP_FLAGS,		/* psp_flags            */
+	OUT     DAT_PSP_HANDLE * );	/* psp_handle           */
+
+extern DAT_RETURN DAT_API dat_psp_query (
+	IN      DAT_PSP_HANDLE,		/* psp_handle           */
+	IN      DAT_PSP_PARAM_MASK,	/* psp_param_mask       */
+	OUT     DAT_PSP_PARAM * );	/* psp_param            */
+
+extern DAT_RETURN DAT_API dat_psp_free (
+	IN      DAT_PSP_HANDLE );	/* psp_handle           */
+
+/* RSP functions */
+
+extern DAT_RETURN DAT_API dat_rsp_create (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_CONN_QUAL,		/* conn_qual            */
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	OUT     DAT_RSP_HANDLE * );	/* rsp_handle           */
+
+extern DAT_RETURN DAT_API dat_rsp_query (
+	IN      DAT_RSP_HANDLE,		/* rsp_handle           */
+	IN      DAT_RSP_PARAM_MASK,	/* rsp_param_mask       */
+	OUT     DAT_RSP_PARAM * );	/* rsp_param            */
+
+extern DAT_RETURN DAT_API dat_rsp_free (
+	IN      DAT_RSP_HANDLE );	/* rsp_handle           */
+
+/* CSP functions */
+
+extern DAT_RETURN DAT_API dat_csp_create (
+	IN      DAT_IA_HANDLE,          /* ia_handle            */
+	IN      DAT_COMM *,          	/* communicator		*/
+	IN      DAT_IA_ADDRESS_PTR,     /* address		*/
+	IN      DAT_EVD_HANDLE,         /* evd_handle           */
+	OUT     DAT_CSP_HANDLE * );     /* csp_handle           */
+
+extern DAT_RETURN DAT_API dat_csp_query (
+	IN      DAT_CSP_HANDLE,         /* csp_handle           */
+	IN      DAT_CSP_PARAM_MASK,     /* csp_param_mask       */
+	OUT     DAT_CSP_PARAM * );      /* csp_param            */
+
+extern DAT_RETURN DAT_API dat_csp_free (
+	IN      DAT_CSP_HANDLE );       /* csp_handle           */
+
+/* PZ functions */
+
+extern DAT_RETURN DAT_API dat_pz_create (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_PZ_HANDLE * );	/* pz_handle            */
+
+extern DAT_RETURN DAT_API dat_pz_query (
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_PZ_PARAM_MASK,	/* pz_param_mask        */
+	OUT     DAT_PZ_PARAM *);	/* pz_param             */
+
+extern DAT_RETURN DAT_API dat_pz_free (
+	IN      DAT_PZ_HANDLE );	/* pz_handle            */
+
+/* SRQ functions */
+
+extern DAT_RETURN DAT_API dat_srq_create (
+        IN      DAT_IA_HANDLE,          /* ia_handle            */
+        IN      DAT_PZ_HANDLE,          /* pz_handle            */
+        IN      DAT_SRQ_ATTR *,         /* srq_attr             */
+        OUT     DAT_SRQ_HANDLE *);      /* srq_handle           */
+
+extern DAT_RETURN DAT_API dat_srq_free (
+	IN      DAT_SRQ_HANDLE);        /* srq_handle           */
+
+extern DAT_RETURN DAT_API dat_srq_post_recv (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT,              /* num_segments         */
+	IN      DAT_LMR_TRIPLET *,      /* local_iov            */
+	IN      DAT_DTO_COOKIE);        /* user_cookie          */
+
+extern DAT_RETURN DAT_API dat_srq_query (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_SRQ_PARAM_MASK,     /* srq_param_mask       */
+	OUT     DAT_SRQ_PARAM *);       /* srq_param            */
+
+extern DAT_RETURN DAT_API dat_srq_resize (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* srq_max_recv_dto     */
+
+extern DAT_RETURN DAT_API dat_srq_set_lw (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* low_watermark        */
+
+#ifdef DAT_EXTENSIONS
+typedef int	DAT_EXTENDED_OP;
+extern DAT_RETURN DAT_API dat_extension_op(
+	IN	DAT_HANDLE,		/* handle */
+	IN      DAT_EXTENDED_OP,	/* operation */
+	IN	... );			/* args */
+#endif
+
+/*
+ * DAT registry functions.
+ *
+ * Note the dat_ia_open and dat_ia_close functions are linked to
+ * registration code which "redirects" to the appropriate provider.
+ */
+extern DAT_RETURN DAT_API dat_registry_list_providers (
+	IN      DAT_COUNT,		/* max_to_return        */
+	OUT     DAT_COUNT *,		/* entries_returned     */
+	OUT     DAT_PROVIDER_INFO *(dat_provider_list[]) ); /* dat_provider_list */
+
+/*
+ * DAT error functions.
+ */
+extern DAT_RETURN DAT_API dat_strerror (
+	IN      DAT_RETURN,		/* dat function return */
+	OUT     const char ** ,		/* major message string */
+	OUT     const char ** );	/* minor message string */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DAT_H_ */
+
diff --git a/dat/include/dat2/dat_error.h b/dat/include/dat2/dat_error.h
new file mode 100644
index 0000000..251e6c4
--- /dev/null
+++ b/dat/include/dat2/dat_error.h
@@ -0,0 +1,380 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/***********************************************************
+ *
+ * HEADER: dat_error.h
+ *
+ * PURPOSE: DAT return codes
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 2.0"
+ *
+ * Mapping rules:
+ *	Error types are compound types, as mapped out below.
+ *
+ *********************************************************/
+
+#ifndef _DAT_ERROR_H_
+#define _DAT_ERROR_H_
+
+/*
+ *
+ * All return codes are actually a 3-way tuple:
+ *
+ * type: DAT_RETURN_CLASS DAT_RETURN_TYPE DAT_RETURN_SUBTYPE
+ * bits: 31-30            29-16           15-0
+ *
+ *    3                   2                   1
+ *  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | C | DAT_RETURN_TYPE           | DAT_RETURN_SUBTYPE            |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+/*
+ * Class Bits
+ */
+#define DAT_CLASS_ERROR           0x80000000
+#define DAT_CLASS_WARNING         0x40000000
+#define DAT_CLASS_SUCCESS         0x00000000
+/*
+ * DAT Error bits
+ */
+#define DAT_TYPE_MASK             0x3fff0000 /* mask for DAT_TYPE_STATUS bits */
+#define DAT_SUBTYPE_MASK          0x0000FFFF /* mask for DAT_SUBTYPE_STATUS bits */
+
+/*
+ * Determining the success of an operation is best done with a macro;
+ * each of these returns a boolean value.
+ */
+#define DAT_IS_WARNING(status)  ((DAT_UINT32)(status) & DAT_CLASS_WARNING)
+
+#define DAT_GET_TYPE(status)    ((DAT_UINT32)(status) & DAT_TYPE_MASK)
+#define DAT_GET_SUBTYPE(status) ((DAT_UINT32)(status) & DAT_SUBTYPE_MASK)
+
+/*
+ * DAT return types. The ERROR bit is enabled for these definitions
+ */
+typedef enum dat_return_type
+{
+        /* The operation was successful.                              */
+    DAT_SUCCESS		                        = 0x00000000,
+
+        /* The operation was aborted because IA was closed or EVD was *
+         * destroyed.                                                 */
+    DAT_ABORT                                   = 0x00010000,
+
+        /* The specified Connection Qualifier was in use.             */
+    DAT_CONN_QUAL_IN_USE                        = 0x00020000,
+
+        /* The operation failed due to resource limitations.          */
+    DAT_INSUFFICIENT_RESOURCES                  = 0x00030000,
+
+        /* Provider internal error. This error can be returned by any *
+         * operation when the Provider has detected an internal error.*
+         * This error does not mask any error caused by the Consumer. */
+    DAT_INTERNAL_ERROR                          = 0x00040000,
+
+        /* One of the DAT handles was invalid.                        */
+    DAT_INVALID_HANDLE                          = 0x00050000,
+
+        /* One of the parameters was invalid.                         */
+    DAT_INVALID_PARAMETER                       = 0x00060000,
+
+        /* One of the parameters was invalid for this operation. There*
+         * are Event Streams associated with the Event Dispatcher     *
+	 * feeding it.                                                */
+    DAT_INVALID_STATE                           = 0x00070000,
+
+        /* The size of the receiving buffer is too small for sending  *
+         * buffer data.  The size of the local buffer is too small for*
+         * the data of the remote buffer.                             */
+    DAT_LENGTH_ERROR                            = 0x00080000,
+
+        /* The requested Model was not supported by the Provider.     */
+    DAT_MODEL_NOT_SUPPORTED                     = 0x00090000,
+
+        /* The specified IA name was not found in the list of         *
+	 * registered Providers.                                      */
+    DAT_PROVIDER_NOT_FOUND                      = 0x000A0000,
+
+        /* Protection violation for local or remote memory access     *
+         * Protection Zone mismatch between an LMR of one of the      *
+         * local_iov segments and the local Endpoint.                 */
+    DAT_PRIVILEGES_VIOLATION                    = 0x000B0000,
+
+        /* Privileges violation for local or remote memory access. One*
+         * of the LMRs used in local_iov was either invalid or did not*
+         * have local read privileges.                                */
+    DAT_PROTECTION_VIOLATION                    = 0x000C0000,
+
+        /* The operation timed out without a notification.            */
+    DAT_QUEUE_EMPTY                             = 0x000D0000,
+
+        /* The Event Dispatcher queue is full.                        */
+    DAT_QUEUE_FULL                              = 0x000E0000,
+
+        /* The operation timed out. uDAPL ONLY                        */
+    DAT_TIMEOUT_EXPIRED                         = 0x000F0000,
+
+        /* The provider name was already registered                   */
+    DAT_PROVIDER_ALREADY_REGISTERED             = 0x00100000,
+
+        /* The provider is "in-use" and cannot be closed at this time */
+    DAT_PROVIDER_IN_USE                         = 0x00110000,
+
+        /* The requested remote address is not valid or not reachable */
+    DAT_INVALID_ADDRESS	                        = 0x00120000,
+
+        /* [Unix only] dat_evd_wait or dat_cno_wait has been          *
+	 * interrupted.                                               */
+    DAT_INTERRUPTED_CALL                        = 0x00130000,
+
+        /* No Connection Qualifiers are available                     */
+    DAT_CONN_QUAL_UNAVAILABLE                   = 0x00140000,
+
+    	/* kDAPL reserved LMR 						*/
+    DAT_RESERVED_LMR				= 0x00150000, /* kdapl only */
+
+    	/* The specified IP Port was in use. */
+    DAT_PORT_IN_USE                             = 0x00160000,
+	/* The specified COMM not supported. */
+    DAT_COMM_NOT_SUPPORTED                      = 0x00170000,
+
+#ifdef DAT_EXTENSIONS
+	/* The DAT extensions support. */
+    DAT_EXTENSION_BASE                         = 0x10000000,
+	    /* range 0x10000000 - 0x3FFF0000 is reserved for extensions */
+#endif /* DAT_EXTENSIONS */
+
+        /* Provider does not support the operation yet.               */
+    DAT_NOT_IMPLEMENTED                         = 0x3FFF0000
+} DAT_RETURN_TYPE;
+
+typedef DAT_UINT32 DAT_RETURN;
+
+/* Backward compatibility with DAT 1.0 */
+#define DAT_NAME_NOT_FOUND DAT_PROVIDER_NOT_FOUND
+
+/*
+ * DAT_RETURN_SUBTYPE listing
+ */
+
+typedef enum dat_return_subtype
+{
+	/* First element is no subtype */
+    DAT_NO_SUBTYPE,
+	/* ABORT sub types                                            */
+	/* call was interrupted by a signal, or otherwise             */
+    DAT_SUB_INTERRUPTED,
+
+	/* DAT_CONN_QUAL_IN_USE has no subtypes                       */
+
+	/* INSUFFICIENT_RESOURCES subtypes                            */
+    DAT_RESOURCE_MEMORY,
+    DAT_RESOURCE_DEVICE,
+    DAT_RESOURCE_TEP, /* transport endpoint, e.g. QP */
+    DAT_RESOURCE_TEVD, /* transport EVD, e.g. CQ */
+    DAT_RESOURCE_PROTECTION_DOMAIN,
+    DAT_RESOURCE_MEMORY_REGION, /* HCA memory for LMR or RMR */
+    DAT_RESOURCE_ERROR_HANDLER,
+    DAT_RESOURCE_CREDITS, /* e.g outstanding RDMA Read credit as target */
+    DAT_RESOURCE_SRQ,
+
+        /* DAT_INTERNAL_ERROR has no subtypes */
+
+        /* INVALID_HANDLE subtypes */
+
+    DAT_INVALID_HANDLE_IA,
+    DAT_INVALID_HANDLE_EP,
+    DAT_INVALID_HANDLE_LMR,
+    DAT_INVALID_HANDLE_RMR,
+    DAT_INVALID_HANDLE_PZ,
+    DAT_INVALID_HANDLE_PSP,
+    DAT_INVALID_HANDLE_RSP,
+    DAT_INVALID_HANDLE_CR,
+    DAT_INVALID_HANDLE_CNO,
+    DAT_INVALID_HANDLE_EVD_CR,
+    DAT_INVALID_HANDLE_EVD_REQUEST,
+    DAT_INVALID_HANDLE_EVD_RECV,
+    DAT_INVALID_HANDLE_EVD_CONN,
+    DAT_INVALID_HANDLE_EVD_ASYNC,
+    DAT_INVALID_HANDLE_SRQ,
+    DAT_INVALID_HANDLE_CSP,
+    DAT_INVALID_HANDLE1,
+    DAT_INVALID_HANDLE2,
+    DAT_INVALID_HANDLE3,
+    DAT_INVALID_HANDLE4,
+    DAT_INVALID_HANDLE5,
+    DAT_INVALID_HANDLE6,
+    DAT_INVALID_HANDLE7,
+    DAT_INVALID_HANDLE8,
+    DAT_INVALID_HANDLE9,
+    DAT_INVALID_HANDLE10,
+
+        /* DAT_INVALID_PARAMETER subtypes */
+    DAT_INVALID_ARG1,
+    DAT_INVALID_ARG2,
+    DAT_INVALID_ARG3,
+    DAT_INVALID_ARG4,
+    DAT_INVALID_ARG5,
+    DAT_INVALID_ARG6,
+    DAT_INVALID_ARG7,
+    DAT_INVALID_ARG8,
+    DAT_INVALID_ARG9,
+    DAT_INVALID_ARG10,
+
+	/* DAT_INVALID_EP_STATE subtypes */
+    DAT_INVALID_STATE_EP_UNCONNECTED,
+    DAT_INVALID_STATE_EP_ACTCONNPENDING,
+    DAT_INVALID_STATE_EP_PASSCONNPENDING,
+    DAT_INVALID_STATE_EP_TENTCONNPENDING,
+    DAT_INVALID_STATE_EP_CONNECTED,
+    DAT_INVALID_STATE_EP_DISCONNECTED,
+    DAT_INVALID_STATE_EP_RESERVED,
+    DAT_INVALID_STATE_EP_COMPLPENDING,
+    DAT_INVALID_STATE_EP_DISCPENDING,
+    DAT_INVALID_STATE_EP_PROVIDERCONTROL,
+    DAT_INVALID_STATE_EP_NOTREADY,
+    DAT_INVALID_STATE_EP_RECV_WATERMARK,
+    DAT_INVALID_STATE_EP_PZ,
+    DAT_INVALID_STATE_EP_EVD_REQUEST,
+    DAT_INVALID_STATE_EP_EVD_RECV,
+    DAT_INVALID_STATE_EP_EVD_CONNECT,
+    DAT_INVALID_STATE_EP_UNCONFIGURED,
+    DAT_INVALID_STATE_EP_UNCONFRESERVED,
+    DAT_INVALID_STATE_EP_UNCONFPASSIVE,
+    DAT_INVALID_STATE_EP_UNCONFTENTATIVE,
+    DAT_INVALID_STATE_CNO_IN_USE,
+    DAT_INVALID_STATE_CNO_DEAD,
+
+	/* EVD states. Enabled/Disabled, Waitable/Unwaitable,         *
+	 * and Notify/Solicited/Threshold are 3 orthogonal            *
+	 * bands of EVD state.The Threshold one is uDAPL specific.    */
+    DAT_INVALID_STATE_EVD_OPEN,
+	/* EVD can be either in enabled or disabled but not both      *
+	 * or neither at the same time                                */
+    DAT_INVALID_STATE_EVD_ENABLED,
+    DAT_INVALID_STATE_EVD_DISABLED,
+	/* EVD can be either in waitable or unwaitable but not        *
+	 * both or neither at the same time                           */
+    DAT_INVALID_STATE_EVD_WAITABLE,
+    DAT_INVALID_STATE_EVD_UNWAITABLE,
+	/* Do not release an EVD if it is in use                      */
+    DAT_INVALID_STATE_EVD_IN_USE,
+
+	/* EVD can be either in notify or solicited or threshold      *
+	 * but not any pair, or all, or none at the same time.        *
+	 * The threshold one is for uDAPL only                        */
+    DAT_INVALID_STATE_EVD_CONFIG_NOTIFY,
+    DAT_INVALID_STATE_EVD_CONFIG_SOLICITED,
+    DAT_INVALID_STATE_EVD_CONFIG_THRESHOLD,
+    DAT_INVALID_STATE_EVD_WAITER,
+    DAT_INVALID_STATE_EVD_ASYNC, /* Async EVD required */
+    DAT_INVALID_STATE_IA_IN_USE,
+    DAT_INVALID_STATE_LMR_IN_USE,
+    DAT_INVALID_STATE_LMR_FREE,
+    DAT_INVALID_STATE_PZ_IN_USE,
+    DAT_INVALID_STATE_PZ_FREE,
+
+        /* DAT_INVALID_STATE_SRQ subtypes */
+    DAT_INVALID_STATE_SRQ_OPERATIONAL,
+    DAT_INVALID_STATE_SRQ_ERROR,
+    DAT_INVALID_STATE_SRQ_IN_USE,
+
+        /* DAT_LENGTH_ERROR has no subtypes */
+
+        /* DAT_MODEL_NOT_SUPPORTED has no subtypes */
+
+        /* DAT_PRIVILEGES_VIOLATION subtypes */
+    DAT_PRIVILEGES_READ,
+    DAT_PRIVILEGES_WRITE,
+    DAT_PRIVILEGES_RDMA_READ,
+    DAT_PRIVILEGES_RDMA_WRITE,
+
+        /* DAT_PROTECTION_VIOLATION subtypes */
+    DAT_PROTECTION_READ,
+    DAT_PROTECTION_WRITE,
+    DAT_PROTECTION_RDMA_READ,
+    DAT_PROTECTION_RDMA_WRITE,
+
+        /* DAT_QUEUE_EMPTY has no subtypes */
+
+        /* DAT_QUEUE_FULL has no subtypes */
+
+        /* DAT_TIMEOUT_EXPIRED has no subtypes */
+
+        /* DAT_PROVIDER_ALREADY_REGISTERED has no subtypes */
+
+        /* DAT_PROVIDER_IN_USE has no subtypes */
+
+        /* DAT_INVALID_ADDRESS subtypes */
+
+        /* Unsupported addresses - those that are not Malformed, but   *
+	 * are incorrect for use in DAT (regardless of local routing   *
+         * capabilities): IPv6 Multicast Addresses (ff/8) IPv4         *
+         * Broadcast/Multicast Addresses                               */
+
+    DAT_INVALID_ADDRESS_UNSUPPORTED,
+        /* Unreachable addresses - A Provider might know that certain  *
+	 * addresses are unreachable immediately. One example would be *
+	 * an IPv6 addresses on an IPv4-only system.  This can also be *
+	 * returned if it is known that there is no route to the host. *
+	 * A Provider is not obligated to check for this condition.    */
+    DAT_INVALID_ADDRESS_UNREACHABLE,
+	/* Malformed addresses -- these cannot be valid in any context.*
+	 * Those listed in RFC1884 section 2.3 as "Reserved" or        *
+	 * "Unassigned".                                               */
+    DAT_INVALID_ADDRESS_MALFORMED,
+
+        /* DAT_INTERRUPTED_CALL has no subtypes */
+
+        /* DAT_CONN_QUAL_UNAVAILABLE has no subtypes */
+
+        /* DAT_PROVIDER_NOT_FOUND subtypes. Erratta to the 1.1 spec */
+
+    DAT_NAME_NOT_REGISTERED,
+    DAT_MAJOR_NOT_FOUND,
+    DAT_MINOR_NOT_FOUND,
+    DAT_THREAD_SAFETY_NOT_FOUND
+} DAT_RETURN_SUBTYPE;
+
+#endif /* _DAT_ERROR_H_ */
diff --git a/dat/include/dat2/dat_ib_extensions.h b/dat/include/dat2/dat_ib_extensions.h
new file mode 100755
index 0000000..2c082b1
--- /dev/null
+++ b/dat/include/dat2/dat_ib_extensions.h
@@ -0,0 +1,503 @@
+/*
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.
+ * 
+ * This Software is licensed under one of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dat_ib_extensions.h
+ *
+ * PURPOSE: extensions to the DAT API for IB transport specific services 
+ *	    NOTE: Prototyped IB extension support in openib-cma 1.2 provider.
+ *	          Applications MUST recompile with new dat.h definitions
+ *		  and include this file.
+ *
+ * Description: Header file for "uDAPL: User Direct Access Programming
+ *		Library, Version: 2.0"
+ *
+ * Mapping rules:
+ *      All global symbols are prepended with "DAT_" or "dat_"
+ *      All DAT objects have an 'api' tag which, such as 'ep' or 'lmr'
+ *      The method table is in the provider definition structure.
+ *
+ *
+ **********************************************************************/
+#ifndef _DAT_IB_EXTENSIONS_H_
+#define _DAT_IB_EXTENSIONS_H_
+
+/* 
+ * Provider specific attribute strings for extension support 
+ *	returned with dat_ia_query() and 
+ *	DAT_PROVIDER_ATTR_MASK == DAT_PROVIDER_FIELD_PROVIDER_SPECIFIC_ATTR
+ *
+ *	DAT_NAMED_ATTR	name == extended operations and version, 
+ *			version_value = version number of extension API
+ */
+
+/* 2.0.1 - Initial IB extension support, atomic and immed data
+ *         dat_ib_post_fetch_and_add()
+ *         dat_ib_post_cmp_and_swap()
+ *         dat_ib_post_rdma_write_immed()
+ *		
+ * 2.0.2 - Add UD support, post send and remote_ah via connect events 
+ *         dat_ib_post_send_ud()
+ *
+ * 2.0.3 - Add query/print counter support for IA, EP, and EVD's 
+ *         dat_query_counters(), dat_print_counters()
+ *
+ */
+#define DAT_IB_EXTENSION_VERSION	203	/* 2.0.3 */
+#define DAT_ATTR_COUNTERS		"DAT_COUNTERS"
+#define DAT_IB_ATTR_FETCH_AND_ADD	"DAT_IB_FETCH_AND_ADD"
+#define DAT_IB_ATTR_CMP_AND_SWAP	"DAT_IB_CMP_AND_SWAP"
+#define DAT_IB_ATTR_IMMED_DATA		"DAT_IB_IMMED_DATA"
+#define DAT_IB_ATTR_UD			"DAT_IB_UD"
+
+/* 
+ * Definition for extended EVENT numbers, DAT_IB_EXTENSION_BASE_RANGE
+ * is used by these extensions as a starting point for extended event numbers 
+ *
+ * DAT_IB_DTO_EVENT - All extended data transfers - req/recv evd
+ * DAT_IB_AH_EVENT - address handle resolution - connect evd
+ */
+typedef enum dat_ib_event_number
+{
+	DAT_IB_DTO_EVENT = DAT_IB_EXTENSION_RANGE_BASE,
+	DAT_IB_UD_CONNECTION_REQUEST_EVENT,
+	DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED
+
+} DAT_IB_EVENT_NUMBER;
+
+/* 
+ * Extension operations 
+ */
+typedef enum dat_ib_op
+{
+	DAT_IB_FETCH_AND_ADD_OP,
+	DAT_IB_CMP_AND_SWAP_OP,
+	DAT_IB_RDMA_WRITE_IMMED_OP,
+	DAT_IB_UD_SEND_OP,
+	DAT_QUERY_COUNTERS_OP,
+	DAT_PRINT_COUNTERS_OP
+	
+} DAT_IB_OP;
+
+/*
+ * The DAT_IB_EXT_TYPE enum specifies the type of extension operation that just
+ * completed. All IB extended completion types both, DTO and NON-DTO, are 
+ * reported in the extended operation type with the single DAT_IB_DTO_EVENT type. 
+ * The specific extended DTO operation is reported with a DAT_IB_DTOS type in the 
+ * operation field of the base DAT_EVENT structure. All other extended events are 
+ * identified by unique DAT_IB_EVENT_NUMBER types.
+ */
+typedef enum dat_ib_ext_type
+{
+	DAT_IB_FETCH_AND_ADD,		// 0
+	DAT_IB_CMP_AND_SWAP,		// 1
+	DAT_IB_RDMA_WRITE_IMMED,	// 2
+	DAT_IB_RDMA_WRITE_IMMED_DATA,	// 3
+	DAT_IB_RECV_IMMED_DATA,		// 4
+	DAT_IB_UD_CONNECT_REQUEST,	// 5
+	DAT_IB_UD_REMOTE_AH,		// 6
+	DAT_IB_UD_PASSIVE_REMOTE_AH,	// 7
+	DAT_IB_UD_SEND,			// 8
+	DAT_IB_UD_RECV			// 9
+
+} DAT_IB_EXT_TYPE;
+
+/* 
+ * Extension event status
+ */
+typedef enum dat_ib_status
+{
+	DAT_OP_SUCCESS = DAT_SUCCESS,
+	DAT_IB_OP_ERR,
+
+} DAT_IB_STATUS;
+
+
+/* 
+ * Definitions for additional extension type RETURN codes above
+ * standard DAT types. Included with standard DAT_TYPE_STATUS 
+ * bits using a DAT_EXTENSION BASE as a starting point.
+ */
+typedef enum dat_ib_return
+{
+	DAT_IB_ERR = DAT_EXTENSION_BASE,
+
+} DAT_IB_RETURN;
+
+/* 
+ * Definition for extended IB DTO operations, DAT_DTO_EXTENSION_BASE
+ * is used by DAT extensions as a starting point of extension DTOs 
+ */
+typedef enum dat_ib_dtos
+{
+	DAT_IB_DTO_RDMA_WRITE_IMMED = DAT_DTO_EXTENSION_BASE,
+	DAT_IB_DTO_RECV_IMMED,
+	DAT_IB_DTO_FETCH_ADD,
+	DAT_IB_DTO_CMP_SWAP,
+	DAT_IB_DTO_RECV_MSG_IMMED,
+	DAT_IB_DTO_SEND_UD,
+	DAT_IB_DTO_RECV_UD,
+	DAT_IB_DTO_RECV_UD_IMMED,	
+
+} DAT_IB_DTOS;
+
+/* 
+ * Definitions for additional extension handle types beyond 
+ * standard DAT handle. New Bit definitions MUST start at 
+ * DAT_HANDLE_TYPE_EXTENSION_BASE
+ */
+typedef enum dat_ib_handle_type
+{
+    DAT_IB_HANDLE_TYPE_EXT = DAT_HANDLE_TYPE_EXTENSION_BASE,
+
+} DAT_IB_HANDLE_TYPE;
+
+/*
+ * The DAT_IB_EVD_EXTENSION_FLAGS enum specifies the EVD extension flags that
+ * do not map directly to existing DAT_EVD_FLAGS. This new EVD flag has been 
+ * added to identify an extended EVD that does not fit the existing stream 
+ * types.
+ */
+typedef enum dat_ib_evd_extension_flags
+{
+	DAT_IB_EVD_EXTENSION_FLAG = DAT_EVD_EXTENSION_BASE,
+
+} DAT_IB_EVD_EXTENSION_FLAGS;
+
+/* 
+ * Definition for memory privilege extension flags.
+ * New privileges required for new atomic DTO type extensions.
+ * New Bit definitions MUST start at DAT_MEM_PRIV_EXTENSION
+ */
+typedef enum dat_ib_mem_priv_flags
+{
+	DAT_IB_MEM_PRIV_REMOTE_ATOMIC = DAT_MEM_PRIV_EXTENSION_BASE,
+	
+} DAT_IB_MEM_PRIV_FLAGS;
+
+/* 
+ * Definition for IB address handle, unreliable datagram.
+ */
+typedef struct dat_ib_addr_handle
+{
+    struct ibv_ah	*ah;
+    DAT_UINT32	        qpn;
+    DAT_SOCK_ADDR6	ia_addr;
+   
+} DAT_IB_ADDR_HANDLE;
+
+/* 
+ * Definitions for extended event data:
+ *	When dat_event->event_number >= DAT_IB_EXTENSION_BASE_RANGE
+ *	then dat_event->extension_data == DAT_IB_EXT_EVENT_DATA type
+ *	and ((DAT_IB_EXT_EVENT_DATA*)dat_event->extension_data)->type
+ *	specifies extension data values. 
+ * NOTE: DAT_IB_EXT_EVENT_DATA cannot exceed 64 bytes as defined by 
+ *	 "DAT_UINT64 extension_data[8]" in DAT_EVENT (dat.h)
+ */
+typedef struct dat_ib_immed_data 
+{
+    DAT_UINT32			data;
+
+} DAT_IB_IMMED_DATA;
+
+/* 
+ * Definitions for extended event data:
+ *	When dat_event->event_number >= DAT_IB_EXTENSION_BASE_RANGE
+ *	then dat_event->extension_data == DAT_EXTENSION_EVENT_DATA type
+ *	and ((DAT_EXTENSION_EVENT_DATA*)dat_event->extension_data)->type
+ *	specifies extension data values. 
+ * NOTE: DAT_EXTENSION_EVENT_DATA cannot exceed 64 bytes as defined by 
+ *	 "DAT_UINT64 extension_data[8]" in DAT_EVENT (dat.h)
+ *
+ *  Provide UD address handles via extended connect establishment. 
+ *  ia_addr provided with extended conn events for reference.
+ */
+typedef struct dat_ib_extension_event_data
+{
+    DAT_IB_EXT_TYPE	type;
+    DAT_IB_STATUS	status;
+    union {
+		DAT_IB_IMMED_DATA	immed;
+    } val;
+    DAT_IB_ADDR_HANDLE	remote_ah; 
+
+} DAT_IB_EXTENSION_EVENT_DATA;
+
+/* 
+ * Definitions for additional extension handle types beyond 
+ * standard DAT handle. New Bit definitions MUST start at 
+ * DAT_HANDLE_TYPE_EXTENSION_BASE
+ */
+typedef enum dat_ib_service_type
+{
+    DAT_IB_SERVICE_TYPE_UD   = DAT_SERVICE_TYPE_EXTENSION_BASE,
+
+} DAT_IB_SERVICE_TYPE;
+
+/*
+ * Definitions for 64-bit IA Counters
+ */
+typedef enum dat_ia_counters
+{
+	DCNT_IA_PZ_CREATE,
+	DCNT_IA_PZ_FREE,
+	DCNT_IA_LMR_CREATE,
+	DCNT_IA_LMR_FREE,
+	DCNT_IA_RMR_CREATE,
+	DCNT_IA_RMR_FREE,
+	DCNT_IA_PSP_CREATE,
+	DCNT_IA_PSP_CREATE_ANY,
+	DCNT_IA_PSP_FREE,
+	DCNT_IA_RSP_CREATE,
+	DCNT_IA_RSP_FREE,
+	DCNT_IA_EVD_CREATE,
+	DCNT_IA_EVD_FREE,
+	DCNT_IA_EP_CREATE,
+	DCNT_IA_EP_FREE,
+	DCNT_IA_SRQ_CREATE,
+	DCNT_IA_SRQ_FREE,
+	DCNT_IA_SP_CR,
+	DCNT_IA_SP_CR_ACCEPTED,
+	DCNT_IA_SP_CR_REJECTED,
+	DCNT_IA_MEM_ALLOC,
+	DCNT_IA_MEM_ALLOC_DATA,
+	DCNT_IA_MEM_FREE,
+	DCNT_IA_ASYNC_ERROR,
+	DCNT_IA_ASYNC_QP_ERROR,
+	DCNT_IA_ASYNC_CQ_ERROR,
+	DCNT_IA_ALL_COUNTERS,  /* MUST be last */
+
+} DAT_IA_COUNTERS;
+
+/*
+ * Definitions for 64-bit EP Counters
+ */
+typedef enum dat_ep_counters
+{
+	DCNT_EP_CONNECT,
+	DCNT_EP_DISCONNECT,
+	DCNT_EP_POST_SEND,
+	DCNT_EP_POST_SEND_DATA,
+	DCNT_EP_POST_SEND_UD,
+	DCNT_EP_POST_SEND_UD_DATA,
+	DCNT_EP_POST_RECV,
+	DCNT_EP_POST_RECV_DATA,
+	DCNT_EP_POST_WRITE,
+	DCNT_EP_POST_WRITE_DATA,
+	DCNT_EP_POST_WRITE_IMM,
+	DCNT_EP_POST_WRITE_IMM_DATA,
+	DCNT_EP_POST_READ,
+	DCNT_EP_POST_READ_DATA,
+	DCNT_EP_POST_CMP_SWAP,
+	DCNT_EP_POST_FETCH_ADD,
+	DCNT_EP_RECV,
+	DCNT_EP_RECV_DATA,
+	DCNT_EP_RECV_UD,
+	DCNT_EP_RECV_UD_DATA,
+	DCNT_EP_RECV_IMM,
+	DCNT_EP_RECV_IMM_DATA,
+	DCNT_EP_RECV_RDMA_IMM,
+	DCNT_EP_RECV_RDMA_IMM_DATA,
+	DCNT_EP_ALL_COUNTERS,  /* MUST be last */
+
+} DAT_EP_COUNTERS;
+
+/*
+ * Definitions for 64-bit EVD Counters
+ */
+typedef enum dat_evd_counters
+{
+	DCNT_EVD_WAIT,
+	DCNT_EVD_WAIT_BLOCKED,
+	DCNT_EVD_WAIT_NOTIFY,
+	DCNT_EVD_DEQUEUE,
+	DCNT_EVD_DEQUEUE_FOUND,
+	DCNT_EVD_DEQUEUE_NOT_FOUND,
+	DCNT_EVD_DEQUEUE_POLL,
+	DCNT_EVD_DEQUEUE_POLL_FOUND,
+	DCNT_EVD_CONN_CALLBACK,
+	DCNT_EVD_DTO_CALLBACK,
+	DCNT_EVD_ALL_COUNTERS,  /* MUST be last */
+
+} DAT_EVD_COUNTERS;
+
+/* Extended RETURN and EVENT STATUS string helper functions */
+
+/* DAT_EXT_RETURN error to string */
+static __inline__ DAT_RETURN DAT_API
+dat_strerror_extension (
+    IN  DAT_IB_RETURN 		value,
+    OUT const char 		**message )
+{
+	switch( DAT_GET_TYPE(value) ) {
+	case DAT_IB_ERR:
+		*message = "DAT_IB_ERR";
+		return DAT_SUCCESS;
+	default:
+		/* standard DAT return type */
+		return(dat_strerror(value, message, NULL));
+	}
+}
+
+/* DAT_EXT_STATUS error to string */
+static __inline__ DAT_RETURN DAT_API
+dat_strerror_ext_status (
+    IN  DAT_IB_STATUS 	value,
+    OUT const char 	**message )
+{
+	switch(value) {
+	case 0:
+		*message = " ";
+		return DAT_SUCCESS;
+	case DAT_IB_OP_ERR:
+		*message = "DAT_IB_OP_ERR";
+		return DAT_SUCCESS;
+	default:
+		*message = "unknown extension status";
+		return DAT_INVALID_PARAMETER;
+	}
+}
+
+/* 
+ * Extended IB transport specific APIs
+ *  redirection via DAT extension function
+ */
+
+/*
+ * This asynchronous call is modeled after the InfiniBand atomic 
+ * Fetch and Add operation. The add_value is added to the 64 bit 
+ * value stored at the remote memory location specified in remote_iov
+ * and the result is stored in the local_iov.  
+ */
+#define dat_ib_post_fetch_and_add(ep, add_val, lbuf, cookie, rbuf, flgs) \
+	     dat_extension_op(  ep, \
+				DAT_IB_FETCH_AND_ADD_OP, \
+				(add_val), \
+				(lbuf), \
+				(cookie), \
+				(rbuf), \
+				(flgs))
+				
+/*
+ * This asynchronous call is modeled after the InfiniBand atomic 
+ * Compare and Swap operation. The cmp_value is compared to the 64 bit 
+ * value stored at the remote memory location specified in remote_iov.  
+ * If the two values are equal, the 64 bit swap_value is stored in 
+ * the remote memory location.  In all cases, the original 64 bit 
+ * value stored in the remote memory location is copied to the local_iov.
+ */
+#define dat_ib_post_cmp_and_swap(ep, cmp_val, swap_val, lbuf, cookie, rbuf, flgs) \
+	     dat_extension_op(  ep, \
+				DAT_IB_CMP_AND_SWAP_OP, \
+				(cmp_val), \
+				(swap_val), \
+				(lbuf), \
+				(cookie), \
+				(rbuf), \
+				(flgs))
+
+/* 
+ * RDMA Write with IMMEDIATE:
+ *
+ * This asynchronous call is modeled after the InfiniBand rdma write with  
+ * immediate data operation. Event completion for the request completes as an 
+ * DAT_EXTENSION with extension type set to DAT_DTO_EXTENSION_IMMED_DATA.
+ * Event completion on the remote endpoint completes as receive DTO operation
+ * type of DAT_EXTENSION with operation set to DAT_DTO_EXTENSION_IMMED_DATA.
+ * The immediate data will be provided in the extented DTO event data structure.
+ *
+ * Note to Consumers: the immediate data will consume a receive
+ * buffer at the Data Sink. 
+ *
+ * Other extension flags:
+ *	n/a
+ */
+#define dat_ib_post_rdma_write_immed(ep, size, lbuf, cookie, rbuf, idata, flgs) \
+	     dat_extension_op(  ep, \
+				DAT_IB_RDMA_WRITE_IMMED_OP, \
+				(size), \
+				(lbuf), \
+				(cookie), \
+				(rbuf), \
+				(idata), \
+				(flgs))
+
+/* 
+ * Unreliable datagram: msg send 
+ *
+ * This asynchronous call is modeled after the InfiniBand UD message send
+ * Event completion for the request completes as an 
+ * DAT_EXTENSION with extension type set to DAT_DTO_EXTENSION_UD_SEND.
+ * Event completion on the remote endpoint completes as receive DTO operation
+ * type of DAT_EXTENSION with operation set to DAT_DTO_EXTENSION_UD_RECV.
+ *
+ * Other extension flags:
+ *	n/a
+ */
+#define dat_ib_post_send_ud(ep, segments, lbuf, ah_ptr, cookie, flgs) \
+	     dat_extension_op(  ep, \
+				DAT_IB_UD_SEND_OP, \
+				(segments), \
+				(lbuf), \
+				(ah_ptr), \
+				(cookie), \
+				(flgs))
+
+
+/* 
+ * Query counter(s):  
+ * Provide IA, EP, or EVD and call will return appropriate counters
+ * 	DAT_HANDLE dat_handle, enum cntr, *DAT_UINT64 p_cntrs_out, int reset
+ *
+ * use _ALL_COUNTERS to query all
+ */
+#define dat_query_counters(dat_handle, cntr, p_cntrs_out, reset) \
+	     dat_extension_op(  dat_handle, \
+				DAT_QUERY_COUNTERS_OP, \
+				(cntr), \
+				(p_cntrs_out), \
+				(reset))
+/* 
+ * Print counter(s):  
+ * Provide IA, EP, or EVD and call will print appropriate counters
+ * 	DAT_HANDLE dat_handle, int cntr, int reset
+ * 
+ * use _ALL_COUNTERS to print all
+ */
+#define dat_print_counters(dat_handle, cntr, reset) \
+	     dat_extension_op(  dat_handle, \
+				DAT_PRINT_COUNTERS_OP, \
+				(cntr), \
+				(reset))
+
+#endif /* _DAT_IB_EXTENSIONS_H_ */
+
diff --git a/dat/include/dat2/dat_platform_specific.h b/dat/include/dat2/dat_platform_specific.h
new file mode 100644
index 0000000..79e8d3a
--- /dev/null
+++ b/dat/include/dat2/dat_platform_specific.h
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/***************************************************************
+ *
+ * HEADER: dat_platform_specific.h
+ *
+ * PURPOSE: defines Platform-specific types.
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 2.0"
+ *
+ * Mapping rules:
+ *
+ ***************************************************************/
+
+#ifndef _DAT_PLATFORM_SPECIFIC_H_
+#define _DAT_PLATFORM_SPECIFIC_H_
+
+/* OS, processor, compiler type definitions. Add OSes as needed. */
+
+/*
+ * This captures the alignment for the bus transfer from the HCA/IB chip
+ * to the main memory.
+ */
+#ifndef DAT_OPTIMAL_ALIGNMENT
+#define DAT_OPTIMAL_ALIGNMENT   256             /* Performance optimal alignment */
+#endif /* DAT_OPTIMAL_ALIGNMENT */
+
+/* Assume all OSes use sockaddr, for address family: IPv4 == AF_INET,
+ * IPv6 == AF_INET6. Use of "namelen" field indicated.
+ *
+ * The Interface Adapter Address names an Interface Adapter local or
+ * remote, that is used for connection management and Name
+ * Service. The format of the dat_ia_address_ptr follows the normal
+ * socket programming practice of struct sockaddr *. DAT supports both
+ * IPv4 and IPv6 address families.  Allocation and initialization of
+ * DAT IA address structures must follow normal Sockets programming
+ * procedures. The underlying type of the DAT IA address is the native
+ * struct sockaddr for each target operating system. In all cases,
+ * storage appropriate for the address family in use by the target
+ * Provider must be allocated. For instance, when IPv6 addressing is
+ * in use, this should be allocated as struct sockaddr_net6. The
+ * sockaddr sa_family and, if present, sa_len fields must be
+ * initialized appropriately, as well as the address information.
+ * When passed across the DAPL API this storage is cast to the
+ * DAT_IA_ADDRESS_PTR type. It is the responsibility of the callee to
+ * verify that the sockaddr contains valid data for the requested
+ * operation. It is always the responsibility of the caller to manage
+ * the storage.
+ *
+ * uDAPL code example for Linux (kdapl would be similar):
+ *
+ * #include <stdio.h>
+ * #include <sys/socket.h>
+ * #include <netinet/in.h>
+ * #include <dat2/udat.h>
+ *
+ *  struct sockaddr_in6 addr;
+ *  DAT_IA_ADDRESS_PTR ia_addr;
+ *
+ *	// Note: linux pton requires explicit encoding of IPv4 in IPv6
+ *
+ *	addr.sin6_family = AF_INET6;
+ *	if (inet_pton(AF_INET6, "0:0:0:0:0:FFFF:192.168.0.1",
+ *		      &addr.sin6_addr) <= 0)
+ *	  return(-1); // Bad address or no address family support
+ *
+ *	// initialize other necessary fields such as port, flow, etc
+ *
+ *	ia_addr = (DAT_IA_ADDRESS_PTR) &addr;
+ *	dat_ep_connect(ep_handle, ia_addr, conn_qual, timeout, 0, NULL,
+ *		       qos, DAT_CONNECT_DEFAULT_FLAG);
+ *
+ */
+
+/* Solaris begins */
+#if defined (sun) || defined(__sun) || defined(_sun_) || defined (__solaris__)
+
+#include <sys/types.h>
+#include <inttypes.h>			/* needed for UINT64_C() macro */
+
+typedef uint32_t                DAT_UINT32;	/* Unsigned host order, 32 bits */
+typedef uint64_t                DAT_UINT64;	/* unsigned host order, 64 bits */
+typedef unsigned long long	DAT_UVERYLONG;	/* unsigned longest native to compiler */
+
+typedef void *                  DAT_PVOID;
+typedef int                     DAT_COUNT;
+
+#define DAT_IA_HANDLE_TO_UL(a) (unsigned long)(a)
+#define DAT_UL_TO_IA_HANDLE(a) (DAT_IA_HANDLE)(a)
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+typedef struct sockaddr        DAT_SOCK_ADDR;  /* Socket address header native to OS */
+typedef struct sockaddr_in6    DAT_SOCK_ADDR6; /* Socket address header native to OS */
+
+#define DAT_AF_INET             AF_INET
+#define DAT_AF_INET6            AF_INET6
+
+typedef DAT_UINT64		DAT_PADDR;
+
+#define DAT_API
+#define DAT_EXPORT		extern
+
+/* Solaris ends */
+
+
+/* Linux begins */
+#elif defined(__linux__) /* Linux */
+#if defined(__KERNEL__)
+#include <linux/types.h>
+#else
+#include <sys/types.h>
+#include <linux/stddef.h>
+#endif /* defined(__KERNEL__) */
+
+typedef u_int32_t               DAT_UINT32;	/* unsigned host order, 32 bits */
+typedef u_int64_t               DAT_UINT64;	/* unsigned host order, 64 bits */
+typedef unsigned long long	DAT_UVERYLONG;	/* unsigned longest native to compiler */
+
+typedef void *                  DAT_PVOID;
+typedef int                     DAT_COUNT;
+typedef DAT_UINT64		DAT_PADDR;
+
+#ifndef UINT64_C
+#define UINT64_C(c)	c ## ULL
+#endif /* UINT64_C */
+
+#define DAT_IA_HANDLE_TO_UL(a) (unsigned long)(a)
+#define DAT_UL_TO_IA_HANDLE(a) (DAT_IA_HANDLE)(a)
+
+#if defined(__KERNEL__)
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/in6.h>
+#else
+#include <sys/socket.h>
+#endif /* defined(__KERNEL__) */
+
+typedef struct dat_comm {
+	int	domain;
+	int	type;
+	int	protocol;
+} DAT_COMM;
+
+typedef int DAT_FD;		/* DAT File Descriptor */
+
+typedef struct sockaddr         DAT_SOCK_ADDR; /* Socket address header native to OS */
+typedef struct sockaddr_in6     DAT_SOCK_ADDR6; /* Socket address header native to OS */
+#define DAT_AF_INET		AF_INET
+#define DAT_AF_INET6		AF_INET6
+
+#define DAT_API
+#define DAT_EXPORT		extern
+
+/* Linux ends */
+
+/* Win32/64 begins */
+#elif defined(_MSC_VER) || defined(_WIN32) || defined(_WIN64)
+/* NT. MSC compiler, Win32/64 platform */
+
+typedef unsigned __int32        DAT_UINT32;	/* Unsigned host order, 32 bits */
+typedef unsigned __int64        DAT_UINT64;	/* unsigned host order, 64 bits */
+typedef unsigned  long	        DAT_UVERYLONG;	/* unsigned longest native to compiler */
+
+#if defined(_WIN64)
+#define DAT_IA_HANDLE_TO_UL(a) (unsigned long)((DAT_UINT64)(a))
+#define DAT_UL_TO_IA_HANDLE(a) (DAT_IA_HANDLE)((DAT_UINT64)(a))
+#else // _WIN32
+#define DAT_IA_HANDLE_TO_UL(a) (unsigned long)(a)
+#define DAT_UL_TO_IA_HANDLE(a) (DAT_IA_HANDLE)(a)
+#endif
+
+typedef void *                  DAT_PVOID;
+typedef int                     DAT_COUNT;
+typedef DAT_UINT64              DAT_PADDR;
+
+typedef struct dat_comm {
+	int	domain;
+	int	type;
+	int	protocol;
+} DAT_COMM;
+
+typedef int DAT_FD;		/* DAT File Descriptor */
+
+typedef struct sockaddr     DAT_SOCK_ADDR; /* Sock addr header native to OS */
+typedef struct sockaddr_in6 DAT_SOCK_ADDR6;/* Sock addr header native to OS */
+
+#ifndef UINT64_C
+#define UINT64_C(c) c ## i64
+#endif /* UINT64_C */
+
+#define DAT_AF_INET        AF_INET
+#define DAT_AF_INET6       AF_INET6
+
+#if defined(EXPORT_DAT_SYMBOLS)
+#define DAT_EXPORT	__declspec(dllexport)
+#else
+#define DAT_EXPORT	__declspec(dllimport)
+#endif
+
+#define DAT_API		__stdcall
+
+#ifndef __inline__
+#define __inline__	__inline
+#endif
+
+#ifndef INLINE
+#define INLINE		__inline
+#endif
+
+#if defined(__KDAPL__)
+/* must have the DDK for this definition */
+typedef PHYSICAL_ADDRESS	DAT_PADDR;
+#endif /* __KDAPL__ */
+
+/* Windoze ends */
+
+
+#else
+#error dat_platform_specific.h : OS type not defined
+#endif
+
+#ifndef IN
+#define IN
+#endif
+#ifndef OUT
+#define OUT
+#endif
+#ifndef INOUT
+#define INOUT
+#endif
+
+#endif /* _DAT_PLATFORM_SPECIFIC_H_ */
diff --git a/dat/include/dat2/dat_redirection.h b/dat/include/dat2/dat_redirection.h
new file mode 100755
index 0000000..ea61eff
--- /dev/null
+++ b/dat/include/dat2/dat_redirection.h
@@ -0,0 +1,858 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/****************************************************************
+ *
+ * HEADER: dat_redirection.h
+ *
+ * PURPOSE: Defines the common redirection macros
+ *
+ * Description: Macros to invoke DAPL functions from the dat_registry
+ *
+ * Mapping rules:
+ *      All global symbols are prepended with DAT_ or dat_
+ *      All DAT objects have an 'api' tag which, such as 'ep' or 'lmr'
+ *      The method table is in the provider definition structure.
+ *
+ **********************************************************/
+#ifndef _DAT_REDIRECTION_H_
+#define _DAT_REDIRECTION_H_
+
+typedef struct dat_provider DAT_PROVIDER;
+
+#ifndef DAT_HANDLE_TO_PROVIDER
+
+/* A utility macro to fetch the Provider Library for any object
+ *
+ * An alternate version could be defined for single library systems.
+ * it would look something like:
+ *      extern const struct dat_ia my_single_ia_provider;
+ *      #define DAT_HANDLE_TO_PROVIDER(ignore) &my_single_ia_provider
+ *
+ * This would allow a good compiler to avoid indirection overhead when
+ * making function calls.
+ */
+
+#define DAT_HANDLE_TO_PROVIDER(handle) (*(DAT_PROVIDER **)(handle))
+#endif
+
+#define DAT_IA_QUERY(ia, evd, ia_msk, ia_ptr, p_msk, p_ptr) \
+	(*DAT_HANDLE_TO_PROVIDER (ia)->ia_query_func) (\
+                (ia),               \
+		(evd),              \
+		(ia_msk),           \
+		(ia_ptr),           \
+		(p_msk),            \
+		(p_ptr))
+
+#define DAT_SET_CONSUMER_CONTEXT(handle, context) \
+	(*DAT_HANDLE_TO_PROVIDER (handle)->set_consumer_context_func) (\
+		(handle),           \
+		(context))
+
+#define DAT_GET_CONSUMER_CONTEXT(handle, context) \
+	(*DAT_HANDLE_TO_PROVIDER (handle)->get_consumer_context_func) (\
+		(handle),           \
+		(context))
+
+#define DAT_GET_HANDLE_TYPE(handle, handle_type) \
+	(*DAT_HANDLE_TO_PROVIDER (handle)->get_handle_type_func) (\
+		(handle),           \
+		(handle_type))
+
+#define DAT_CR_QUERY(cr, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (cr)->cr_query_func) (\
+		(cr),               \
+		(mask),             \
+		(param))
+
+#define DAT_CR_ACCEPT(cr, ep, size, pdata) \
+	(*DAT_HANDLE_TO_PROVIDER (cr)->cr_accept_func) (\
+		(cr),               \
+		(ep),               \
+		(size),             \
+		(pdata))
+
+#define DAT_CR_REJECT(cr, size, pdata) \
+	(*DAT_HANDLE_TO_PROVIDER (cr)->cr_reject_func) (\
+		(cr),		\
+		(size),		\
+		(pdata))
+
+#define DAT_CR_HANDOFF(cr,qual) \
+	(*DAT_HANDLE_TO_PROVIDER(cr)->cr_handoff_func)(\
+		(cr),               \
+		(qual))
+
+#define DAT_EVD_QUERY(evd, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (evd)->evd_query_func) (\
+		(evd),              \
+		(mask),             \
+		(param))
+
+#define DAT_EVD_RESIZE(evd, qsize) \
+	(*DAT_HANDLE_TO_PROVIDER (evd)->evd_resize_func) (\
+		(evd),              \
+		(qsize))
+
+#define DAT_EVD_POST_SE(evd, event) \
+	(*DAT_HANDLE_TO_PROVIDER (evd)->evd_post_se_func) (\
+		(evd),              \
+		(event))
+
+#define DAT_EVD_DEQUEUE(evd, event) \
+	(*DAT_HANDLE_TO_PROVIDER (evd)->evd_dequeue_func) (\
+		(evd),              \
+		(event))
+
+#define DAT_EVD_FREE(evd)\
+	(*DAT_HANDLE_TO_PROVIDER (evd)->evd_free_func) (\
+		(evd))
+
+#define DAT_EP_CREATE(ia, pz, in_evd, out_evd, connect_evd, attr, ep) \
+	(*DAT_HANDLE_TO_PROVIDER (ia)->ep_create_func) (\
+		(ia),               \
+		(pz),               \
+		(in_evd),           \
+		(out_evd),          \
+		(connect_evd),      \
+		(attr),             \
+		(ep))
+
+#define DAT_EP_CREATE_WITH_SRQ(ia, pz, in_evd, out_evd, \
+	connect_evd, srq, attr, ep) \
+		(*DAT_HANDLE_TO_PROVIDER (ia)->ep_create_with_srq_func) (\
+		(ia),                \
+		(pz),                \
+		(in_evd),            \
+		(out_evd),           \
+		(connect_evd),       \
+		(srq),               \
+		(attr),              \
+		(ep))
+
+#define DAT_EP_QUERY(ep, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_query_func) (\
+		(ep),                \
+		(mask),              \
+		(param))
+
+#define DAT_EP_MODIFY(ep, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_modify_func) (\
+		(ep),                \
+		(mask),              \
+		(param))
+
+#define DAT_EP_CONNECT(ep, ia_addr, conn_qual, \
+	timeout, psize, pdata, qos, flags) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_connect_func) (\
+		(ep),                \
+		(ia_addr),           \
+		(conn_qual),         \
+		(timeout),           \
+		(psize),             \
+		(pdata),             \
+		(qos),               \
+		(flags))
+
+#define DAT_EP_COMMON_CONNECT(ep, addr, timeout, psize, pdata) \
+        (*DAT_HANDLE_TO_PROVIDER(ep)->ep_common_connect_func)(\
+		(ep),		\
+		(addr),		\
+		(timeout),	\
+		(psize),	\
+		(pdata))
+		
+#define DAT_EP_DUP_CONNECT(ep, dup, timeout, psize, pdata, qos) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_dup_connect_func) (\
+		(ep),                \
+		(dup),               \
+		(timeout),           \
+		(psize),             \
+		(pdata),             \
+		(qos))
+
+#define DAT_EP_DISCONNECT(ep, flags) \
+	(*DAT_HANDLE_TO_PROVIDER(ep)->ep_disconnect_func) (\
+		(ep),                \
+		(flags))
+
+#define DAT_EP_POST_SEND(ep, size, lbuf, cookie, flags) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_post_send_func) (\
+		(ep),                \
+		(size),              \
+		(lbuf),              \
+		(cookie),            \
+		(flags))
+
+#define DAT_EP_POST_SEND_WITH_INVALIDATE( \
+		ep,size,lbuf,cookie,flags,inv_flag,rmr_context) \
+	(*DAT_HANDLE_TO_PROVIDER(ep)-> \
+	ep_post_send_with_invalidate_func)(\
+		(ep),		\
+		(size),		\
+		(lbuf),		\
+		(cookie),	\
+		(flags), 	\
+		(inv_flag), 	\
+		(rmr_context))
+
+#define DAT_EP_POST_RECV(ep, size, lbuf, cookie, flags) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_post_recv_func) (\
+		(ep),                \
+		(size),              \
+		(lbuf),              \
+		(cookie),            \
+		(flags))
+
+#define DAT_EP_POST_RDMA_READ(ep, size, lbuf, cookie, rbuf, flags) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_post_rdma_read_func) (\
+		(ep),                \
+		(size),              \
+		(lbuf),              \
+		(cookie),            \
+		(rbuf),              \
+		(flags))
+
+#define DAT_EP_POST_RDMA_READ_TO_RMR(ep, lbuf, cookie, rbuf, flags) \
+	        (*DAT_HANDLE_TO_PROVIDER(ep)->ep_post_rdma_read_to_rmr_func)(\
+		(ep),		\
+		(lbuf),		\
+		(cookie),	\
+		(rbuf),		\
+		(flags))
+
+#define DAT_EP_POST_RDMA_WRITE(ep, size, lbuf, cookie, rbuf, flags) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_post_rdma_write_func) (\
+		(ep),                \
+		(size),              \
+		(lbuf),              \
+		(cookie),            \
+		(rbuf),              \
+		(flags))
+
+#define DAT_EP_GET_STATUS(ep, ep_state, recv_idle, request_idle) \
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_get_status_func) (\
+		(ep),                \
+		(ep_state),          \
+		(recv_idle),         \
+		(request_idle))
+
+#define DAT_EP_FREE(ep)\
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_free_func) (\
+		(ep))
+
+#define DAT_EP_RESET(ep)\
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_reset_func) (\
+		(ep))
+
+#define DAT_EP_RECV_QUERY(ep, nbuf_alloc, buf_span)\
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_recv_query_func) (\
+		(ep),                \
+		(nbuf_alloc),        \
+		(buf_span))
+
+#define DAT_EP_SET_WATERMARK(ep, soft_wm, hard_wm)\
+	(*DAT_HANDLE_TO_PROVIDER (ep)->ep_set_watermark_func) (\
+		(ep),                \
+		(soft_wm),           \
+		(hard_wm))
+
+#define DAT_LMR_QUERY(lmr, mask, param)\
+	(*DAT_HANDLE_TO_PROVIDER (lmr)->lmr_query_func) (\
+		(lmr),               \
+		(mask),              \
+		(param))
+
+#define DAT_LMR_FREE(lmr)\
+	(*DAT_HANDLE_TO_PROVIDER (lmr)->lmr_free_func) (\
+		(lmr))
+
+#define DAT_LMR_SYNC_RDMA_READ(ia, lbuf, size)\
+	(*DAT_HANDLE_TO_PROVIDER (ia)->lmr_sync_rdma_read_func) (\
+		(ia),                \
+		(lbuf),              \
+		(size))
+
+#define DAT_LMR_SYNC_RDMA_WRITE(ia, lbuf, size)\
+	(*DAT_HANDLE_TO_PROVIDER (ia)->lmr_sync_rdma_write_func) (\
+		(ia),                \
+		(lbuf),              \
+		(size))
+
+#define DAT_RMR_CREATE(pz, rmr) \
+	(*DAT_HANDLE_TO_PROVIDER (pz)->rmr_create_func) (\
+		(pz),                \
+		(rmr))
+
+#define DAT_RMR_CREATE_FOR_EP(pz, rmr) \
+	(*DAT_HANDLE_TO_PROVIDER (pz)->rmr_create_for_ep_func) (\
+		(pz),                \
+		(rmr))
+
+#define DAT_RMR_QUERY(rmr, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (rmr)->rmr_query_func) (\
+		(rmr),               \
+		(mask),              \
+		(param))
+
+#define DAT_RMR_BIND(rmr, lmr, lmr_triplet, mem_priv, \
+		va_type, ep, cookie, flags, context) \
+	(*DAT_HANDLE_TO_PROVIDER (rmr)->rmr_bind_func) (\
+		(rmr),               \
+		(lmr),               \
+		(lmr_triplet),		\
+		(mem_priv),          \
+		(va_type), 		\
+		(ep),                \
+		(cookie),            \
+		(flags),             \
+		(context))
+
+#define DAT_RMR_FREE(rmr)\
+	(*DAT_HANDLE_TO_PROVIDER (rmr)->rmr_free_func) (\
+		(rmr))
+
+#define DAT_PSP_CREATE(ia, conn_qual, evd, flags, handle) \
+	(*DAT_HANDLE_TO_PROVIDER (ia)->psp_create_func) (\
+		(ia),                \
+		(conn_qual),         \
+		(evd),               \
+		(flags),             \
+		(handle))
+
+#define DAT_PSP_CREATE_ANY(ia, conn_qual, evd, flags, handle) \
+	(*DAT_HANDLE_TO_PROVIDER (ia)->psp_create_any_func) (\
+		(ia),                \
+		(conn_qual),         \
+		(evd),               \
+		(flags),             \
+		(handle))
+
+#define DAT_PSP_QUERY(psp, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (psp)->psp_query_func) (\
+		(psp),               \
+		(mask),              \
+		(param))
+
+#define DAT_PSP_FREE(psp)\
+	(*DAT_HANDLE_TO_PROVIDER (psp)->psp_free_func) (\
+		(psp))
+
+#define DAT_RSP_CREATE(ia, conn_qual, ep, evd, handle) \
+	(*DAT_HANDLE_TO_PROVIDER (ia)->rsp_create_func) (\
+		(ia),                \
+		(conn_qual),         \
+		(ep),                \
+		(evd),               \
+		(handle))
+
+#define DAT_RSP_QUERY(rsp, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (rsp)->rsp_query_func) (\
+		(rsp),               \
+		(mask),              \
+		(param))
+
+#define DAT_RSP_FREE(rsp)\
+	(*DAT_HANDLE_TO_PROVIDER (rsp)->rsp_free_func) (\
+		(rsp))
+
+#define DAT_CSP_CREATE(ia, comm, addr, evd, handle) \
+	        (*DAT_HANDLE_TO_PROVIDER(ia)->csp_create_func)(\
+	(ia),\
+	(comm),\
+	(addr),\
+	(evd),\
+	(handle))
+
+#define DAT_CSP_QUERY(csp, mask, param) \
+	        (*DAT_HANDLE_TO_PROVIDER(csp)->csp_query_func)(\
+	(csp),\
+	(mask),\
+	(param))
+
+#define DAT_CSP_FREE(csp)\
+	        (*DAT_HANDLE_TO_PROVIDER(csp)->csp_free_func)(\
+	(csp))
+
+#define DAT_PZ_CREATE(ia, pz) \
+	(*DAT_HANDLE_TO_PROVIDER (ia)->pz_create_func) (\
+		(ia),                \
+		(pz))
+
+#define DAT_PZ_QUERY(pz, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (pz)->pz_query_func) (\
+		(pz),                \
+		(mask),              \
+		(param))
+
+#define DAT_PZ_FREE(pz) \
+	(*DAT_HANDLE_TO_PROVIDER (pz)->pz_free_func) (\
+		(pz))
+
+#define DAT_SRQ_CREATE(ia, pz, attr, srq) \
+	(*DAT_HANDLE_TO_PROVIDER (ia)->srq_create_func) (\
+		(ia),                \
+		(pz),                \
+		(attr),              \
+		(srq))
+
+#define DAT_SRQ_SET_LW(srq, lw) \
+	(*DAT_HANDLE_TO_PROVIDER (srq)->srq_set_lw_func) (\
+		(srq),               \
+		(lw))
+
+#define DAT_SRQ_FREE(srq) \
+	(*DAT_HANDLE_TO_PROVIDER (srq)->srq_free_func) (\
+		(srq))
+
+#define DAT_SRQ_QUERY(srq, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (srq)->srq_query_func) (\
+		(srq),               \
+		(mask),              \
+		(param))
+
+#define DAT_SRQ_RESIZE(srq, qsize) \
+	(*DAT_HANDLE_TO_PROVIDER (srq)->srq_resize_func) (\
+		(srq),               \
+		(qsize))
+
+#define DAT_SRQ_POST_RECV(srq, size, lbuf, cookie) \
+	(*DAT_HANDLE_TO_PROVIDER (srq)->srq_post_recv_func) (\
+		(srq),                \
+		(size),              \
+		(lbuf),              \
+		(cookie))
+
+#define DAT_IA_HA_RELATED (ia, name, answer) \
+	                (*DAT_HANDLE_TO_PROVIDER(ia)->ia_ha_related) (\
+	(ia), \
+	(name), \
+	(answer))
+
+#ifdef DAT_EXTENSIONS
+#define DAT_HANDLE_EXTENDEDOP(handle, op, args) \
+	(*DAT_HANDLE_TO_PROVIDER (handle)->handle_extendedop_func) (\
+		(handle), \
+		(op), \
+		(args))
+#endif
+
+/***************************************************************
+ *
+ * FUNCTION PROTOTYPES
+ ****************************************************************/
+
+typedef DAT_RETURN (DAT_API *DAT_IA_OPEN_FUNC) (
+	IN      const DAT_NAME_PTR,	/* provider             */
+	IN      DAT_COUNT,		/* asynch_evd_min_qlen  */
+	INOUT   DAT_EVD_HANDLE *,	/* asynch_evd_handle    */
+	OUT     DAT_IA_HANDLE *);	/* ia_handle            */
+
+typedef DAT_RETURN (DAT_API *DAT_IA_OPENV_FUNC) (
+	IN      const DAT_NAME_PTR,	/* provider             */
+	IN      DAT_COUNT,		/* asynch_evd_min_qlen  */
+	INOUT   DAT_EVD_HANDLE *,	/* asynch_evd_handle    */
+	OUT     DAT_IA_HANDLE *,	/* ia_handle            */
+	IN      DAT_UINT32,		/* dat_major_version number */
+	IN      DAT_UINT32,		/* dat_minor_version number */
+	IN      DAT_BOOLEAN);		/* dat_thread_safety    */
+
+typedef DAT_RETURN (DAT_API *DAT_IA_CLOSE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+typedef DAT_RETURN (DAT_API *DAT_IA_QUERY_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_EVD_HANDLE *,	/* async_evd_handle     */
+	IN      DAT_IA_ATTR_MASK,	/* ia_attr_mask         */
+	OUT     DAT_IA_ATTR *,		/* ia_attr              */
+	IN      DAT_PROVIDER_ATTR_MASK, /* provider_attr_mask   */
+	OUT     DAT_PROVIDER_ATTR * );	/* provider_attr        */
+
+/* helper functions */
+
+typedef DAT_RETURN (DAT_API *DAT_SET_CONSUMER_CONTEXT_FUNC) (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	IN      DAT_CONTEXT);		/* context              */
+
+typedef DAT_RETURN (DAT_API *DAT_GET_CONSUMER_CONTEXT_FUNC) (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	OUT     DAT_CONTEXT * );	/* context              */
+
+typedef DAT_RETURN (DAT_API *DAT_GET_HANDLE_TYPE_FUNC) (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	OUT     DAT_HANDLE_TYPE * );	/* dat_handle_type       */
+
+/* CR functions */
+
+typedef DAT_RETURN (DAT_API *DAT_CR_QUERY_FUNC) (
+	IN      DAT_CR_HANDLE,		/* cr_handle            */
+	IN      DAT_CR_PARAM_MASK,	/* cr_param_mask        */
+	OUT     DAT_CR_PARAM * );	/* cr_param             */
+
+typedef DAT_RETURN (DAT_API *DAT_CR_ACCEPT_FUNC) (
+	IN      DAT_CR_HANDLE,		/* cr_handle            */
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* private_data_size    */
+	IN      const DAT_PVOID );	/* private_data         */
+
+typedef DAT_RETURN (DAT_API *DAT_CR_REJECT_FUNC) (
+	IN      DAT_CR_HANDLE, 		/* cr_handle            */
+	IN	DAT_COUNT,		/* private_data_size	*/
+	IN	const DAT_PVOID );      /* private_data         */
+
+/* For DAT-1.1 this function is defined for both uDAPL and kDAPL.
+ * For DAT-1.0 it was only defined for uDAPL.
+ */
+
+typedef DAT_RETURN (DAT_API *DAT_CR_HANDOFF_FUNC) (
+    IN          DAT_CR_HANDLE,		/* cr_handle            */
+    IN          DAT_CONN_QUAL);		/* handoff              */
+
+/* EVD functions */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_RESIZE_FUNC) (
+	IN      DAT_EVD_HANDLE,	       /* evd_handle           */
+	IN      DAT_COUNT );	       /* evd_min_qlen         */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_POST_SE_FUNC) (
+	IN      DAT_EVD_HANDLE,	       /* evd_handle           */
+	IN      const DAT_EVENT * );   /* event                */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_DEQUEUE_FUNC) (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	OUT     DAT_EVENT * );		/* event                */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_FREE_FUNC) (
+	IN      DAT_EVD_HANDLE );	/* evd_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_QUERY_FUNC) (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_EVD_PARAM_MASK,	/* evd_param_mask       */
+	OUT     DAT_EVD_PARAM * );	/* evd_param            */
+
+/* EP functions */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_EVD_HANDLE,		/* recv_completion_evd_handle */
+	IN      DAT_EVD_HANDLE,		/* request_completion_evd_handle */
+	IN      DAT_EVD_HANDLE,		/* connect_evd_handle   */
+	IN      const DAT_EP_ATTR *,	/* ep_attributes        */
+	OUT     DAT_EP_HANDLE * );	/* ep_handle            */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_CREATE_WITH_SRQ_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_EVD_HANDLE,		/* recv_completion_evd_handle */
+	IN      DAT_EVD_HANDLE,		/* request_completion_evd_handle */
+	IN      DAT_EVD_HANDLE,		/* connect_evd_handle   */
+	IN      DAT_SRQ_HANDLE,		/* srq_handle           */
+	IN      const DAT_EP_ATTR *,	/* ep_attributes        */
+	OUT     DAT_EP_HANDLE * );	/* ep_handle            */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_QUERY_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EP_PARAM_MASK,	/* ep_param_mask        */
+	OUT     DAT_EP_PARAM * );	/* ep_param             */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_MODIFY_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EP_PARAM_MASK,	/* ep_param_mask        */
+	IN      const DAT_EP_PARAM * ); /* ep_param             */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_CONNECT_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_IA_ADDRESS_PTR,	/* remote_ia_address    */
+	IN      DAT_CONN_QUAL,		/* remote_conn_qual     */
+	IN      DAT_TIMEOUT,		/* timeout              */
+	IN      DAT_COUNT,		/* private_data_size    */
+	IN      const DAT_PVOID,	/* private_data         */
+	IN      DAT_QOS,		/* quality_of_service   */
+	IN      DAT_CONNECT_FLAGS );	/* connect_flags        */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_COMMON_CONNECT_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_IA_ADDRESS_PTR,	/* remote_ia_address    */
+	IN      DAT_TIMEOUT,		/* timeout              */
+	IN      DAT_COUNT,		/* private_data_size    */
+	IN      const DAT_PVOID	);	/* private_data         */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_DUP_CONNECT_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EP_HANDLE,		/* ep_dup_handle        */
+	IN      DAT_TIMEOUT,		/* timeout              */
+	IN      DAT_COUNT,		/* private_data_size    */
+	IN      const DAT_PVOID,	/* private_data         */
+	IN      DAT_QOS);		/* quality_of_service   */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_DISCONNECT_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_POST_SEND_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_POST_SEND_WITH_INVALIDATE_FUNC) (
+	IN      DAT_EP_HANDLE,          /* ep_handle            */
+	IN      DAT_COUNT,              /* num_segments         */
+	IN      DAT_LMR_TRIPLET *,      /* local_iov            */
+	IN      DAT_DTO_COOKIE,         /* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS, /* completion_flags     */
+	IN      DAT_BOOLEAN, /* invalidate_flag */
+	IN      DAT_RMR_CONTEXT ); /* RMR context */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_POST_RECV_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_POST_RDMA_READ_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      const DAT_RMR_TRIPLET *,/* remote_iov           */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_POST_RDMA_READ_TO_RMR_FUNC) (
+	IN      DAT_EP_HANDLE,          /* ep_handle            */
+	IN      const DAT_RMR_TRIPLET *,        /* local_iov            */
+	IN      DAT_DTO_COOKIE,         /* user_cookie          */
+	IN      const DAT_RMR_TRIPLET *,/* remote_iov           */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_POST_RDMA_WRITE_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE,		/* user_cookie          */
+	IN      const DAT_RMR_TRIPLET *,/* remote_iov           */
+	IN      DAT_COMPLETION_FLAGS ); /* completion_flags     */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_GET_STATUS_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	OUT     DAT_EP_STATE *,		/* ep_state             */
+	OUT     DAT_BOOLEAN *,		/* recv_idle            */
+	OUT     DAT_BOOLEAN * );	/* request_idle         */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_FREE_FUNC) (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_RESET_FUNC) (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_RECV_QUERY_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	OUT     DAT_COUNT *,		/* nbufs_allocated      */
+	OUT     DAT_COUNT *);		/* bufs_alloc_span      */
+
+typedef DAT_RETURN (DAT_API *DAT_EP_SET_WATERMARK_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_COUNT,		/* ep_soft_high_watermark*/
+	IN      DAT_COUNT );		/* ep_hard_high_watermark*/
+
+/* LMR functions */
+
+typedef DAT_RETURN (DAT_API *DAT_LMR_FREE_FUNC) (
+	IN      DAT_LMR_HANDLE );	/* lmr_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_LMR_SYNC_RDMA_READ_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      const DAT_LMR_TRIPLET *,/* local segments       */
+	IN      DAT_VLEN );		/* num_segments         */
+
+typedef DAT_RETURN (DAT_API *DAT_LMR_SYNC_RDMA_WRITE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      const DAT_LMR_TRIPLET *, /* local_segments      */
+	IN      DAT_VLEN );		/* num_segments         */
+
+/* RMR functions */
+
+typedef DAT_RETURN (DAT_API *DAT_RMR_CREATE_FUNC) (
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	OUT     DAT_RMR_HANDLE *);	/* rmr_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_RMR_CREATE_FOR_EP_FUNC) (
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	OUT     DAT_RMR_HANDLE *);	/* rmr_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_RMR_QUERY_FUNC) (
+	IN      DAT_RMR_HANDLE,		/* rmr_handle           */
+	IN      DAT_RMR_PARAM_MASK,	/* rmr_param_mask       */
+	OUT     DAT_RMR_PARAM *);	/* rmr_param            */
+
+typedef DAT_RETURN (DAT_API *DAT_RMR_BIND_FUNC) (
+	IN      DAT_RMR_HANDLE,		/* rmr_handle           */
+	IN      DAT_LMR_HANDLE,		/* lmr_handle           */
+	IN      const DAT_LMR_TRIPLET *,/* lmr_triplet          */
+	IN      DAT_MEM_PRIV_FLAGS,	/* mem_priv             */
+	IN      DAT_VA_TYPE,		/* va_type		*/
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_RMR_COOKIE,		/* user_cookie          */
+	IN      DAT_COMPLETION_FLAGS,	/* completion_flags     */
+	OUT     DAT_RMR_CONTEXT * );	/* context              */
+
+typedef DAT_RETURN (DAT_API *DAT_RMR_FREE_FUNC) (
+	IN      DAT_RMR_HANDLE);	/* rmr_handle           */
+
+/* PSP functions */
+
+typedef DAT_RETURN (DAT_API *DAT_PSP_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_CONN_QUAL,		/* conn_qual            */
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_PSP_FLAGS,		/* psp_flags            */
+	OUT     DAT_PSP_HANDLE * );	/* psp_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_PSP_CREATE_ANY_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_CONN_QUAL *,	/* conn_qual            */
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_PSP_FLAGS,		/* psp_flags            */
+	OUT     DAT_PSP_HANDLE * );	/* psp_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_PSP_QUERY_FUNC) (
+	IN      DAT_PSP_HANDLE, 	/* psp_handle           */
+	IN      DAT_PSP_PARAM_MASK,	/* psp_param_mask       */
+	OUT     DAT_PSP_PARAM * );	/* psp_param            */
+
+typedef DAT_RETURN (DAT_API *DAT_PSP_FREE_FUNC) (
+	IN      DAT_PSP_HANDLE );	/* psp_handle           */
+
+/* RSP functions */
+
+typedef DAT_RETURN (DAT_API *DAT_RSP_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_CONN_QUAL,		/* conn_qual            */
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	OUT     DAT_RSP_HANDLE * );	/* rsp_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_RSP_QUERY_FUNC) (
+	IN      DAT_RSP_HANDLE,		/* rsp_handle           */
+	IN      DAT_RSP_PARAM_MASK,	/* rsp_param_mask       */
+	OUT     DAT_RSP_PARAM * );	/* rsp_param           */
+
+typedef DAT_RETURN (DAT_API *DAT_RSP_FREE_FUNC) (
+	IN      DAT_RSP_HANDLE );	/* rsp_handle           */
+
+	/* CSP functions functions - DAT 2.0 */
+
+typedef DAT_RETURN (DAT_API *DAT_CSP_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,          /* ia_handle */
+	IN      DAT_COMM *,             /* communicator */
+	IN      DAT_IA_ADDRESS_PTR,     /* address */
+	IN      DAT_EVD_HANDLE,         /* evd_handle */
+	OUT     DAT_CSP_HANDLE * );     /* csp_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_CSP_QUERY_FUNC) (
+	IN      DAT_CSP_HANDLE,         /* csp_handle           */
+	IN      DAT_CSP_PARAM_MASK,     /* csp_param_mask       */
+	OUT     DAT_CSP_PARAM * );      /* csp_param            */
+
+typedef DAT_RETURN (DAT_API *DAT_CSP_FREE_FUNC) (
+	IN      DAT_CSP_HANDLE );       /* csp_handle           */
+
+/* PZ functions */
+
+typedef DAT_RETURN (DAT_API *DAT_PZ_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_PZ_HANDLE * );	/* pz_handle            */
+
+typedef DAT_RETURN (DAT_API *DAT_PZ_QUERY_FUNC) (
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_PZ_PARAM_MASK,	/* pz_param_mask        */
+	OUT     DAT_PZ_PARAM *);	/* pz_param             */
+
+typedef DAT_RETURN (DAT_API *DAT_PZ_FREE_FUNC) (
+	IN      DAT_PZ_HANDLE );	/* pz_handle            */
+
+/* SRQ functions */
+
+typedef DAT_RETURN (DAT_API *DAT_SRQ_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_SRQ_ATTR *,		/* srq_attributes       */
+	OUT     DAT_SRQ_HANDLE *);	/* srq_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_SRQ_SET_LW_FUNC) (
+	IN      DAT_SRQ_HANDLE,		/* srq_handle           */
+	IN      DAT_COUNT );		/* srq_low_watermark    */
+
+typedef DAT_RETURN (DAT_API *DAT_SRQ_FREE_FUNC) (
+	IN      DAT_SRQ_HANDLE);	/* srq_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_SRQ_QUERY_FUNC) (
+	IN      DAT_SRQ_HANDLE,		/* srq_handle           */
+	IN      DAT_SRQ_PARAM_MASK,	/* srq_param_mask       */
+	OUT     DAT_SRQ_PARAM *);	/* srq_param            */
+
+typedef DAT_RETURN (DAT_API *DAT_SRQ_RESIZE_FUNC) (
+	IN      DAT_SRQ_HANDLE,		/* srq_handle           */
+	IN      DAT_COUNT );		/* srq_queue_length     */
+
+typedef DAT_RETURN (DAT_API *DAT_SRQ_POST_RECV_FUNC) (
+	IN      DAT_SRQ_HANDLE,		/* srq_handle           */
+	IN      DAT_COUNT,		/* num_segments         */
+	IN      DAT_LMR_TRIPLET *,	/* local_iov            */
+	IN      DAT_DTO_COOKIE );	/* user_cookie          */
+
+typedef DAT_RETURN (DAT_API *DAT_IA_HA_RELATED_FUNC) (
+	IN	DAT_IA_HANDLE, /* ia_handle            */
+	IN const DAT_NAME_PTR, /* provider             */
+	OUT	DAT_BOOLEAN *);		/* answer */
+
+#ifdef DAT_EXTENSIONS	
+#include <stdarg.h>
+typedef DAT_RETURN (DAT_API *DAT_HANDLE_EXTENDEDOP_FUNC)(
+	IN	DAT_HANDLE,		/* handle */
+	IN	DAT_EXTENDED_OP,	/* extended op */
+	IN	va_list);		/* argument list */
+#endif /* DAT_EXTENSIONS */
+
+#endif /* _DAT_REDIRECTION_H_ */
diff --git a/dat/include/dat2/dat_registry.h b/dat/include/dat2/dat_registry.h
new file mode 100644
index 0000000..2c0edcb
--- /dev/null
+++ b/dat/include/dat2/dat_registry.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/****************************************************************
+ *
+ * HEADER: dat_registry.h
+ *
+ * PURPOSE: DAT registration API signatures
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 2.0"
+ *
+ * 		Contains registration external reference signatures
+ * 		for dat registry functions. This file is *only*
+ * 		included by providers, not consumers.
+ *
+ * Mapping rules:
+ * 	All global symbols are prepended with DAT_ or dat_
+ * 	All DAT objects have an 'api' tag which, such as 'ep' or 'lmr'
+ * 	The method table is in the provider definition structure.
+ *
+ **********************************************************/
+#ifndef _DAT_REGISTRY_H_
+#define _DAT_REGISTRY_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#if defined(_UDAT_H_)
+#include <dat2/udat_redirection.h>
+#elif defined(_KDAT_H_)
+#include <dat2/kdat_redirection.h>
+#else
+#error Must include udat.h or kdat.h
+#endif
+
+/*
+ * dat registration API.
+ *
+ * Technically the dat_ia_open is part of the registration API. This
+ * is so the registration module can map the device name to a provider
+ * structure and then call the provider dat_ia_open function.
+ * dat_is_close is also part of the registration API so that the
+ * registration code can be aware when an ia is no longer in use.
+ *
+ */
+
+extern DAT_RETURN DAT_API dat_registry_add_provider (
+	IN  const DAT_PROVIDER *,               /* provider          */
+	IN  const DAT_PROVIDER_INFO* );         /* provider info     */
+
+extern DAT_RETURN DAT_API dat_registry_remove_provider (
+	IN  const DAT_PROVIDER *,               /* provider          */
+	IN  const DAT_PROVIDER_INFO* );         /* provider info     */
+
+/*
+ * Provider initialization APIs.
+ *
+ * Providers that support being automatically loaded by the Registry must
+ * implement these APIs and export them as public symbols.
+ */
+
+#define DAT_PROVIDER_INIT_FUNC_NAME  dat_provider_init
+#define DAT_PROVIDER_FINI_FUNC_NAME  dat_provider_fini
+
+#define DAT_PROVIDER_INIT_FUNC_STR   "dat_provider_init"
+#define DAT_PROVIDER_FINI_FUNC_STR   "dat_provider_fini"
+
+typedef void ( DAT_API *DAT_PROVIDER_INIT_FUNC) (
+	IN const DAT_PROVIDER_INFO *,           /* provider info     */
+	IN const char *);                       /* instance data     */
+
+typedef void ( DAT_API *DAT_PROVIDER_FINI_FUNC) (
+	IN const DAT_PROVIDER_INFO *);          /* provider info     */
+
+typedef enum dat_ha_relationship
+{
+	DAT_HA_FALSE,		/* two IAs are not related		*/
+	DAT_HA_TRUE,		/* two IAs are related			*/
+	DAT_HA_UNKNOWN,		/* relationship is not known		*/
+	DAT_HA_CONFLICTING,	/* 2 IAs do not agree on the relationship */
+	DAT_HA_EXTENSION_BASE
+} DAT_HA_RELATIONSHIP;
+
+extern DAT_RETURN DAT_API dat_registry_providers_related (
+	IN      const DAT_NAME_PTR,
+	IN      const DAT_NAME_PTR,
+	OUT     DAT_HA_RELATIONSHIP * );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DAT_REGISTRY_H_ */
diff --git a/dat/include/dat2/dat_vendor_specific.h b/dat/include/dat2/dat_vendor_specific.h
new file mode 100644
index 0000000..844fc7e
--- /dev/null
+++ b/dat/include/dat2/dat_vendor_specific.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/***************************************************************
+ *
+ * HEADER: dat_vendor_specific.h
+ *
+ * PURPOSE:
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 2.0"
+ *
+ * Mapping rules:
+ *
+ ***************************************************************/
+
+#ifndef _DAT_VENDOR_SPECIFIC_H_
+#define _DAT_VENDOR_SPECIFIC_H_
+
+
+
+/* Vendor-specific extensions */
+
+#if defined(_AMMASSO)
+
+#elif defined(_BROADCOM)
+
+#elif defined(_CISCO)
+
+#elif defined(_IBM)
+
+#elif defined(_INTEL)
+
+#elif defined(_JNI)
+
+#elif defined(_MELLANOX)
+
+#elif defined(_MYRINET)
+
+#elif defined(_NETEFFECT)
+
+#elif defined(_QLOGIC)
+
+#elif defined(_SILVERSTORM)
+
+#elif defined(_VOLTAIRE)
+
+#endif
+
+#endif /* _DAT_VENDOR_SPECIFIC_H_ */
diff --git a/dat/include/dat2/udat.h b/dat/include/dat2/udat.h
new file mode 100755
index 0000000..4ea491e
--- /dev/null
+++ b/dat/include/dat2/udat.h
@@ -0,0 +1,503 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/****************************************************************
+ *
+ * HEADER: udat.h
+ *
+ * PURPOSE: defines the user DAT API
+ *
+ * Description: Header file for "uDAPL: User Direct Access Programming
+ * 				Library, Version: 2.0"
+ *
+ * Mapping rules:
+ *   All global symbols are prepended with DAT_ or dat_
+ *   All DAT objects have an 'api' tag which, such as 'ep' or 'lmr'
+ *   The method table is in the provider definition structure.
+ *
+ ***************************************************************/
+
+#ifndef _UDAT_H_
+#define _UDAT_H_
+
+#include <dat2/udat_config.h>
+#include <dat2/dat_platform_specific.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef enum dat_mem_type
+{
+        /* Shared between udat and kdat */
+    DAT_MEM_TYPE_VIRTUAL              = 0x00,
+    DAT_MEM_TYPE_LMR                  = 0x01,
+        /* udat specific */
+    DAT_MEM_TYPE_SHARED_VIRTUAL       = 0x02
+} DAT_MEM_TYPE;
+
+/* dat handle types */
+typedef enum dat_handle_type
+{
+    DAT_HANDLE_TYPE_CR,
+    DAT_HANDLE_TYPE_EP,
+    DAT_HANDLE_TYPE_EVD,
+    DAT_HANDLE_TYPE_IA,
+    DAT_HANDLE_TYPE_LMR,
+    DAT_HANDLE_TYPE_PSP,
+    DAT_HANDLE_TYPE_PZ,
+    DAT_HANDLE_TYPE_RMR,
+    DAT_HANDLE_TYPE_RSP,
+    DAT_HANDLE_TYPE_CNO,
+    DAT_HANDLE_TYPE_SRQ,
+    DAT_HANDLE_TYPE_CSP
+#ifdef DAT_EXTENSIONS
+    ,DAT_HANDLE_TYPE_EXTENSION_BASE
+#endif
+} DAT_HANDLE_TYPE;
+
+/* EVD state consists of three orthogonal substates.  One for
+ * enabled/disabled,one for waitable/unwaitable, and one for
+ * configuration.  Within each substate the values are mutually
+ * exclusive.
+ */
+typedef enum dat_evd_state
+{
+    DAT_EVD_STATE_ENABLED             = 0x01,
+    DAT_EVD_STATE_DISABLED            = 0x02,
+    DAT_EVD_STATE_WAITABLE            = 0x04,
+    DAT_EVD_STATE_UNWAITABLE          = 0x08,
+    DAT_EVD_STATE_CONFIG_NOTIFY       = 0x10,
+    DAT_EVD_STATE_CONFIG_SOLICITED    = 0x20,
+    DAT_EVD_STATE_CONFIG_THRESHOLD    = 0x30
+} DAT_EVD_STATE;
+
+typedef enum dat_evd_param_mask
+{
+    DAT_EVD_FIELD_IA_HANDLE           = 0x01,
+    DAT_EVD_FIELD_EVD_QLEN            = 0x02,
+    DAT_EVD_FIELD_EVD_STATE           = 0x04,
+    DAT_EVD_FIELD_CNO                 = 0x08,
+    DAT_EVD_FIELD_EVD_FLAGS           = 0x10,
+    DAT_EVD_FIELD_ALL                 = 0x1F
+} DAT_EVD_PARAM_MASK;
+
+typedef DAT_UINT64 DAT_PROVIDER_ATTR_MASK;
+
+enum  dat_lmr_param_mask
+{
+	DAT_LMR_FIELD_IA_HANDLE          = 0x001,
+	DAT_LMR_FIELD_MEM_TYPE           = 0x002,
+	DAT_LMR_FIELD_REGION_DESC        = 0x004,
+	DAT_LMR_FIELD_LENGTH             = 0x008,
+	DAT_LMR_FIELD_PZ_HANDLE          = 0x010,
+	DAT_LMR_FIELD_MEM_PRIV           = 0x020,
+	DAT_LMR_FIELD_VA_TYPE            = 0x040,
+	DAT_LMR_FIELD_LMR_CONTEXT        = 0x080,
+	DAT_LMR_FIELD_RMR_CONTEXT        = 0x100,
+	DAT_LMR_FIELD_REGISTERED_SIZE    = 0x200,
+	DAT_LMR_FIELD_REGISTERED_ADDRESS = 0x400,
+
+	DAT_LMR_FIELD_ALL                = 0x7FF
+};
+
+#include <dat2/dat.h>
+
+typedef DAT_HANDLE      DAT_CNO_HANDLE;
+
+struct dat_evd_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_COUNT                   evd_qlen;
+    DAT_EVD_STATE               evd_state;
+    DAT_CNO_HANDLE              cno_handle;
+    DAT_EVD_FLAGS               evd_flags;
+};
+
+#define DAT_LMR_COOKIE_SIZE 40 /* size of DAT_LMR_COOKIE in bytes */
+typedef char (* DAT_LMR_COOKIE)[DAT_LMR_COOKIE_SIZE];
+
+/* Format for OS wait proxy agent function */
+
+typedef void (DAT_API *DAT_AGENT_FUNC)
+(
+    DAT_PVOID,                 /* instance data */
+    DAT_EVD_HANDLE             /* Event Dispatcher*/
+);
+
+/* Definition */
+
+typedef struct dat_os_wait_proxy_agent
+{
+    DAT_PVOID                   instance_data;
+    DAT_AGENT_FUNC              proxy_agent_func;
+} DAT_OS_WAIT_PROXY_AGENT;
+
+/* Define NULL Proxy agent */
+
+#define DAT_OS_WAIT_PROXY_AGENT_NULL \
+    (DAT_OS_WAIT_PROXY_AGENT) {      \
+    (DAT_PVOID) NULL,                \
+    (DAT_AGENT_FUNC) NULL}
+
+/* Flags */
+
+/* The value specified by the uDAPL Consumer for dat_ia_open to indicate
+ * that no async EVD should be created for the opening instance of an IA.
+ * The same IA has been open before that has the only async EVD to
+ * handle async errors for all open instances of the IA.
+ */
+
+#define DAT_EVD_ASYNC_EXISTS (DAT_EVD_HANDLE) 0x1
+
+/*
+ * The value returned by the dat_ia_query for the case when there is no
+ * async EVD for the IA instance. The Consumer specified the value of
+ * DAT_EVD_ASYNC_EXISTS for the async_evd_handle for dat_ia_open.
+ */
+
+#define DAT_EVD_OUT_OF_SCOPE (DAT_EVD_HANDLE) 0x2
+
+/*
+ * Memory types
+ *
+ * Specifying memory type for LMR create. A Consumer must use a single
+ * value when registering memory. The union of any of these
+ * flags is used in the Provider parameters to indicate what memory
+ * type Provider supports for LMR memory creation.
+ */
+
+/* For udapl only */
+
+typedef struct dat_shared_memory
+{
+    DAT_PVOID                   virtual_address;
+    DAT_LMR_COOKIE              shared_memory_id;
+} DAT_SHARED_MEMORY;
+
+typedef union dat_region_description
+{
+    DAT_PVOID                   for_va;
+    DAT_LMR_HANDLE              for_lmr_handle;
+    DAT_SHARED_MEMORY           for_shared_memory;	/* For udapl only */
+} DAT_REGION_DESCRIPTION;
+
+/* LMR Arguments */
+
+struct dat_lmr_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_MEM_TYPE                mem_type;
+    DAT_REGION_DESCRIPTION      region_desc;
+    DAT_VLEN                    length;
+    DAT_PZ_HANDLE               pz_handle;
+    DAT_MEM_PRIV_FLAGS          mem_priv;
+    DAT_VA_TYPE			va_type;
+    DAT_LMR_CONTEXT             lmr_context;
+    DAT_RMR_CONTEXT             rmr_context;
+    DAT_VLEN                    registered_size;
+    DAT_VADDR                   registered_address;
+};
+
+typedef enum dat_proxy_type
+{
+	DAT_PROXY_TYPE_NONE	= 0x0,
+	DAT_PROXY_TYPE_AGENT	= 0x1,
+	DAT_PROXY_TYPE_FD	= 0x2
+} DAT_PROXY_TYPE;
+
+typedef struct dat_cno_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_PROXY_TYPE		proxy_type;
+    union {
+    	DAT_OS_WAIT_PROXY_AGENT		agent;
+    	DAT_FD				fd;
+	DAT_PVOID			none;
+    } proxy;
+} DAT_CNO_PARAM;
+
+typedef enum dat_cno_param_mask
+{
+    DAT_CNO_FIELD_IA_HANDLE		= 0x1,
+    DAT_CNO_FIELD_PROXY_TYPE		= 0x2,
+    DAT_CNO_FIELD_PROXY			= 0x3,
+    DAT_CNO_FIELD_ALL                	= 0x4
+} DAT_CNO_PARAM_MASK;
+
+struct dat_ia_attr
+{
+	char                        adapter_name[DAT_NAME_MAX_LENGTH];
+	char                        vendor_name[DAT_NAME_MAX_LENGTH];
+	DAT_UINT32                  hardware_version_major;
+	DAT_UINT32                  hardware_version_minor;
+	DAT_UINT32                  firmware_version_major;
+	DAT_UINT32                  firmware_version_minor;
+	DAT_IA_ADDRESS_PTR          ia_address_ptr;
+	DAT_COUNT                   max_eps;
+	DAT_COUNT                   max_dto_per_ep;
+	DAT_COUNT                   max_rdma_read_per_ep_in;
+	DAT_COUNT                   max_rdma_read_per_ep_out;
+	DAT_COUNT                   max_evds;
+	DAT_COUNT                   max_evd_qlen;
+	DAT_COUNT                   max_iov_segments_per_dto;
+	DAT_COUNT                   max_lmrs;
+	DAT_SEG_LENGTH              max_lmr_block_size;
+	DAT_VADDR                   max_lmr_virtual_address;
+	DAT_COUNT                   max_pzs;
+	DAT_SEG_LENGTH              max_message_size;
+	DAT_SEG_LENGTH              max_rdma_size;
+	DAT_COUNT                   max_rmrs;
+	DAT_VADDR                   max_rmr_target_address;
+	DAT_COUNT                   max_srqs;
+	DAT_COUNT                   max_ep_per_srq;
+	DAT_COUNT                   max_recv_per_srq;
+	DAT_COUNT                   max_iov_segments_per_rdma_read;
+	DAT_COUNT                   max_iov_segments_per_rdma_write;
+	DAT_COUNT                   max_rdma_read_in;
+	DAT_COUNT                   max_rdma_read_out;
+	DAT_BOOLEAN                 max_rdma_read_per_ep_in_guaranteed;
+	DAT_BOOLEAN                 max_rdma_read_per_ep_out_guaranteed;
+	DAT_BOOLEAN                 zb_supported;
+	DAT_EXTENSION               extension_supported;
+	DAT_COUNT                   extension_version;
+	DAT_COUNT                   num_transport_attr;
+	DAT_NAMED_ATTR              *transport_attr;
+	DAT_COUNT                   num_vendor_attr;
+	DAT_NAMED_ATTR              *vendor_attr;
+};
+
+
+#define DAT_IA_FIELD_IA_EXTENSION                       UINT64_C(0x100000000)
+#define DAT_IA_FIELD_IA_EXTENSION_VERSION               UINT64_C(0x200000000)
+
+#define DAT_IA_FIELD_IA_NUM_TRANSPORT_ATTR               UINT64_C(0x400000000)
+#define DAT_IA_FIELD_IA_TRANSPORT_ATTR                   UINT64_C(0x800000000)
+#define DAT_IA_FIELD_IA_NUM_VENDOR_ATTR                  UINT64_C(0x1000000000)
+#define DAT_IA_FIELD_IA_VENDOR_ATTR                      UINT64_C(0x2000000000)
+#define DAT_IA_FIELD_ALL                                 UINT64_C(0x3FFFFFFFFF)
+
+/* General Provider attributes. udat specific. */
+
+typedef enum dat_pz_support
+{
+    DAT_PZ_UNIQUE,
+    DAT_PZ_SHAREABLE
+} DAT_PZ_SUPPORT;
+
+#include <dat2/udat_vendor_specific.h>
+
+/* Provider should support merging of all event stream types. Provider
+ * attribute specify support for merging different event stream types.
+ * It is a 2D binary matrix where each row and column represents an event
+ * stream type. Each binary entry is 1 if the event streams of its raw
+ * and column can fed the same EVD, and 0 otherwise. The order of event
+ * streams in row and column is the same as in the definition of
+ * DAT_EVD_FLAGS: index 0 - Software Event, 1- Connection Request,
+ * 2 - DTO Completion, 3 - Connection event, 4 - RMR Bind Completion,
+ * 5 - Asynchronous event. By definition each diagonal entry is 1.
+ * Consumer allocates an array for it and passes it IN as a pointer
+ * for the array that Provider fills. Provider must fill the array
+ * that Consumer passes.
+ */
+
+struct dat_provider_attr
+{
+    char                        provider_name[DAT_NAME_MAX_LENGTH];
+    DAT_UINT32                  provider_version_major;
+    DAT_UINT32                  provider_version_minor;
+    DAT_UINT32                  dapl_version_major;
+    DAT_UINT32                  dapl_version_minor;
+    DAT_MEM_TYPE                lmr_mem_types_supported;
+    DAT_IOV_OWNERSHIP           iov_ownership_on_return;
+    DAT_QOS                     dat_qos_supported;
+    DAT_COMPLETION_FLAGS        completion_flags_supported;
+    DAT_BOOLEAN                 is_thread_safe;
+    DAT_COUNT                   max_private_data_size;
+    DAT_BOOLEAN                 supports_multipath;
+    DAT_EP_CREATOR_FOR_PSP      ep_creator;
+    DAT_PZ_SUPPORT              pz_support;
+    DAT_UINT32                  optimal_buffer_alignment;
+    const DAT_BOOLEAN           evd_stream_merging_supported[6][6];
+    DAT_BOOLEAN                 srq_supported;
+    DAT_COUNT                   srq_watermarks_supported;
+    DAT_BOOLEAN                 srq_ep_pz_difference_supported;
+    DAT_COUNT                   srq_info_supported;
+    DAT_COUNT                   ep_recv_info_supported;
+    DAT_BOOLEAN                 lmr_sync_req;
+    DAT_BOOLEAN                 dto_async_return_guaranteed;
+    DAT_BOOLEAN                 rdma_write_for_rdma_read_req;
+    DAT_BOOLEAN			rdma_read_lmr_rmr_context_exposure;
+    DAT_RMR_SCOPE		rmr_scope_supported;
+    DAT_BOOLEAN                 is_signal_safe;
+    DAT_BOOLEAN                 ha_supported;
+    DAT_HA_LB			ha_loadbalancing;
+    DAT_COUNT                   num_provider_specific_attr;
+    DAT_NAMED_ATTR *            provider_specific_attr;
+};
+
+#define DAT_PROVIDER_FIELD_PROVIDER_NAME                 UINT64_C(0x00000001)
+#define DAT_PROVIDER_FIELD_PROVIDER_VERSION_MAJOR        UINT64_C(0x00000002)
+#define DAT_PROVIDER_FIELD_PROVIDER_VERSION_MINOR        UINT64_C(0x00000004)
+#define DAT_PROVIDER_FIELD_DAPL_VERSION_MAJOR            UINT64_C(0x00000008)
+#define DAT_PROVIDER_FIELD_DAPL_VERSION_MINOR            UINT64_C(0x00000010)
+#define DAT_PROVIDER_FIELD_LMR_MEM_TYPE_SUPPORTED        UINT64_C(0x00000020)
+#define DAT_PROVIDER_FIELD_IOV_OWNERSHIP                 UINT64_C(0x00000040)
+#define DAT_PROVIDER_FIELD_DAT_QOS_SUPPORTED             UINT64_C(0x00000080)
+#define DAT_PROVIDER_FIELD_COMPLETION_FLAGS_SUPPORTED    UINT64_C(0x00000100)
+#define DAT_PROVIDER_FIELD_IS_THREAD_SAFE                UINT64_C(0x00000200)
+#define DAT_PROVIDER_FIELD_MAX_PRIVATE_DATA_SIZE         UINT64_C(0x00000400)
+#define DAT_PROVIDER_FIELD_SUPPORTS_MULTIPATH            UINT64_C(0x00000800)
+#define DAT_PROVIDER_FIELD_EP_CREATOR                    UINT64_C(0x00001000)
+#define DAT_PROVIDER_FIELD_PZ_SUPPORT                    UINT64_C(0x00002000)
+#define DAT_PROVIDER_FIELD_OPTIMAL_BUFFER_ALIGNMENT      UINT64_C(0x00004000)
+#define DAT_PROVIDER_FIELD_EVD_STREAM_MERGING_SUPPORTED  UINT64_C(0x00008000)
+#define DAT_PROVIDER_FIELD_SRQ_SUPPORTED                 UINT64_C(0x00010000)
+#define DAT_PROVIDER_FIELD_SRQ_WATERMARKS_SUPPORTED      UINT64_C(0x00020000)
+#define DAT_PROVIDER_FIELD_SRQ_EP_PZ_DIFFERENCE_SUPPORTED UINT64_C(0x00040000)
+#define DAT_PROVIDER_FIELD_SRQ_INFO_SUPPORTED            UINT64_C(0x00080000)
+#define DAT_PROVIDER_FIELD_EP_RECV_INFO_SUPPORTED        UINT64_C(0x00100000)
+#define DAT_PROVIDER_FIELD_LMR_SYNC_REQ                  UINT64_C(0x00200000)
+#define DAT_PROVIDER_FIELD_DTO_ASYNC_RETURN_GUARANTEED   UINT64_C(0x00400000)
+#define DAT_PROVIDER_FIELD_RDMA_WRITE_FOR_RDMA_READ_REQ  UINT64_C(0x00800000)
+#define DAT_PROVIDER_FIELD_RDMA_READ_LMR_RMR_CONTEXT_EXPOSURE	UINT64_C(0x01000000) 
+#define DAT_PROVIDER_FIELD_RMR_SCOPE_SUPPORTED		UINT64_C(0x02000000)
+#define DAT_PROVIDER_FIELD_IS_SIGNAL_SAFE		UINT64_C(0x04000000)
+#define DAT_PROVIDER_FIELD_HA_SUPPORTED			UINT64_C(0x08000000)
+#define DAT_PROVIDER_FIELD_HA_LB			UINT64_C(0x10000000)
+#define DAT_PROVIDER_FIELD_NUM_PROVIDER_SPECIFIC_ATTR    UINT64_C(0x20000000)
+#define DAT_PROVIDER_FIELD_PROVIDER_SPECIFIC_ATTR        UINT64_C(0x40000000)
+
+#define DAT_PROVIDER_FIELD_ALL                           UINT64_C(0x7FFFFFFF)
+#define DAT_PROVIDER_FIELD_NONE				 UINT64_C(0x0)
+
+/**************************************************************/
+
+/*
+ * User DAT function call definitions,
+ */
+
+extern DAT_RETURN DAT_API dat_lmr_create (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_MEM_TYPE,		/* mem_type             */
+	IN      DAT_REGION_DESCRIPTION, /* region_description   */
+	IN      DAT_VLEN,		/* length               */
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_MEM_PRIV_FLAGS,	/* privileges           */
+	IN	DAT_VA_TYPE,		/* va_type		*/
+	OUT     DAT_LMR_HANDLE *,	/* lmr_handle           */
+	OUT     DAT_LMR_CONTEXT *,	/* lmr_context          */
+	OUT     DAT_RMR_CONTEXT *,	/* rmr_context          */
+	OUT     DAT_VLEN *,		/* registered_length    */
+	OUT     DAT_VADDR * );		/* registered_address   */
+
+extern DAT_RETURN DAT_API dat_lmr_query (
+	IN      DAT_LMR_HANDLE,		/* lmr_handle           */
+	IN      DAT_LMR_PARAM_MASK,	/* lmr_param_mask       */
+	OUT     DAT_LMR_PARAM * );	/* lmr_param            */
+
+/* Event Functions */
+
+extern DAT_RETURN DAT_API dat_evd_create (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_COUNT,		/* evd_min_qlen         */
+	IN      DAT_CNO_HANDLE,		/* cno_handle           */
+	IN      DAT_EVD_FLAGS,		/* evd_flags            */
+	OUT     DAT_EVD_HANDLE * );	/* evd_handle           */
+
+extern DAT_RETURN DAT_API dat_evd_modify_cno (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_CNO_HANDLE);	/* cno_handle           */
+
+extern DAT_RETURN DAT_API dat_cno_create (
+	IN 	DAT_IA_HANDLE,		/* ia_handle            */
+	IN 	DAT_OS_WAIT_PROXY_AGENT,/* agent                */
+	OUT 	DAT_CNO_HANDLE *);	/* cno_handle           */
+
+extern DAT_RETURN DAT_API dat_cno_modify_agent (
+	IN 	DAT_CNO_HANDLE,		 /* cno_handle           */
+	IN 	DAT_OS_WAIT_PROXY_AGENT);/* agent                */
+
+extern DAT_RETURN DAT_API dat_cno_query (
+	IN      DAT_CNO_HANDLE,		/* cno_handle            */
+	IN      DAT_CNO_PARAM_MASK,	/* cno_param_mask        */
+	OUT     DAT_CNO_PARAM * );	/* cno_param             */
+
+extern DAT_RETURN DAT_API dat_cno_free (
+	IN DAT_CNO_HANDLE);		/* cno_handle            */
+
+extern DAT_RETURN DAT_API dat_cno_wait (
+	IN  	DAT_CNO_HANDLE,		/* cno_handle            */
+	IN  	DAT_TIMEOUT,		/* timeout               */
+	OUT 	DAT_EVD_HANDLE *);	/* evd_handle            */
+
+extern DAT_RETURN DAT_API dat_evd_enable (
+	IN      DAT_EVD_HANDLE);	/* evd_handle            */
+
+extern DAT_RETURN DAT_API dat_evd_wait (
+	IN  	DAT_EVD_HANDLE,		/* evd_handle            */
+	IN  	DAT_TIMEOUT,		/* timeout               */
+	IN  	DAT_COUNT,		/* threshold             */
+	OUT 	DAT_EVENT *,		/* event                 */
+	OUT 	DAT_COUNT * );		/* n_more_events         */
+
+extern DAT_RETURN DAT_API dat_evd_disable (
+	IN      DAT_EVD_HANDLE);	/* evd_handle            */
+
+extern DAT_RETURN DAT_API dat_evd_set_unwaitable (
+	IN DAT_EVD_HANDLE);		/* evd_handle            */
+
+extern DAT_RETURN DAT_API dat_evd_clear_unwaitable (
+	IN DAT_EVD_HANDLE);		/* evd_handle            */
+
+extern DAT_RETURN DAT_API dat_cno_fd_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle		*/
+	OUT	DAT_FD *,		/* file descriptor	*/
+	OUT	DAT_CNO_HANDLE * );	/* cno_handle		*/
+
+extern DAT_RETURN DAT_API dat_cno_trigger (
+	IN	DAT_CNO_HANDLE,		/* cno_handle		*/
+	OUT	DAT_EVD_HANDLE * );	/* evd_handle		*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UDAT_H_ */
diff --git a/dat/include/dat2/udat_config.h b/dat/include/dat2/udat_config.h
new file mode 100644
index 0000000..eb92f14
--- /dev/null
+++ b/dat/include/dat2/udat_config.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/***************************************************************
+ *
+ * HEADER: udat_config.h
+ *
+ * PURPOSE: provides uDAPL configuration information.
+ *
+ * Description: Header file for "uDAPL: User Direct Access Programming
+ *              Library, Version: 2.0"
+ *
+ ***************************************************************/
+#ifndef _UDAT_CONFIG_H_
+#define _UDAT_CONFIG_H_
+
+#define DAT_VERSION_MAJOR 2
+#define DAT_VERSION_MINOR 0
+
+/*
+ * The official header files will default DAT_THREADSAFE to DAT_TRUE. If
+ * your project does not wish to use this default, you must ensure that
+ * DAT_THREADSAFE will be set to DAT_FALSE. This may be done by an
+ * explicit #define in a common project header file that is included
+ * before any DAT header files, or through command line directives to the
+ * compiler (presumably controlled by the make environment).
+ */
+
+/*
+ * A site, project or platform may consider setting an alternate default
+ * via their make rules, but are discouraged from doing so by editing
+ * the official header files.
+ */
+
+/*
+ * The Reference Implementation is not Thread Safe. The Reference
+ * Implementation has chosen to go with the first method and define it
+ * explicitly in the header file.
+ */
+#define DAT_THREADSAFE DAT_FALSE
+
+#ifndef DAT_THREADSAFE
+#define DAT_THREADSAFE DAT_TRUE
+#endif /* DAT_THREADSAFE */
+
+/*
+ * Enable DAT  Extensions
+ */
+#ifndef DAT_EXTENSIONS
+#define DAT_EXTENSIONS 1
+#endif
+
+#endif /* _UDAT_CONFIG_H_ */
diff --git a/dat/include/dat2/udat_redirection.h b/dat/include/dat2/udat_redirection.h
new file mode 100755
index 0000000..f180417
--- /dev/null
+++ b/dat/include/dat2/udat_redirection.h
@@ -0,0 +1,356 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/****************************************************************
+ *
+ * HEADER: udat_redirection.h
+ *
+ * PURPOSE: User DAT macro definitions
+ *
+ * Description: Macros to invoke DAPL functions from the dat_registry
+ *
+ * Mapping rules:
+ *      All global symbols are prepended with DAT_ or dat_
+ *      All DAT objects have an 'api' tag which, such as 'ep' or 'lmr'
+ *      The method table is in the provider definition structure.
+ *
+ **********************************************************/
+#ifndef _UDAT_REDIRECTION_H_
+#define _UDAT_REDIRECTION_H_
+
+
+#define DAT_LMR_CREATE(ia, mem_type, reg_desc, len, pz, priv, va_type, \
+                       lmr, lmr_context, rmr_context, reg_len, reg_addr) \
+         (*DAT_HANDLE_TO_PROVIDER(ia)->lmr_create_func)(\
+                (ia),               \
+                (mem_type),         \
+                (reg_desc),         \
+                (len),              \
+                (pz),               \
+                (priv),             \
+		(va_type),	\
+                (lmr),              \
+                (lmr_context),      \
+                (rmr_context),      \
+                (reg_len),          \
+                (reg_addr))
+
+#define DAT_EVD_CREATE(ia, qlen, cno, flags, handle) \
+        (*DAT_HANDLE_TO_PROVIDER(ia)->evd_create_func)(\
+                (ia),               \
+                (qlen),             \
+                (cno),              \
+                (flags),            \
+                (handle))
+
+#define DAT_EVD_ENABLE(evd) \
+        (*DAT_HANDLE_TO_PROVIDER(evd)->evd_enable_func)(\
+                (evd))
+
+#define DAT_EVD_WAIT(evd, timeout, threshold, event, nmore) \
+        (*DAT_HANDLE_TO_PROVIDER(evd)->evd_wait_func)(\
+                (evd),              \
+                (timeout),          \
+                (threshold),        \
+                (event),            \
+                (nmore))
+
+#define DAT_EVD_DISABLE(evd) \
+        (*DAT_HANDLE_TO_PROVIDER(evd)->evd_disable_func)(\
+                (evd))
+
+#define DAT_EVD_SET_UNWAITABLE(evd) \
+        (*DAT_HANDLE_TO_PROVIDER(evd)->evd_set_unwaitable_func)(\
+                (evd))
+
+#define DAT_EVD_CLEAR_UNWAITABLE(evd) \
+        (*DAT_HANDLE_TO_PROVIDER(evd)->evd_clear_unwaitable_func)(\
+                (evd))
+
+#define DAT_EVD_MODIFY_CNO(evd, cno) \
+        (*DAT_HANDLE_TO_PROVIDER(evd)->evd_modify_cno_func)(\
+                (evd),              \
+                (cno))
+
+#define DAT_CNO_CREATE(ia, proxy, cno) \
+        (*DAT_HANDLE_TO_PROVIDER(ia)->cno_create_func)(\
+                (ia),               \
+                (proxy),            \
+                (cno))
+
+#define DAT_CNO_FD_CREATE(ia, fd, cno) \
+	(*DAT_HANDLE_TO_PROVIDER(ia)->cno_fd_create_func)(\
+		(ia),               \
+		(fd),            \
+		(cno))
+
+#define DAT_CNO_TRIGGER(cno, evd) \
+	(*DAT_HANDLE_TO_PROVIDER(cno)->cno_trigger_func)(\
+                (cno),              \
+		(evd))
+
+
+#define DAT_CNO_MODIFY_AGENT(cno, proxy) \
+        (*DAT_HANDLE_TO_PROVIDER(cno)->cno_modify_agent_func)(\
+                (cno),              \
+                (proxy))
+
+#define DAT_CNO_QUERY(cno, mask, param) \
+        (*DAT_HANDLE_TO_PROVIDER(cno)->cno_query_func)(\
+                (cno),              \
+                (mask),             \
+                (param))
+
+#define DAT_CNO_FREE(cno) \
+	(*DAT_HANDLE_TO_PROVIDER(cno)->cno_free_func)(\
+		(cno))
+
+#define DAT_CNO_WAIT(cno,timeout,evd) \
+	(*DAT_HANDLE_TO_PROVIDER(cno)->cno_wait_func)(\
+		(cno),              \
+		(timeout),          \
+		(evd))
+
+/***************************************************************
+ * FUNCTION PROTOTYPES
+ *
+ * User DAT function call definitions,
+ *
+ ****************************************************************/
+
+typedef DAT_RETURN (DAT_API *DAT_LMR_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_MEM_TYPE,		/* mem_type             */
+	IN      DAT_REGION_DESCRIPTION, /* region_description   */
+	IN      DAT_VLEN,		/* length               */
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	IN      DAT_MEM_PRIV_FLAGS,	/* privileges           */
+	IN	DAT_VA_TYPE,		/* va_type		*/
+	OUT     DAT_LMR_HANDLE *,	/* lmr_handle           */
+	OUT     DAT_LMR_CONTEXT *,	/* lmr_context          */
+	OUT     DAT_RMR_CONTEXT *,	/* rmr_context          */
+	OUT     DAT_VLEN *,		/* registered_length    */
+	OUT     DAT_VADDR * );		/* registered_address   */
+
+typedef DAT_RETURN (DAT_API *DAT_LMR_QUERY_FUNC) (
+	IN      DAT_LMR_HANDLE,		/* lmr_handle           */
+	IN      DAT_LMR_PARAM_MASK,	/* lmr_param_mask       */
+	OUT     DAT_LMR_PARAM *);	/* lmr_param            */
+
+/* Event functions */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_COUNT,		/* evd_min_qlen         */
+	IN      DAT_CNO_HANDLE,		/* cno_handle           */
+	IN      DAT_EVD_FLAGS,		/* evd_flags            */
+	OUT     DAT_EVD_HANDLE * );	/* evd_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_MODIFY_CNO_FUNC) (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_CNO_HANDLE);	/* cno_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_CNO_CREATE_FUNC) (
+	IN 	DAT_IA_HANDLE,		/* ia_handle            */
+	IN 	DAT_OS_WAIT_PROXY_AGENT,/* agent                */
+	OUT 	DAT_CNO_HANDLE *);	/* cno_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_CNO_FD_CREATE_FUNC) (
+	IN 	DAT_IA_HANDLE,		/* ia_handle            */
+	OUT	DAT_FD *,		/* file_descriptor	*/
+	OUT 	DAT_CNO_HANDLE *);	/* cno_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_CNO_TRIGGER_FUNC) (
+	IN      DAT_CNO_HANDLE,          /* cno_handle          */
+	OUT     DAT_EVD_HANDLE *);	/* trigger */
+
+typedef DAT_RETURN (DAT_API *DAT_CNO_MODIFY_AGENT_FUNC) (
+	IN 	DAT_CNO_HANDLE,		 /* cno_handle          */
+	IN 	DAT_OS_WAIT_PROXY_AGENT);/* agent               */
+
+typedef DAT_RETURN (DAT_API *DAT_CNO_QUERY_FUNC) (
+	IN      DAT_CNO_HANDLE,		/* cno_handle           */
+	IN      DAT_CNO_PARAM_MASK,	/* cno_param_mask       */
+	OUT     DAT_CNO_PARAM * );	/* cno_param            */
+
+typedef DAT_RETURN (DAT_API *DAT_CNO_FREE_FUNC) (
+	IN DAT_CNO_HANDLE);		/* cno_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_CNO_WAIT_FUNC) (
+	IN  	DAT_CNO_HANDLE,		/* cno_handle           */
+	IN  	DAT_TIMEOUT,		/* timeout              */
+	OUT 	DAT_EVD_HANDLE *);	/* evd_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_ENABLE_FUNC) (
+	IN      DAT_EVD_HANDLE);	/* evd_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_WAIT_FUNC) (
+	IN  	DAT_EVD_HANDLE,		/* evd_handle           */
+	IN  	DAT_TIMEOUT,		/* Timeout              */
+	IN  	DAT_COUNT,		/* Threshold            */
+	OUT 	DAT_EVENT *,		/* event                */
+	OUT 	DAT_COUNT * );		/* N more events        */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_DISABLE_FUNC) (
+	IN      DAT_EVD_HANDLE);	/* evd_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_SET_UNWAITABLE_FUNC) (
+	IN      DAT_EVD_HANDLE);        /* evd_handle           */
+
+typedef DAT_RETURN (DAT_API *DAT_EVD_CLEAR_UNWAITABLE_FUNC) (
+	IN DAT_EVD_HANDLE);		/* evd_handle           */
+
+
+#include <dat2/dat_redirection.h>
+
+struct dat_provider
+{
+    const char *                        device_name;
+    DAT_PVOID                           extension;
+
+    DAT_IA_OPEN_FUNC                    ia_open_func;
+    DAT_IA_QUERY_FUNC                   ia_query_func;
+    DAT_IA_CLOSE_FUNC                   ia_close_func;
+
+    DAT_SET_CONSUMER_CONTEXT_FUNC       set_consumer_context_func;
+    DAT_GET_CONSUMER_CONTEXT_FUNC       get_consumer_context_func;
+    DAT_GET_HANDLE_TYPE_FUNC            get_handle_type_func;
+
+    DAT_CNO_CREATE_FUNC                 cno_create_func;	/* udat only */
+    DAT_CNO_MODIFY_AGENT_FUNC           cno_modify_agent_func;	/* udat only */
+    DAT_CNO_QUERY_FUNC                  cno_query_func;		/* udat only */
+    DAT_CNO_FREE_FUNC                   cno_free_func;		/* udat only */
+    DAT_CNO_WAIT_FUNC                   cno_wait_func;		/* udat only */
+
+    DAT_CR_QUERY_FUNC                   cr_query_func;
+    DAT_CR_ACCEPT_FUNC                  cr_accept_func;
+    DAT_CR_REJECT_FUNC                  cr_reject_func;
+    DAT_CR_HANDOFF_FUNC                 cr_handoff_func;
+
+    DAT_EVD_CREATE_FUNC                 evd_create_func;
+    DAT_EVD_QUERY_FUNC                  evd_query_func;
+
+    DAT_EVD_MODIFY_CNO_FUNC             evd_modify_cno_func;	/* udat only */
+    DAT_EVD_ENABLE_FUNC                 evd_enable_func;	/* udat only */
+    DAT_EVD_DISABLE_FUNC                evd_disable_func;	/* udat only */
+    DAT_EVD_WAIT_FUNC                   evd_wait_func;		/* udat only */
+
+    DAT_EVD_RESIZE_FUNC                 evd_resize_func;
+    DAT_EVD_POST_SE_FUNC                evd_post_se_func;
+    DAT_EVD_DEQUEUE_FUNC                evd_dequeue_func;
+    DAT_EVD_FREE_FUNC                   evd_free_func;
+
+    DAT_EP_CREATE_FUNC                  ep_create_func;
+    DAT_EP_QUERY_FUNC                   ep_query_func;
+    DAT_EP_MODIFY_FUNC                  ep_modify_func;
+    DAT_EP_CONNECT_FUNC                 ep_connect_func;
+    DAT_EP_DUP_CONNECT_FUNC             ep_dup_connect_func;
+    DAT_EP_DISCONNECT_FUNC              ep_disconnect_func;
+    DAT_EP_POST_SEND_FUNC               ep_post_send_func;
+    DAT_EP_POST_RECV_FUNC               ep_post_recv_func;
+    DAT_EP_POST_RDMA_READ_FUNC          ep_post_rdma_read_func;
+    DAT_EP_POST_RDMA_WRITE_FUNC         ep_post_rdma_write_func;
+    DAT_EP_GET_STATUS_FUNC              ep_get_status_func;
+    DAT_EP_FREE_FUNC                    ep_free_func;
+
+    DAT_LMR_CREATE_FUNC                 lmr_create_func;
+    DAT_LMR_QUERY_FUNC                  lmr_query_func;
+
+    DAT_LMR_FREE_FUNC                   lmr_free_func;
+
+    DAT_RMR_CREATE_FUNC                 rmr_create_func;
+    DAT_RMR_QUERY_FUNC                  rmr_query_func;
+    DAT_RMR_BIND_FUNC                   rmr_bind_func;
+    DAT_RMR_FREE_FUNC                   rmr_free_func;
+
+    DAT_PSP_CREATE_FUNC                 psp_create_func;
+    DAT_PSP_QUERY_FUNC                  psp_query_func;
+    DAT_PSP_FREE_FUNC                   psp_free_func;
+
+    DAT_RSP_CREATE_FUNC                 rsp_create_func;
+    DAT_RSP_QUERY_FUNC                  rsp_query_func;
+    DAT_RSP_FREE_FUNC                   rsp_free_func;
+
+    DAT_PZ_CREATE_FUNC                  pz_create_func;
+    DAT_PZ_QUERY_FUNC                   pz_query_func;
+    DAT_PZ_FREE_FUNC                    pz_free_func;
+
+    /* dat-1.1 */
+    DAT_PSP_CREATE_ANY_FUNC             psp_create_any_func;   /* dat-1.1    */
+    DAT_EP_RESET_FUNC                   ep_reset_func;         /* dat-1.1    */
+
+    /* udat-1.1 */
+    DAT_EVD_SET_UNWAITABLE_FUNC         evd_set_unwaitable_func;   /* udat-1.1 */
+    DAT_EVD_CLEAR_UNWAITABLE_FUNC       evd_clear_unwaitable_func; /* udat-1.1 */
+    /* dat-1.2 */
+    DAT_LMR_SYNC_RDMA_READ_FUNC         lmr_sync_rdma_read_func;
+    DAT_LMR_SYNC_RDMA_WRITE_FUNC        lmr_sync_rdma_write_func;
+
+    DAT_EP_CREATE_WITH_SRQ_FUNC         ep_create_with_srq_func;
+    DAT_EP_RECV_QUERY_FUNC              ep_recv_query_func;
+    DAT_EP_SET_WATERMARK_FUNC           ep_set_watermark_func;
+    DAT_SRQ_CREATE_FUNC                 srq_create_func;
+    DAT_SRQ_FREE_FUNC                   srq_free_func;
+    DAT_SRQ_POST_RECV_FUNC              srq_post_recv_func;
+    DAT_SRQ_QUERY_FUNC                  srq_query_func;
+    DAT_SRQ_RESIZE_FUNC                 srq_resize_func;
+    DAT_SRQ_SET_LW_FUNC                 srq_set_lw_func;
+
+	/* DAT 2.0 functions */
+    DAT_CSP_CREATE_FUNC                 csp_create_func;
+    DAT_CSP_QUERY_FUNC                  csp_query_func;
+    DAT_CSP_FREE_FUNC                   csp_free_func;
+	
+    DAT_EP_COMMON_CONNECT_FUNC	        ep_common_connect_func;
+
+    DAT_RMR_CREATE_FOR_EP_FUNC	        rmr_create_for_ep_func;
+    DAT_EP_POST_SEND_WITH_INVALIDATE_FUNC ep_post_send_with_invalidate_func;
+    DAT_EP_POST_RDMA_READ_TO_RMR_FUNC   ep_post_rdma_read_to_rmr_func;
+
+    DAT_CNO_FD_CREATE_FUNC		cno_fd_create_func;
+    DAT_CNO_TRIGGER_FUNC		cno_trigger_func;
+
+    DAT_IA_HA_RELATED_FUNC		ia_ha_related_func;
+
+#ifdef DAT_EXTENSIONS
+    DAT_HANDLE_EXTENDEDOP_FUNC		handle_extendedop_func;
+#endif /* DAT_EXTENSIONS */
+};
+
+#endif /* _UDAT_REDIRECTION_H_ */
diff --git a/dat/include/dat2/udat_vendor_specific.h b/dat/include/dat2/udat_vendor_specific.h
new file mode 100644
index 0000000..dd955f8
--- /dev/null
+++ b/dat/include/dat2/udat_vendor_specific.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ * 
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see 
+ *    http://www.opensource.org/licenses/cpl.php.
+ * 
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ * 
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ * 
+ * Licensee has the right to choose one of the above licenses.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain both the above copyright
+ * notice and one of the license notices.
+ * 
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/***************************************************************
+ *
+ * HEADER: udat_vendor_specific.h
+ *
+ * PURPOSE: Vendor defined macros & support.
+ *
+ * Description: Header file for "uDAPL: User Direct Access Programming
+ *		Library, Version: 2.0"
+ *
+ ***************************************************************/
+#ifndef _UDAT_VENDOR_SPECIFIC_H_
+#define _UDAT_VENDOR_SPECIFIC_H_
+
+#include <dat2/dat_vendor_specific.h>
+
+/* Vendor-specific extensions */
+
+#if defined(_AMMASSO)
+
+#elif defined(_BROADCOM)
+
+#elif defined(_CISCO)
+
+#elif defined(_IBM)
+
+#elif defined(_INTEL)
+
+#elif defined(_JNI)
+
+#elif defined(_MELLANOX)
+
+#elif defined(_MYRINET)
+
+#elif defined(_NETEFFECT)
+
+#elif defined(_QLOGIC)
+
+#elif defined(_SILVERSTORM)
+
+#elif defined(_VOLTAIRE)
+
+#endif
+
+#endif /* _UDAT_VENDOR_SPECIFIC_H_ */
diff --git a/dat/udat/libdat2.map b/dat/udat/libdat2.map
new file mode 100755
index 0000000..3ab4e0c
--- /dev/null
+++ b/dat/udat/libdat2.map
@@ -0,0 +1,78 @@
+DAT_2.0 {
+        global:
+		dat_cno_create;
+		dat_cno_free;
+		dat_cno_modify_agent;
+		dat_cno_query;
+		dat_cno_wait;
+		dat_cr_accept;
+		dat_cr_handoff;
+		dat_cr_query;
+		dat_cr_reject;
+		dat_ep_connect;
+		dat_ep_create;
+		dat_ep_create_with_srq;
+		dat_ep_disconnect;
+		dat_ep_dup_connect;
+		dat_ep_free;
+		dat_ep_get_status;
+		dat_ep_modify;
+		dat_ep_post_rdma_read;
+		dat_ep_post_rdma_write;
+		dat_ep_post_recv;
+		dat_ep_post_send;
+		dat_ep_query;
+		dat_ep_recv_query;
+		dat_ep_reset;
+		dat_ep_set_watermark;
+		dat_evd_clear_unwaitable;
+		dat_evd_create;
+		dat_evd_dequeue;
+		dat_evd_disable;
+		dat_evd_enable;
+		dat_evd_free;
+		dat_evd_modify_cno;
+		dat_evd_post_se;
+		dat_evd_query;
+		dat_evd_resize;
+		dat_evd_set_unwaitable;
+		dat_evd_wait;
+		dat_get_consumer_context;
+		dat_get_handle_type;
+		dat_ia_close;
+		dat_ia_openv;
+		dat_ia_query;
+		dat_lmr_create;
+		dat_lmr_free;
+		dat_lmr_query;
+		dat_lmr_sync_rdma_read;
+		dat_lmr_sync_rdma_write;
+		dat_psp_create;
+		dat_psp_create_any;
+		dat_psp_free;
+		dat_psp_query;
+		dat_pz_create;
+		dat_pz_free;
+		dat_pz_query;
+		dat_registry_add_provider;
+		dat_registry_list_providers;
+		dat_registry_remove_provider;
+		dat_rmr_bind;
+		dat_rmr_create;
+		dat_rmr_free;
+		dat_rmr_query;
+		dat_rsp_create;
+		dat_rsp_free;
+		dat_rsp_query;
+		dat_set_consumer_context;
+		dat_srq_create;
+		dat_srq_free;
+		dat_srq_post_recv;
+		dat_srq_query;
+		dat_srq_resize;
+		dat_srq_set_lw;
+		dats_get_ia_handle;
+		dat_strerror;
+		dat_extension_op;
+	local: *;
+};
diff --git a/dat/udat/linux/dat_osd.c b/dat/udat/linux/dat_osd.c
new file mode 100644
index 0000000..28ac9fa
--- /dev/null
+++ b/dat/udat/linux/dat_osd.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_osd.c
+ *
+ * PURPOSE: Operating System Dependent layer
+ * Description:
+ *	Provide OS dependent functions with a canonical DAPL
+ *	interface. Designed to be portable and hide OS specific quirks
+ *	of common functions.
+ *
+ * $Id: dat_osd.c,v 1.14 2005/04/25 17:29:41 jlentini Exp $
+ **********************************************************************/
+
+#include "dat_osd.h"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Constants                                                         *
+ *                                                                   *
+ *********************************************************************/
+
+#define DAT_DBG_TYPE_ENV 	"DAT_DBG_TYPE"
+#define DAT_DBG_DEST_ENV 	"DAT_DBG_DEST"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Enumerations                                                      *
+ *                                                                   *
+ *********************************************************************/
+
+typedef int 			DAT_OS_DBG_DEST;
+
+typedef enum
+{
+    DAT_OS_DBG_DEST_STDOUT  		= 0x1,
+    DAT_OS_DBG_DEST_SYSLOG  		= 0x2,
+    DAT_OS_DBG_DEST_ALL  		= 0x3
+} DAT_OS_DBG_DEST_TYPE;
+
+
+/*********************************************************************
+ *                                                                   *
+ * Global Variables                                                  *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_OS_DBG_TYPE_VAL 	g_dbg_type = DAT_OS_DBG_TYPE_ERROR;
+static DAT_OS_DBG_DEST 		g_dbg_dest = DAT_OS_DBG_DEST_STDOUT;
+
+
+/***********************************************************************
+ * Function: dat_os_dbg_init
+ ***********************************************************************/
+
+void
+dat_os_dbg_init ( void )
+{
+    char *dbg_type;
+    char *dbg_dest;
+
+    if ( NULL != (dbg_type = dat_os_getenv (DAT_DBG_TYPE_ENV)) )
+    {
+	g_dbg_type = dat_os_strtol (dbg_type, NULL, 0);
+    }
+
+    if ( NULL != (dbg_dest = dat_os_getenv (DAT_DBG_DEST_ENV)) )
+    {
+	g_dbg_dest = dat_os_strtol (dbg_dest, NULL, 0);
+    }
+}
+
+
+/***********************************************************************
+ * Function: dat_os_dbg_print
+ ***********************************************************************/
+
+void
+dat_os_dbg_print (
+    DAT_OS_DBG_TYPE_VAL		type,
+    const char *		fmt,
+    ...)
+{
+    if (type & g_dbg_type)
+    {
+	va_list args;
+
+	if ( DAT_OS_DBG_DEST_STDOUT & g_dbg_dest )
+	{
+	    va_start (args, fmt);
+	    vfprintf (stdout, fmt, args);
+	    fflush (stdout);
+	    va_end (args);
+	}
+
+	if ( DAT_OS_DBG_DEST_SYSLOG & g_dbg_dest )
+	{
+	    va_start (args, fmt);
+	    vsyslog (LOG_USER | LOG_DEBUG, fmt, args);
+	    va_end (args);
+	}
+    }
+}
+
+
+/***********************************************************************
+ * Function: dat_os_library_load
+ ***********************************************************************/
+
+DAT_RETURN
+dat_os_library_load (
+    const char 			*library_path,
+    DAT_OS_LIBRARY_HANDLE 	*library_handle_ptr)
+{
+    DAT_OS_LIBRARY_HANDLE       library_handle;
+
+    if ( NULL != (library_handle = dlopen (library_path, RTLD_NOW | RTLD_GLOBAL)) )
+    {
+	if ( NULL != library_handle_ptr )
+	{
+	    *library_handle_ptr = library_handle;
+	}
+
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	dat_os_dbg_print (DAT_OS_DBG_TYPE_ERROR,
+			 "DAT: library load failure: %s\n",
+			 dlerror ());
+	return DAT_INTERNAL_ERROR;
+    }
+}
+
+
+/***********************************************************************
+ * Function: dat_os_library_unload
+ ***********************************************************************/
+
+DAT_RETURN
+dat_os_library_unload (
+    const DAT_OS_LIBRARY_HANDLE library_handle)
+{
+    if ( 0 != dlclose (library_handle) )
+    {
+	return DAT_INTERNAL_ERROR;
+    }
+    else
+    {
+	return DAT_SUCCESS;
+    }
+}
diff --git a/dat/udat/linux/dat_osd.h b/dat/udat/linux/dat_osd.h
new file mode 100644
index 0000000..40b5b1c
--- /dev/null
+++ b/dat/udat/linux/dat_osd.h
@@ -0,0 +1,415 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * HEADER: dat_osd.h
+ *
+ * PURPOSE: Operating System Dependent layer
+ * Description:
+ *	Provide OS dependent data structures & functions with
+ *	a canonical DAT interface. Designed to be portable
+ *	and hide OS specific quirks of common functions.
+ *
+ * $Id: dat_osd.h,v 1.18 2005/03/24 05:58:36 jlentini Exp $
+ **********************************************************************/
+
+#ifndef _DAT_OSD_H_
+#define _DAT_OSD_H_
+
+/*
+ * This file is defined for Linux systems only, including it on any
+ * other build will cause an error
+ */
+#ifndef __linux__
+#error "UNDEFINED OS TYPE"
+#endif /* __linux__ */
+
+#include <dat2/udat.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <dlfcn.h>
+#include <errno.h>
+#include <pthread.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+#include <unistd.h>
+
+#ifndef STATIC
+#define STATIC static
+#endif /* STATIC */
+
+#ifndef INLINE
+#define INLINE __inline__
+#endif /* INLINE */
+
+
+/*********************************************************************
+ *                                                                   *
+ * Debuging                                                          *
+ *                                                                   *
+ *********************************************************************/
+
+#define dat_os_assert(expr)	assert(expr)
+
+typedef int 			DAT_OS_DBG_TYPE_VAL;
+
+typedef enum
+{
+    DAT_OS_DBG_TYPE_ERROR 		= 0x1,
+    DAT_OS_DBG_TYPE_GENERIC 		= 0x2,
+    DAT_OS_DBG_TYPE_SR  		= 0x4,
+    DAT_OS_DBG_TYPE_DR  		= 0x8,
+    DAT_OS_DBG_TYPE_PROVIDER_API 	= 0x10,
+    DAT_OS_DBG_TYPE_CONSUMER_API 	= 0x20,
+    DAT_OS_DBG_TYPE_ALL 		= 0xff
+} DAT_OS_DBG_TYPE;
+
+extern void
+dat_os_dbg_init ( void );
+
+extern void
+dat_os_dbg_print (
+    DAT_OS_DBG_TYPE_VAL		type,
+    const char *		fmt,
+    ...);
+
+
+/*********************************************************************
+ *                                                                   *
+ * Utility Functions                                                 *
+ *                                                                   *
+ *********************************************************************/
+
+#define DAT_ERROR(Type, SubType) ((DAT_RETURN)(DAT_CLASS_ERROR | Type | SubType))
+#define dat_os_library_error() dlerror()
+
+typedef size_t 			DAT_OS_SIZE;
+typedef void * 			DAT_OS_LIBRARY_HANDLE;
+
+extern DAT_RETURN
+dat_os_library_load (
+    const char 			*library_path,
+    DAT_OS_LIBRARY_HANDLE 	*library_handle_ptr );
+
+STATIC INLINE void *
+dat_os_library_sym (
+    DAT_OS_LIBRARY_HANDLE library_handle,
+    char *sym)
+{
+    return dlsym (library_handle, sym);
+}
+
+extern DAT_RETURN
+dat_os_library_unload (
+    const DAT_OS_LIBRARY_HANDLE library_handle );
+
+STATIC INLINE char *
+dat_os_getenv (
+    const char *name)
+{
+    return getenv (name);
+}
+
+STATIC INLINE long int
+dat_os_strtol (
+    const char *nptr,
+    char **endptr,
+    int base)
+{
+    return strtol (nptr, endptr, base);
+}
+
+STATIC INLINE DAT_OS_SIZE
+dat_os_strlen (
+    const char *s )
+{
+    return strlen (s);
+}
+
+STATIC INLINE int
+dat_os_strncmp (
+    const char *s1,
+    const char *s2,
+    DAT_OS_SIZE n)
+{
+    return strncmp (s1, s2, n);
+}
+
+STATIC INLINE void *
+dat_os_strncpy (
+    char *dest,
+    const char *src,
+    DAT_OS_SIZE len)
+{
+    return strncpy (dest, src, len);
+}
+
+STATIC INLINE DAT_BOOLEAN
+dat_os_isblank (
+    int c)
+{
+    if ( (' ' == c) || ('\t' == c) )
+    {
+	return DAT_TRUE;
+    }
+    else
+    {
+	return DAT_FALSE;
+    }
+}
+
+STATIC INLINE DAT_BOOLEAN
+dat_os_isdigit (
+    int c)
+{
+    if ( isdigit (c) )
+    {
+	return DAT_TRUE;
+    }
+    else
+    {
+	return DAT_FALSE;
+    }
+}
+
+STATIC INLINE void
+dat_os_usleep (
+    unsigned long usec)
+{
+    usleep (usec);
+}
+
+
+/*********************************************************************
+ *                                                                   *
+ * Memory Functions                                                  *
+ *                                                                   *
+ *********************************************************************/
+
+STATIC INLINE void *
+dat_os_alloc (
+    int size)
+{
+    return malloc (size);
+}
+
+STATIC INLINE void
+dat_os_free (
+    void *ptr,
+    int size)
+{
+    free (ptr);
+}
+
+STATIC INLINE void *
+dat_os_memset (void *loc, int c, DAT_OS_SIZE size)
+{
+    return memset (loc, c, size);
+}
+
+
+/*********************************************************************
+ *                                                                   *
+ * File I/O                                                          *
+ *                                                                   *
+ *********************************************************************/
+
+typedef FILE 			DAT_OS_FILE;
+typedef fpos_t                  DAT_OS_FILE_POS;
+
+
+STATIC INLINE DAT_OS_FILE *
+dat_os_fopen (
+    const char * path)
+{
+    /* always open files in read only mode*/
+    return fopen (path, "r");
+}
+
+STATIC INLINE DAT_RETURN
+dat_os_fgetpos (
+    DAT_OS_FILE *file,
+    DAT_OS_FILE_POS *pos)
+{
+    if ( 0 == fgetpos (file, pos) )
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_INTERNAL_ERROR;
+    }
+}
+
+STATIC INLINE DAT_RETURN
+dat_os_fsetpos (
+    DAT_OS_FILE *file,
+    DAT_OS_FILE_POS *pos)
+{
+    if ( 0 == fsetpos (file, pos) )
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_INTERNAL_ERROR;
+    }
+}
+
+/* dat_os_fgetc() returns EOF on error or end of file. */
+STATIC INLINE int
+dat_os_fgetc (
+    DAT_OS_FILE *file)
+{
+    return fgetc (file);
+}
+
+/* dat_os_ungetc() returns EOF on error or char 'c'.
+ * Push char 'c' back into specified stream for subsequent read.
+ */
+STATIC INLINE int
+dat_os_ungetc (
+    DAT_OS_FILE *file, int c)
+{
+    return ungetc(c, file);
+}
+
+/* dat_os_fgetc() returns EOF on error or end of file. */
+STATIC INLINE int
+dat_os_fputc (
+    DAT_OS_FILE *file, int c)
+{
+    return fputc (c, file);
+}
+
+/* dat_os_fread returns the number of bytes read from the file. */
+STATIC INLINE DAT_OS_SIZE
+dat_os_fread (
+    DAT_OS_FILE *file,
+    char *buf,
+    DAT_OS_SIZE len)
+{
+    return fread (buf, sizeof (char), len, file);
+}
+
+STATIC INLINE DAT_RETURN
+dat_os_fclose (
+    DAT_OS_FILE *file)
+{
+    if ( 0 == fclose (file) )
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_INTERNAL_ERROR;
+    }
+}
+
+
+/*********************************************************************
+ *                                                                   *
+ * Locks                                                             *
+ *                                                                   *
+ *********************************************************************/
+
+typedef pthread_mutex_t 	DAT_OS_LOCK;
+
+
+/* lock functions */
+STATIC INLINE DAT_RETURN
+dat_os_lock_init (
+    IN	DAT_OS_LOCK *m)
+{
+    /* pthread_mutex_init always returns 0 */
+    pthread_mutex_init (m, NULL);
+
+    return DAT_SUCCESS;
+}
+
+STATIC INLINE DAT_RETURN
+dat_os_lock (
+    IN	DAT_OS_LOCK *m)
+{
+    if (0 == pthread_mutex_lock (m))
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_INTERNAL_ERROR;
+    }
+}
+
+STATIC INLINE DAT_RETURN
+dat_os_unlock (
+    IN	DAT_OS_LOCK *m)
+{
+    if (0 == pthread_mutex_unlock (m))
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_INTERNAL_ERROR;
+    }
+}
+
+STATIC INLINE DAT_RETURN
+dat_os_lock_destroy (
+    IN	DAT_OS_LOCK *m)
+{
+    if (0 == pthread_mutex_destroy (m))
+    {
+	return DAT_SUCCESS;
+    }
+    else
+    {
+	return DAT_INTERNAL_ERROR;
+    }
+}
+
+
+#endif /*  _DAT_OSD_H_ */
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
+
diff --git a/dat/udat/udat.c b/dat/udat/udat.c
new file mode 100755
index 0000000..03edcf9
--- /dev/null
+++ b/dat/udat/udat.c
@@ -0,0 +1,409 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: udat.c
+ *
+ * PURPOSE: DAT Provider and Consumer registry functions.
+ *
+ * $Id: udat.c,v 1.22 2005/03/24 05:58:35 jlentini Exp $
+ **********************************************************************/
+
+#include <dat2/udat.h>
+#include <dat2/dat_registry.h>	/* Provider API function prototypes */
+
+#include "dat_dr.h"
+#include "dat_init.h"
+#include "dat_osd.h"
+#ifndef DAT_NO_STATIC_REGISTRY
+#include "dat_sr.h"
+#endif
+
+#define UDAT_IS_BAD_POINTER(p) ( NULL == (p) )
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Declarations                                    *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_BOOLEAN udat_check_state(void);
+
+/*********************************************************************
+ *                                                                   *
+ * External Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ *  Use a global to get an unresolved when run with pre-extension library
+ */
+int g_dat_extensions = 0;
+
+/*
+ *
+ * Provider API
+ *
+ */
+
+/***********************************************************************
+ * Function: dat_registry_add_provider
+ ***********************************************************************/
+
+DAT_RETURN DAT_API
+dat_registry_add_provider(IN const DAT_PROVIDER * provider,
+			  IN const DAT_PROVIDER_INFO * provider_info)
+{
+	DAT_DR_ENTRY entry;
+
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_PROVIDER_API,
+			 "DAT Registry: %s (%s,%x:%x,%x)\n", __FUNCTION__,
+			 provider_info->ia_name,
+			 provider_info->dapl_version_major,
+			 provider_info->dapl_version_minor,
+			 provider_info->is_thread_safe);
+
+	if (UDAT_IS_BAD_POINTER(provider)) {
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+	}
+
+	if (UDAT_IS_BAD_POINTER(provider_info)) {
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+	}
+
+	if (DAT_FALSE == udat_check_state()) {
+		return DAT_ERROR(DAT_INVALID_STATE, 0);
+	}
+
+	entry.ref_count = 0;
+	entry.ia_open_func = provider->ia_open_func;
+	entry.info = *provider_info;
+
+	return dat_dr_insert(provider_info, &entry);
+}
+
+//***********************************************************************
+// Function: dat_registry_remove_provider
+//***********************************************************************
+
+DAT_RETURN DAT_API
+dat_registry_remove_provider(IN const DAT_PROVIDER * provider,
+			     IN const DAT_PROVIDER_INFO * provider_info)
+{
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_PROVIDER_API,
+			 "DAT Registry: dat_registry_remove_provider () called\n");
+
+	if (UDAT_IS_BAD_POINTER(provider)) {
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+	}
+
+	if (DAT_FALSE == udat_check_state()) {
+		return DAT_ERROR(DAT_INVALID_STATE, 0);
+	}
+
+	return dat_dr_remove(provider_info);
+}
+
+/*
+ *
+ * Consumer API
+ *
+ */
+
+/***********************************************************************
+ * Function: dat_ia_open
+ ***********************************************************************/
+
+DAT_RETURN DAT_API
+dat_ia_openv(IN const DAT_NAME_PTR name,
+	     IN DAT_COUNT async_event_qlen,
+	     INOUT DAT_EVD_HANDLE * async_event_handle,
+	     OUT DAT_IA_HANDLE * ia_handle,
+	     IN DAT_UINT32 dapl_major,
+	     IN DAT_UINT32 dapl_minor, IN DAT_BOOLEAN thread_safety)
+{
+	DAT_IA_OPEN_FUNC ia_open_func;
+	DAT_PROVIDER_INFO info;
+	DAT_OS_SIZE len;
+	DAT_RETURN dat_status;
+
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+			 "DAT Registry: dat_ia_openv (%s,%x:%x,%x) called\n",
+			 name, dapl_major, dapl_minor, thread_safety);
+
+	if (UDAT_IS_BAD_POINTER(name)) {
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+	}
+
+	len = dat_os_strlen(name);
+
+	if (DAT_NAME_MAX_LENGTH <= len) {
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+	}
+
+	if (UDAT_IS_BAD_POINTER(ia_handle)) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+	}
+
+	if (DAT_FALSE == udat_check_state()) {
+		return DAT_ERROR(DAT_INVALID_STATE, 0);
+	}
+
+	dat_os_strncpy(info.ia_name, name, len + 1);
+
+	info.dapl_version_major = dapl_major;
+	info.dapl_version_minor = dapl_minor;
+	info.is_thread_safe = thread_safety;
+
+	/*
+	 * Since DAT allows providers to be loaded by either the static
+	 * registry or explicitly through OS dependent methods, do not
+	 * return an error if no providers are loaded via the static registry.
+	 * Don't even bother calling the static registry if DAT is compiled
+	 * with no static registry support.
+	 */
+
+#ifndef DAT_NO_STATIC_REGISTRY
+	(void)dat_sr_provider_open(&info);
+#endif
+
+	dat_status = dat_dr_provider_open(&info, &ia_open_func);
+	if (dat_status != DAT_SUCCESS) {
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+				 "DAT Registry: dat_ia_open () provider information "
+				 "for IA name %s not found in dynamic registry\n",
+				 name);
+
+		return dat_status;
+	}
+
+	dat_status = (*ia_open_func) (name,
+				      async_event_qlen,
+				      async_event_handle, ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		*ia_handle = (DAT_IA_HANDLE) dats_set_ia_handle(*ia_handle);
+	}
+
+	/*
+	 *  See if provider supports extensions
+	 */
+	if (dat_status == DAT_SUCCESS) {
+		DAT_IA_ATTR ia_attr;
+
+		if (dat_ia_query(*ia_handle,
+				 NULL,
+				 DAT_IA_ALL,
+				 &ia_attr, 0, NULL) == DAT_SUCCESS) {
+			if (ia_attr.extension_supported) {
+				dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+						 "DAT Registry: dat_ia_open () "
+						 "Extensions (Type=%d, ver=%d) supported!\n",
+						 ia_attr.extension_supported,
+						 ia_attr.extension_version);
+				g_dat_extensions = 1;
+			}
+		}
+	}
+	return dat_status;
+}
+
+/************************************************************************
+ * Function: dat_ia_close
+ ***********************************************************************/
+
+DAT_RETURN DAT_API
+dat_ia_close(IN DAT_IA_HANDLE ia_handle, IN DAT_CLOSE_FLAGS ia_flags)
+{
+	DAT_PROVIDER *provider;
+	DAT_PROVIDER_ATTR provider_attr;
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+	const char *ia_name;
+
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+			 "DAT Registry: dat_ia_close () called\n");
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status != DAT_SUCCESS) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+	}
+
+	if (DAT_FALSE == udat_check_state()) {
+		return DAT_ERROR(DAT_INVALID_STATE, 0);
+	}
+
+	provider = DAT_HANDLE_TO_PROVIDER(dapl_ia_handle);
+	ia_name = provider->device_name;
+
+	if (DAT_SUCCESS != (dat_status = dat_ia_query(ia_handle,
+						      NULL,
+						      0,
+						      NULL,
+						      DAT_PROVIDER_FIELD_ALL,
+						      &provider_attr))) {
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+				 "DAT Registry: query function for %s provider failed\n",
+				 ia_name);
+	} else if (DAT_SUCCESS != (dat_status =
+				   (*provider->ia_close_func) (dapl_ia_handle,
+							       ia_flags))) {
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+				 "DAT Registry: close function for %s provider failed\n",
+				 ia_name);
+	} else {
+		DAT_PROVIDER_INFO info;
+		DAT_OS_SIZE len;
+
+		len = dat_os_strlen(ia_name);
+
+		dat_os_assert(len < DAT_NAME_MAX_LENGTH);
+
+		dat_os_strncpy(info.ia_name, ia_name, len + 1);
+
+		info.dapl_version_major = provider_attr.dapl_version_major;
+		info.dapl_version_minor = provider_attr.dapl_version_minor;
+		info.is_thread_safe = provider_attr.is_thread_safe;
+
+		dat_status = dat_dr_provider_close(&info);
+		if (DAT_SUCCESS != dat_status) {
+			dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+					 "DAT Registry: dynamic registry unable to close "
+					 "provider for IA name %s\n", ia_name);
+		}
+
+		/* Remove the handle from the handle table */
+		(void)dats_free_ia_handle(ia_handle);
+
+#ifndef DAT_NO_STATIC_REGISTRY
+		dat_status = dat_sr_provider_close(&info);
+		if (DAT_SUCCESS != dat_status) {
+			dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+					 "DAT Registry: static registry unable to close "
+					 "provider for IA name %s\n", ia_name);
+		}
+#endif
+	}
+
+	return dat_status;
+}
+
+//***********************************************************************
+// Function: dat_registry_list_providers
+//***********************************************************************
+
+DAT_RETURN DAT_API
+dat_registry_list_providers(IN DAT_COUNT max_to_return,
+			    OUT DAT_COUNT * entries_returned,
+			    OUT DAT_PROVIDER_INFO * (dat_provider_list[]))
+{
+	DAT_RETURN dat_status;
+
+	dat_status = DAT_SUCCESS;
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_CONSUMER_API,
+			 "DAT Registry: dat_registry_list_providers () called\n");
+
+	if (DAT_FALSE == udat_check_state()) {
+		return DAT_ERROR(DAT_INVALID_STATE, 0);
+	}
+
+	if ((UDAT_IS_BAD_POINTER(entries_returned))) {
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
+	}
+
+	if (0 != max_to_return && (UDAT_IS_BAD_POINTER(dat_provider_list))) {
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG3);
+	}
+
+	if (0 == max_to_return) {
+		/* the user is allowed to call with max_to_return set to zero.
+		 * in which case we simply return (in *entries_returned) the
+		 * number of providers currently installed.  We must also
+		 * (per spec) return an error
+		 */
+#ifndef DAT_NO_STATIC_REGISTRY
+		(void)dat_sr_size(entries_returned);
+#else
+		(void)dat_dr_size(entries_returned);
+#endif
+		return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
+	} else {
+#ifndef DAT_NO_STATIC_REGISTRY
+		dat_status = dat_sr_list(max_to_return,
+					 entries_returned, dat_provider_list);
+#else
+		dat_status = dat_dr_list(max_to_return,
+					 entries_returned, dat_provider_list);
+#endif
+	}
+	return dat_status;
+}
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+//***********************************************************************
+// Function: udat_check_state
+//***********************************************************************
+
+/*
+ * This function returns TRUE if the DAT registry is in a state capable
+ * of handling DAT API calls and false otherwise.
+ */
+
+DAT_BOOLEAN udat_check_state(void)
+{
+	DAT_MODULE_STATE state;
+	DAT_BOOLEAN status;
+
+	state = dat_module_get_state();
+
+	if (DAT_MODULE_STATE_UNINITIALIZED == state) {
+		dat_init();
+		status = DAT_TRUE;
+	} else if (DAT_MODULE_STATE_DEINITIALIZED == state) {
+		status = DAT_FALSE;
+	} else {
+		status = DAT_TRUE;
+	}
+
+	return status;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dat/udat/udat_api.c b/dat/udat/udat_api.c
new file mode 100644
index 0000000..5948a4f
--- /dev/null
+++ b/dat/udat/udat_api.c
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2002-2006, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under all of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
+ *    copy of which is in the file LICENSE3.txt in the root directory. The
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution. 
+ *
+ * Neither the name of Network Appliance, Inc. nor the names of other DAT
+ * Collaborative contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: udat.c
+ *
+ * PURPOSE: DAT Provider and Consumer registry functions.
+ *
+ * $Id: udat_api.c 1301 2005-03-24 05:58:55Z jlentini $
+ **********************************************************************/
+
+#include <dat2/udat.h>
+#include <dat2/dat_registry.h>
+#include "dat_osd.h"
+#include "dat_init.h"
+
+#define UDAT_IS_BAD_HANDLE(h) ( NULL == (p) )
+
+DAT_RETURN DAT_API dat_lmr_create(IN DAT_IA_HANDLE ia_handle,
+				  IN DAT_MEM_TYPE mem_type,
+				  IN DAT_REGION_DESCRIPTION region_description,
+				  IN DAT_VLEN length,
+				  IN DAT_PZ_HANDLE pz_handle,
+				  IN DAT_MEM_PRIV_FLAGS privileges,
+				  IN DAT_VA_TYPE va_type,
+				  OUT DAT_LMR_HANDLE * lmr_handle,
+				  OUT DAT_LMR_CONTEXT * lmr_context,
+				  OUT DAT_RMR_CONTEXT * rmr_context,
+				  OUT DAT_VLEN * registered_length,
+				  OUT DAT_VADDR * registered_address)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_LMR_CREATE(dapl_ia_handle,
+					    mem_type,
+					    region_description,
+					    length,
+					    pz_handle,
+					    privileges,
+					    va_type,
+					    lmr_handle,
+					    lmr_context,
+					    rmr_context,
+					    registered_length,
+					    registered_address);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_evd_create(IN DAT_IA_HANDLE ia_handle,
+				  IN DAT_COUNT evd_min_qlen,
+				  IN DAT_CNO_HANDLE cno_handle,
+				  IN DAT_EVD_FLAGS evd_flags,
+				  OUT DAT_EVD_HANDLE * evd_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_EVD_CREATE(dapl_ia_handle,
+					    evd_min_qlen,
+					    cno_handle, evd_flags, evd_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_evd_modify_cno(IN DAT_EVD_HANDLE evd_handle,
+				      IN DAT_CNO_HANDLE cno_handle)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_MODIFY_CNO(evd_handle, cno_handle);
+}
+
+DAT_RETURN DAT_API dat_cno_create(IN DAT_IA_HANDLE ia_handle,
+				  IN DAT_OS_WAIT_PROXY_AGENT agent,
+				  OUT DAT_CNO_HANDLE * cno_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_CNO_CREATE(dapl_ia_handle, agent, cno_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_cno_fd_create(IN DAT_IA_HANDLE ia_handle,
+				     OUT DAT_FD * fd,
+				     OUT DAT_CNO_HANDLE * cno_handle)
+{
+	DAT_IA_HANDLE dapl_ia_handle;
+	DAT_RETURN dat_status;
+
+	dat_status = dats_get_ia_handle(ia_handle, &dapl_ia_handle);
+	if (dat_status == DAT_SUCCESS) {
+		dat_status = DAT_CNO_FD_CREATE(dapl_ia_handle,
+					       (DAT_FD *) fd, cno_handle);
+	}
+
+	return dat_status;
+}
+
+DAT_RETURN DAT_API dat_cno_modify_agent(IN DAT_CNO_HANDLE cno_handle,
+					IN DAT_OS_WAIT_PROXY_AGENT agent)
+{
+	if (cno_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+	}
+	return DAT_CNO_MODIFY_AGENT(cno_handle, agent);
+}
+
+DAT_RETURN DAT_API dat_cno_query(IN DAT_CNO_HANDLE cno_handle,
+				 IN DAT_CNO_PARAM_MASK cno_param_mask,
+				 OUT DAT_CNO_PARAM * cno_param)
+{
+	return DAT_CNO_QUERY(cno_handle, cno_param_mask, cno_param);
+}
+
+DAT_RETURN DAT_API dat_cno_free(IN DAT_CNO_HANDLE cno_handle)
+{
+	if (cno_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+	}
+	return DAT_CNO_FREE(cno_handle);
+}
+
+DAT_RETURN DAT_API dat_cno_wait(IN DAT_CNO_HANDLE cno_handle,
+				IN DAT_TIMEOUT timeout,
+				OUT DAT_EVD_HANDLE * evd_handle)
+{
+	if (cno_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CNO);
+	}
+	return DAT_CNO_WAIT(cno_handle, timeout, evd_handle);
+}
+
+DAT_RETURN DAT_API dat_evd_enable(IN DAT_EVD_HANDLE evd_handle)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_ENABLE(evd_handle);
+}
+
+DAT_RETURN DAT_API dat_evd_wait(IN DAT_EVD_HANDLE evd_handle,
+				IN DAT_TIMEOUT Timeout,
+				IN DAT_COUNT Threshold,
+				OUT DAT_EVENT * event,
+				OUT DAT_COUNT * n_more_events)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_WAIT(evd_handle,
+			    Timeout, Threshold, event, n_more_events);
+}
+
+DAT_RETURN DAT_API dat_evd_disable(IN DAT_EVD_HANDLE evd_handle)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_DISABLE(evd_handle);
+}
+
+DAT_RETURN DAT_API dat_evd_set_unwaitable(IN DAT_EVD_HANDLE evd_handle)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_SET_UNWAITABLE(evd_handle);
+}
+
+DAT_RETURN DAT_API dat_evd_clear_unwaitable(IN DAT_EVD_HANDLE evd_handle)
+{
+	if (evd_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE,
+				 DAT_INVALID_HANDLE_EVD_REQUEST);
+	}
+	return DAT_EVD_CLEAR_UNWAITABLE(evd_handle);
+}
+
+DAT_RETURN DAT_API dat_cr_handoff(IN DAT_CR_HANDLE cr_handle,
+				  IN DAT_CONN_QUAL handoff)
+{
+	if (cr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+	}
+	return DAT_CR_HANDOFF(cr_handle, handoff);
+}
+
+DAT_RETURN DAT_API dat_lmr_query(IN DAT_LMR_HANDLE lmr_handle,
+				 IN DAT_LMR_PARAM_MASK lmr_param_mask,
+				 OUT DAT_LMR_PARAM * lmr_param)
+{
+	if (lmr_handle == NULL) {
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_LMR);
+	}
+	return DAT_LMR_QUERY(lmr_handle, lmr_param_mask, lmr_param);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dat/udat/udat_sr_parser.c b/dat/udat/udat_sr_parser.c
new file mode 100644
index 0000000..126fb9f
--- /dev/null
+++ b/dat/udat/udat_sr_parser.c
@@ -0,0 +1,1216 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ *
+ * MODULE: dat_sr_parser.c
+ *
+ * PURPOSE: static registry parser
+ *
+ * $Id: udat_sr_parser.c,v 1.6 2005/03/24 05:58:36 jlentini Exp $
+ **********************************************************************/
+
+#include <dat2/udat.h>
+#include "udat_sr_parser.h"
+#include "dat_sr.h"
+
+/*********************************************************************
+ *                                                                   *
+ * Constants                                                         *
+ *                                                                   *
+ *********************************************************************/
+
+#define DAT_SR_CONF_ENV 		"DAT_OVERRIDE"
+#if defined(_WIN32) || defined(_WIN64)
+#define DAT_SR_CONF_DEFAULT 		"C:\\DAT\\dat.conf"
+#else
+#define DAT_SR_CONF_DEFAULT 		"/etc/dat.conf"
+#endif
+
+#define DAT_SR_TOKEN_THREADSAFE 	"threadsafe"
+#define DAT_SR_TOKEN_NONTHREADSAFE 	"nonthreadsafe"
+#define DAT_SR_TOKEN_DEFAULT 		"default"
+#define DAT_SR_TOKEN_NONDEFAULT 	"nondefault"
+
+#define DAT_SR_CHAR_NEWLINE 		'\n'
+#define DAT_SR_CHAR_COMMENT 		'#'
+#define DAT_SR_CHAR_QUOTE 		'"'
+#define DAT_SR_CHAR_BACKSLASH 		'\\'
+
+/*********************************************************************
+ *                                                                   *
+ * Enumerations                                                      *
+ *                                                                   *
+ *********************************************************************/
+
+typedef enum {
+	DAT_SR_TOKEN_STRING,	/* text field (both quoted or unquoted) */
+	DAT_SR_TOKEN_EOR,	/* end of record (newline)              */
+	DAT_SR_TOKEN_EOF	/* end of file                          */
+} DAT_SR_TOKEN_TYPE;
+
+typedef enum {
+	DAT_SR_API_UDAT,
+	DAT_SR_API_KDAT
+} DAT_SR_API_TYPE;
+
+/*********************************************************************
+ *                                                                   *
+ * Structures                                                        *
+ *                                                                   *
+ *********************************************************************/
+
+typedef struct {
+	DAT_SR_TOKEN_TYPE type;
+	char *value;		/* valid if type is DAT_SR_TOKEN_STRING */
+	DAT_OS_SIZE value_len;
+} DAT_SR_TOKEN;
+
+typedef struct DAT_SR_STACK_NODE {
+	DAT_SR_TOKEN token;
+	struct DAT_SR_STACK_NODE *next;
+} DAT_SR_STACK_NODE;
+
+typedef struct {
+	DAT_UINT32 major;
+	DAT_UINT32 minor;
+} DAT_SR_VERSION;
+
+typedef struct {
+	char *id;
+	DAT_SR_VERSION version;
+} DAT_SR_PROVIDER_VERSION;
+
+typedef struct {
+	DAT_SR_API_TYPE type;
+	DAT_SR_VERSION version;
+} DAT_SR_API_VERSION;
+
+typedef struct {
+	char *ia_name;
+	DAT_SR_API_VERSION api_version;
+	DAT_BOOLEAN is_thread_safe;
+	DAT_BOOLEAN is_default;
+	char *lib_path;
+	DAT_SR_PROVIDER_VERSION provider_version;
+	char *ia_params;
+	char *platform_params;
+} DAT_SR_CONF_ENTRY;
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Declarations                                    *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_RETURN dat_sr_load_entry(DAT_SR_CONF_ENTRY * entry);
+
+static DAT_BOOLEAN dat_sr_is_valid_entry(DAT_SR_CONF_ENTRY * entry);
+
+static char *dat_sr_type_to_str(DAT_SR_TOKEN_TYPE type);
+
+static DAT_RETURN dat_sr_parse_eof(DAT_OS_FILE * file);
+
+static DAT_RETURN dat_sr_parse_entry(DAT_OS_FILE * file);
+
+static DAT_RETURN
+dat_sr_parse_ia_name(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_api(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_thread_safety(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_default(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_lib_path(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_provider_version(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_ia_params(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_platform_params(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_parse_eoe(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry);
+
+static DAT_RETURN
+dat_sr_convert_api(char *str, DAT_SR_API_VERSION * api_version);
+
+static DAT_RETURN
+dat_sr_convert_thread_safety(char *str, DAT_BOOLEAN * is_thread_safe);
+
+static DAT_RETURN dat_sr_convert_default(char *str, DAT_BOOLEAN * is_default);
+
+static DAT_RETURN
+dat_sr_convert_provider_version(char *str,
+				DAT_SR_PROVIDER_VERSION * provider_version);
+
+static DAT_RETURN dat_sr_get_token(DAT_OS_FILE * file, DAT_SR_TOKEN * token);
+
+static DAT_RETURN dat_sr_put_token(DAT_OS_FILE * file, DAT_SR_TOKEN * token);
+
+static DAT_RETURN dat_sr_read_token(DAT_OS_FILE * file, DAT_SR_TOKEN * token);
+
+static DAT_RETURN
+dat_sr_read_str(DAT_OS_FILE * file,
+		DAT_SR_TOKEN * token, DAT_OS_SIZE token_len);
+
+static DAT_RETURN
+dat_sr_read_quoted_str(DAT_OS_FILE * file,
+		       DAT_SR_TOKEN * token,
+		       DAT_OS_SIZE token_len, DAT_COUNT num_escape_seq);
+
+static void dat_sr_read_comment(DAT_OS_FILE * file);
+
+/*********************************************************************
+ *                                                                   *
+ * Global Variables                                                  *
+ *                                                                   *
+ *********************************************************************/
+
+static DAT_SR_STACK_NODE *g_token_stack = NULL;
+
+/*********************************************************************
+ *                                                                   *
+ * External Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+/***********************************************************************
+ * Function: dat_sr_load
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_load(void)
+{
+	char *sr_path;
+	DAT_OS_FILE *sr_file;
+
+	sr_path = dat_os_getenv(DAT_SR_CONF_ENV);
+
+	/* environment override */
+	if ((sr_path != NULL) && ((sr_file = dat_os_fopen(sr_path)) == NULL)) {
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+				 "DAT Registry: DAT_OVERRIDE, "
+				 "bad filename - %s, aborting\n", sr_path);
+		goto bail;
+	}
+
+	if (sr_path == NULL) {
+
+#ifdef DAT_CONF
+		sr_path = DAT_CONF;
+#else
+		sr_path = DAT_SR_CONF_DEFAULT;
+#endif
+		sr_file = dat_os_fopen(sr_path);
+		if (sr_file == NULL) {
+#ifdef DAT_CONF
+			dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+					 "DAT Registry: sysconfdir, "
+					 "bad filename - %s, retry default at %s\n",
+					 sr_path, DAT_SR_CONF_DEFAULT);
+			/* try default after sysconfdir fails */
+			sr_path = DAT_SR_CONF_DEFAULT;
+			sr_file = dat_os_fopen(sr_path);
+			if (sr_file == NULL) {
+#endif
+				dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+						 "DAT Registry: default, "
+						 "bad filename - %s, aborting\n",
+						 sr_path);
+				goto bail;
+#ifdef DAT_CONF
+			}
+#endif
+		}
+	}
+
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_GENERIC,
+			 "DAT Registry: using config file %s\n", sr_path);
+
+	for (;;) {
+		if (DAT_SUCCESS == dat_sr_parse_eof(sr_file)) {
+			break;
+		} else if (DAT_SUCCESS == dat_sr_parse_entry(sr_file)) {
+			continue;
+		} else {
+			dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+					 "DAT Registry: ERROR parsing - %s\n",
+					 sr_path);
+			goto cleanup;
+		}
+	}
+
+	if (0 != dat_os_fclose(sr_file)) {
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+				 "DAT Registry: ERROR closing - %s\n", sr_path);
+		goto bail;
+	}
+
+	return DAT_SUCCESS;
+
+      cleanup:
+	dat_os_fclose(sr_file);
+      bail:
+	return DAT_INTERNAL_ERROR;
+
+}
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+/***********************************************************************
+ * Function: dat_sr_is_valid_entry
+ ***********************************************************************/
+
+DAT_BOOLEAN dat_sr_is_valid_entry(DAT_SR_CONF_ENTRY * entry)
+{
+	if ((DAT_SR_API_UDAT == entry->api_version.type) && (entry->is_default)) {
+		return DAT_TRUE;
+	} else {
+		return DAT_FALSE;
+	}
+}
+
+/***********************************************************************
+ * Function: dat_sr_load_entry
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_load_entry(DAT_SR_CONF_ENTRY * conf_entry)
+{
+	DAT_SR_ENTRY entry;
+
+	if (DAT_NAME_MAX_LENGTH < (strlen(conf_entry->ia_name) + 1)) {
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+				 "DAT Registry: ia name %s is longer than "
+				 "DAT_NAME_MAX_LENGTH (%i)\n",
+				 conf_entry->ia_name, DAT_NAME_MAX_LENGTH);
+
+		return DAT_INSUFFICIENT_RESOURCES;
+	}
+
+	dat_os_strncpy(entry.info.ia_name, conf_entry->ia_name,
+		       DAT_NAME_MAX_LENGTH);
+	entry.info.dapl_version_major = conf_entry->api_version.version.major;
+	entry.info.dapl_version_minor = conf_entry->api_version.version.minor;
+	entry.info.is_thread_safe = conf_entry->is_thread_safe;
+	entry.lib_path = conf_entry->lib_path;
+	entry.ia_params = conf_entry->ia_params;
+	entry.lib_handle = NULL;
+	entry.ref_count = 0;
+
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+			 "DAT Registry: loading provider for %s\n",
+			 conf_entry->ia_name);
+
+	return dat_sr_insert(&entry.info, &entry);
+}
+
+/***********************************************************************
+ * Function: dat_sr_type_to_str
+ ***********************************************************************/
+
+char *dat_sr_type_to_str(DAT_SR_TOKEN_TYPE type)
+{
+	static char *str_array[] = { "string", "eor", "eof" };
+
+	if ((type < 0) || (2 < type)) {
+		return "error: invalid token type";
+	}
+
+	return str_array[type];
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_eof
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_eof(DAT_OS_FILE * file)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token)) {
+		return DAT_INTERNAL_ERROR;
+	}
+
+	if (DAT_SR_TOKEN_EOF == token.type) {
+		return DAT_SUCCESS;
+	} else {
+		dat_sr_put_token(file, &token);
+		return DAT_INTERNAL_ERROR;
+	}
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_ia_name
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_entry(DAT_OS_FILE * file)
+{
+	DAT_SR_CONF_ENTRY entry;
+	DAT_RETURN status;
+
+	dat_os_memset(&entry, 0, sizeof(DAT_SR_CONF_ENTRY));
+
+	if ((DAT_SUCCESS == dat_sr_parse_ia_name(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_api(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_thread_safety(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_default(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_lib_path(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_provider_version(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_ia_params(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_platform_params(file, &entry)) &&
+	    (DAT_SUCCESS == dat_sr_parse_eoe(file, &entry))) {
+		dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+				 "\n"
+				 "DAT Registry: entry \n"
+				 " ia_name %s\n"
+				 " api_version\n"
+				 "     type 0x%X\n"
+				 "     major.minor %d.%d\n"
+				 " is_thread_safe %d\n"
+				 " is_default %d\n"
+				 " lib_path %s\n"
+				 " provider_version\n"
+				 "     id %s\n"
+				 "     major.minor %d.%d\n"
+				 " ia_params %s\n"
+				 "\n",
+				 entry.ia_name,
+				 entry.api_version.type,
+				 entry.api_version.version.major,
+				 entry.api_version.version.minor,
+				 entry.is_thread_safe,
+				 entry.is_default,
+				 entry.lib_path,
+				 entry.provider_version.id,
+				 entry.provider_version.version.major,
+				 entry.provider_version.version.minor,
+				 entry.ia_params);
+
+		if (DAT_TRUE == dat_sr_is_valid_entry(&entry)) {
+			/*
+			 * The static registry configuration file may have multiple
+			 * entries with the same IA name. The first entry will be
+			 * installed in the static registry causing subsequent attempts
+			 * to register the same IA name to fail. Therefore the return code
+			 * from dat_sr_load_entry() is ignored.
+			 */
+			(void)dat_sr_load_entry(&entry);
+		}
+
+		status = DAT_SUCCESS;
+	} else {		/* resync */
+
+		DAT_SR_TOKEN token;
+
+		/*
+		 * The static registry format is specified in the DAT specification.
+		 * While the registry file's contents may change between revisions of
+		 * the specification, there is no way to determine the specification
+		 * version to which the configuration file conforms. If an entry is
+		 * found that does not match the expected format, the entry is discarded
+		 * and the parsing of the file continues. There is no way to determine if
+		 * the entry was an error or an entry confirming to an alternate version
+		 * of specification.
+		 */
+
+		for (;;) {
+			if (DAT_SUCCESS != dat_sr_get_token(file, &token)) {
+				status = DAT_INTERNAL_ERROR;
+				break;
+			}
+
+			if (DAT_SR_TOKEN_STRING != token.type) {
+				status = DAT_SUCCESS;
+				break;
+			} else {
+				dat_os_free(token.value,
+					    (sizeof(char) *
+					     dat_os_strlen(token.value)) + 1);
+				continue;
+			}
+		}
+	}
+
+	/* free resources */
+	if (NULL != entry.ia_name) {
+		dat_os_free(entry.ia_name,
+			    sizeof(char) * (dat_os_strlen(entry.ia_name) + 1));
+	}
+	if (NULL != entry.lib_path) {
+		dat_os_free(entry.lib_path,
+			    sizeof(char) * (dat_os_strlen(entry.lib_path) + 1));
+	}
+
+	if (NULL != entry.provider_version.id) {
+		dat_os_free(entry.provider_version.id,
+			    sizeof(char) *
+			    (dat_os_strlen(entry.provider_version.id) + 1));
+	}
+
+	if (NULL != entry.ia_params) {
+		dat_os_free(entry.ia_params,
+			    sizeof(char) * (dat_os_strlen(entry.ia_params) +
+					    1));
+	}
+
+	return status;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_ia_name
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_ia_name(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type) {
+		dat_sr_put_token(file, &token);
+		goto bail;
+	}
+	entry->ia_name = token.value;
+	return DAT_SUCCESS;
+
+      bail:
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_ia_name
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_api(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type)
+		goto cleanup;
+
+	if (DAT_SUCCESS != dat_sr_convert_api(token.value, &entry->api_version))
+		goto cleanup;
+
+	dat_os_free(token.value,
+		    (sizeof(char) * dat_os_strlen(token.value)) + 1);
+	return DAT_SUCCESS;
+
+      cleanup:
+	dat_sr_put_token(file, &token);
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " api_ver, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_thread_safety
+ ***********************************************************************/
+
+static DAT_RETURN
+dat_sr_parse_thread_safety(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type)
+		goto cleanup;
+
+	if (DAT_SUCCESS !=
+	    dat_sr_convert_thread_safety(token.value, &entry->is_thread_safe))
+		goto cleanup;
+
+	dat_os_free(token.value,
+		    (sizeof(char) * dat_os_strlen(token.value)) + 1);
+	return DAT_SUCCESS;
+
+      cleanup:
+	dat_sr_put_token(file, &token);
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " thread_safety, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_default
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_default(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type)
+		goto cleanup;
+
+	if (DAT_SUCCESS !=
+	    dat_sr_convert_default(token.value, &entry->is_default))
+		goto cleanup;
+
+	dat_os_free(token.value,
+		    (sizeof(char) * dat_os_strlen(token.value)) + 1);
+	return DAT_SUCCESS;
+
+      cleanup:
+	dat_sr_put_token(file, &token);
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " default section, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_lib_path
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_lib_path(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type) {
+		dat_sr_put_token(file, &token);
+		goto bail;
+	}
+	entry->lib_path = token.value;
+	return DAT_SUCCESS;
+
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " lib_path, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_provider_version
+ ***********************************************************************/
+
+DAT_RETURN
+dat_sr_parse_provider_version(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type)
+		goto cleanup;
+
+	if (DAT_SUCCESS !=
+	    dat_sr_convert_provider_version(token.value,
+					    &entry->provider_version))
+		goto cleanup;
+
+	dat_os_free(token.value,
+		    (sizeof(char) * dat_os_strlen(token.value)) + 1);
+	return DAT_SUCCESS;
+
+      cleanup:
+	dat_sr_put_token(file, &token);
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " provider_ver, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_ia_params
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_ia_params(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type) {
+		dat_sr_put_token(file, &token);
+		goto bail;
+	}
+
+	entry->ia_params = token.value;
+	return DAT_SUCCESS;
+
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " ia_params, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_platform_params
+ ***********************************************************************/
+
+DAT_RETURN
+dat_sr_parse_platform_params(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if (DAT_SR_TOKEN_STRING != token.type) {
+		dat_sr_put_token(file, &token);
+		goto bail;
+	}
+
+	entry->platform_params = token.value;
+	return DAT_SUCCESS;
+
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " platform_params, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_parse_eoe
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_parse_eoe(DAT_OS_FILE * file, DAT_SR_CONF_ENTRY * entry)
+{
+	DAT_SR_TOKEN token;
+
+	if (DAT_SUCCESS != dat_sr_get_token(file, &token))
+		goto bail;
+
+	if ((DAT_SR_TOKEN_EOF != token.type) &&
+	    (DAT_SR_TOKEN_EOR != token.type)) {
+		dat_sr_put_token(file, &token);
+		goto bail;
+	}
+
+	return DAT_SUCCESS;
+
+      bail:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_ERROR,
+			 " ERR: corrupt dat.conf entry field:"
+			 " EOR, EOF, file offset=%ld\n", ftell(file));
+	return DAT_INTERNAL_ERROR;
+}
+
+/***********************************************************************
+ * Function: dat_sr_convert_api
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_convert_api(char *str, DAT_SR_API_VERSION * api_version)
+{
+	int i;
+	int minor_i;
+
+	if (dat_os_strlen(str) <= 0)
+		return DAT_INTERNAL_ERROR;
+
+	if ('u' == str[0]) {
+		api_version->type = DAT_SR_API_UDAT;
+	} else if ('k' == str[0]) {
+		api_version->type = DAT_SR_API_KDAT;
+	} else {
+		return DAT_INTERNAL_ERROR;
+	}
+
+	for (i = 1 /* move past initial [u|k] */ ; '\0' != str[i]; i++) {
+		if ('.' == str[i]) {
+			break;
+		} else if (DAT_TRUE != dat_os_isdigit(str[i])) {
+			return DAT_INTERNAL_ERROR;
+		}
+	}
+
+	api_version->version.major =
+	    (DAT_UINT32) dat_os_strtol(str + 1, NULL, 10);
+
+	/* move past '.' */
+	minor_i = ++i;
+
+	for (; '\0' != str[i]; i++) {
+		if (DAT_TRUE != dat_os_isdigit(str[i])) {
+			return DAT_INTERNAL_ERROR;
+		}
+	}
+
+	api_version->version.minor =
+	    (DAT_UINT32) dat_os_strtol(str + minor_i, NULL, 10);
+
+	if ('\0' != str[i]) {
+		return DAT_INTERNAL_ERROR;
+	}
+
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_sr_convert_thread_safety
+ ***********************************************************************/
+
+static DAT_RETURN
+dat_sr_convert_thread_safety(char *str, DAT_BOOLEAN * is_thread_safe)
+{
+	if (!dat_os_strncmp(str,
+			    DAT_SR_TOKEN_THREADSAFE,
+			    dat_os_strlen(DAT_SR_TOKEN_THREADSAFE))) {
+		*is_thread_safe = DAT_TRUE;
+		return DAT_SUCCESS;
+	} else if (!dat_os_strncmp(str,
+				   DAT_SR_TOKEN_NONTHREADSAFE,
+				   dat_os_strlen(DAT_SR_TOKEN_NONTHREADSAFE))) {
+		*is_thread_safe = DAT_FALSE;
+		return DAT_SUCCESS;
+	} else {
+		return DAT_INTERNAL_ERROR;
+	}
+}
+
+/***********************************************************************
+ * Function: dat_sr_convert_default
+ ***********************************************************************/
+
+static DAT_RETURN dat_sr_convert_default(char *str, DAT_BOOLEAN * is_default)
+{
+	if (!dat_os_strncmp(str,
+			    DAT_SR_TOKEN_DEFAULT,
+			    dat_os_strlen(DAT_SR_TOKEN_DEFAULT))) {
+		*is_default = DAT_TRUE;
+		return DAT_SUCCESS;
+	} else if (!dat_os_strncmp(str,
+				   DAT_SR_TOKEN_NONDEFAULT,
+				   dat_os_strlen(DAT_SR_TOKEN_NONDEFAULT))) {
+		*is_default = DAT_FALSE;
+		return DAT_SUCCESS;
+	} else {
+		return DAT_INTERNAL_ERROR;
+	}
+}
+
+/***********************************************************************
+ * Function: dat_sr_convert_provider_version
+ ***********************************************************************/
+
+DAT_RETURN
+dat_sr_convert_provider_version(char *str,
+				DAT_SR_PROVIDER_VERSION * provider_version)
+{
+	DAT_RETURN status;
+	int i;
+	int decimal_i;
+
+	if ((dat_os_strlen(str) <= 0) || (NULL != provider_version->id))
+		return DAT_INTERNAL_ERROR;
+
+	status = DAT_SUCCESS;
+
+	for (i = 0; '\0' != str[i]; i++) {
+		if ('.' == str[i]) {
+			break;
+		}
+	}
+
+	/* if no id value was found */
+	if (0 == i) {
+		status = DAT_INTERNAL_ERROR;
+		goto exit;
+	}
+
+	if (NULL ==
+	    (provider_version->id = dat_os_alloc(sizeof(char) * (i + 1)))) {
+		status =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto exit;
+	}
+
+	dat_os_strncpy(provider_version->id, str, i);
+	provider_version->id[i] = '\0';
+
+	/* move past '.' */
+	decimal_i = ++i;
+
+	for (; '\0' != str[i]; i++) {
+		if ('.' == str[i]) {
+			break;
+		} else if (DAT_TRUE != dat_os_isdigit(str[i])) {
+			status = DAT_INTERNAL_ERROR;
+			goto exit;
+		}
+	}
+
+	/* if no version value was found */
+	if (decimal_i == i) {
+		status = DAT_INTERNAL_ERROR;
+		goto exit;
+	}
+
+	provider_version->version.major = (DAT_UINT32)
+	    dat_os_strtol(str + decimal_i, NULL, 10);
+
+	/* move past '.' */
+	decimal_i = ++i;
+
+	for (; '\0' != str[i]; i++) {
+		if (DAT_TRUE != dat_os_isdigit(str[i])) {
+			status = DAT_INTERNAL_ERROR;
+			goto exit;
+		}
+	}
+
+	/* if no version value was found */
+	if (decimal_i == i) {
+		status = DAT_INTERNAL_ERROR;
+		goto exit;
+	}
+
+	provider_version->version.minor = (DAT_UINT32)
+	    dat_os_strtol(str + decimal_i, NULL, 10);
+
+	if ('\0' != str[i]) {
+		status = DAT_INTERNAL_ERROR;
+		goto exit;
+	}
+
+      exit:
+	if (DAT_SUCCESS != status) {
+		if (NULL != provider_version->id) {
+			dat_os_free(provider_version->id,
+				    sizeof(char) *
+				    (dat_os_strlen(provider_version->id) + 1));
+			provider_version->id = NULL;
+		}
+	}
+
+	return status;
+}
+
+/***********************************************************************
+ * Function: dat_sr_get_token
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_get_token(DAT_OS_FILE * file, DAT_SR_TOKEN * token)
+{
+	if (NULL == g_token_stack) {
+		return dat_sr_read_token(file, token);
+	} else {
+		DAT_SR_STACK_NODE *top;
+
+		top = g_token_stack;
+
+		*token = top->token;
+		g_token_stack = top->next;
+
+		dat_os_free(top, sizeof(DAT_SR_STACK_NODE));
+
+		return DAT_SUCCESS;
+	}
+}
+
+/***********************************************************************
+ * Function: dat_sr_put_token
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_put_token(DAT_OS_FILE * file, DAT_SR_TOKEN * token)
+{
+	DAT_SR_STACK_NODE *top;
+
+	if (NULL == (top = dat_os_alloc(sizeof(DAT_SR_STACK_NODE)))) {
+		return DAT_INSUFFICIENT_RESOURCES | DAT_RESOURCE_MEMORY;
+	}
+
+	top->token = *token;
+	top->next = g_token_stack;
+	g_token_stack = top;
+
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_sr_read_token
+ ***********************************************************************/
+
+DAT_RETURN dat_sr_read_token(DAT_OS_FILE * file, DAT_SR_TOKEN * token)
+{
+	DAT_OS_FILE_POS pos;
+	DAT_OS_SIZE token_len;
+	DAT_COUNT num_escape_seq;
+	DAT_BOOLEAN is_quoted_str;
+	DAT_BOOLEAN is_prev_char_backslash;
+
+	/*
+	 * The DAT standard does not specify a maximum size for quoted strings.
+	 * Therefore the tokenizer must be able to read in a token of arbitrary
+	 * size. Instead of allocating a fixed length buffer, the tokenizer first
+	 * scans the input a single character at a time looking for the begining
+	 * and end of the token. Once the these positions are found, the entire
+	 * token is read into memory. By using this algorithm,the implementation
+	 * does not place an arbitrary maximum on the token size.
+	 */
+
+	token_len = 0;
+	num_escape_seq = 0;
+	is_quoted_str = DAT_FALSE;
+	is_prev_char_backslash = DAT_FALSE;
+
+	for (;;) {
+		DAT_OS_FILE_POS cur_pos;
+		int c;
+
+		/* if looking for start of the token */
+		if (0 == token_len) {
+			if (DAT_SUCCESS != dat_os_fgetpos(file, &cur_pos)) {
+				return DAT_INTERNAL_ERROR;
+			}
+		}
+
+		c = dat_os_fgetc(file);
+
+		/* if looking for start of the token */
+		if (0 == token_len) {
+			if (EOF == c) {
+				token->type = DAT_SR_TOKEN_EOF;
+				token->value = NULL;
+				token->value_len = 0;
+				goto success;
+			} else if (DAT_SR_CHAR_NEWLINE == c) {
+				token->type = DAT_SR_TOKEN_EOR;
+				token->value = NULL;
+				token->value_len = 0;
+				goto success;
+			} else if (dat_os_isblank(c)) {
+				continue;
+			} else if (DAT_SR_CHAR_COMMENT == c) {
+				dat_sr_read_comment(file);
+				continue;
+			} else {
+				if (DAT_SR_CHAR_QUOTE == c) {
+					is_quoted_str = DAT_TRUE;
+				}
+
+				pos = cur_pos;
+				token_len++;
+			}
+		} else {	/* looking for the end of the token */
+
+			if (EOF == c) {
+				break;
+			} else if (DAT_SR_CHAR_NEWLINE == c) {
+				/* put back the newline */
+				dat_os_fputc(file, c);
+				break;
+			} else if (!is_quoted_str && dat_os_isblank(c)) {
+				break;
+			} else {
+				token_len++;
+
+				if ((DAT_SR_CHAR_QUOTE == c)
+				    && !is_prev_char_backslash) {
+					break;
+				} else if ((DAT_SR_CHAR_BACKSLASH == c)
+					   && !is_prev_char_backslash) {
+					is_prev_char_backslash = DAT_TRUE;
+					num_escape_seq++;
+				} else {
+					is_prev_char_backslash = DAT_FALSE;
+				}
+			}
+		}
+	}
+
+	/* the token was a string */
+	if (DAT_SUCCESS != dat_os_fsetpos(file, &pos)) {
+		return DAT_INTERNAL_ERROR;
+	}
+
+	if (is_quoted_str) {
+		if (DAT_SUCCESS != dat_sr_read_quoted_str(file,
+							  token,
+							  token_len,
+							  num_escape_seq)) {
+			return DAT_INTERNAL_ERROR;
+		}
+	} else {
+		if (DAT_SUCCESS != dat_sr_read_str(file, token, token_len)) {
+			return DAT_INTERNAL_ERROR;
+		}
+	}
+
+      success:
+	dat_os_dbg_print(DAT_OS_DBG_TYPE_SR,
+			 "\n"
+			 "DAT Registry: token\n"
+			 " type  %s\n"
+			 " value <%s>\n"
+			 "\n",
+			 dat_sr_type_to_str(token->type),
+			 ((DAT_SR_TOKEN_STRING ==
+			   token->type) ? token->value : ""));
+
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_sr_read_str
+ ***********************************************************************/
+
+DAT_RETURN
+dat_sr_read_str(DAT_OS_FILE * file, DAT_SR_TOKEN * token, DAT_OS_SIZE token_len)
+{
+	token->type = DAT_SR_TOKEN_STRING;
+	token->value_len = sizeof(char) * (token_len + 1);	/* +1 for null termination */
+	if (NULL == (token->value = dat_os_alloc(token->value_len))) {
+		return DAT_INSUFFICIENT_RESOURCES | DAT_RESOURCE_MEMORY;
+	}
+
+	if (token_len != dat_os_fread(file, token->value, token_len)) {
+		dat_os_free(token->value, token->value_len);
+		token->value = NULL;
+
+		return DAT_INTERNAL_ERROR;
+	}
+
+	token->value[token->value_len - 1] = '\0';
+
+	return DAT_SUCCESS;
+}
+
+/***********************************************************************
+ * Function: dat_sr_read_quoted_str
+ ***********************************************************************/
+
+DAT_RETURN
+dat_sr_read_quoted_str(DAT_OS_FILE * file,
+		       DAT_SR_TOKEN * token,
+		       DAT_OS_SIZE token_len, DAT_COUNT num_escape_seq)
+{
+	DAT_OS_SIZE str_len;
+	DAT_OS_SIZE i;
+	DAT_OS_SIZE j;
+	int c;
+	DAT_RETURN status;
+	DAT_BOOLEAN is_prev_char_backslash;
+
+	str_len = token_len - 2;	/* minus 2 " characters */
+	is_prev_char_backslash = DAT_FALSE;
+	status = DAT_SUCCESS;
+
+	token->type = DAT_SR_TOKEN_STRING;
+	/* +1 for null termination */
+	token->value_len = sizeof(char) * (str_len - num_escape_seq + 1);
+
+	if (NULL == (token->value = dat_os_alloc(token->value_len))) {
+		status = DAT_INSUFFICIENT_RESOURCES | DAT_RESOURCE_MEMORY;
+		goto exit;
+	}
+
+	/* throw away " */
+	if (DAT_SR_CHAR_QUOTE != dat_os_fgetc(file)) {
+		status = DAT_INTERNAL_ERROR;
+		goto exit;
+	}
+
+	for (i = 0, j = 0; i < str_len; i++) {
+		c = dat_os_fgetc(file);
+
+		if (EOF == c) {
+			status = DAT_INTERNAL_ERROR;
+			goto exit;
+		} else if ((DAT_SR_CHAR_BACKSLASH == c)
+			   && !is_prev_char_backslash) {
+			is_prev_char_backslash = DAT_TRUE;
+		} else {
+			token->value[j] = (char)c;
+			j++;
+
+			is_prev_char_backslash = DAT_FALSE;
+		}
+	}
+
+	/* throw away " */
+	if (DAT_SR_CHAR_QUOTE != dat_os_fgetc(file)) {
+		status = DAT_INTERNAL_ERROR;
+		goto exit;
+	}
+
+	token->value[token->value_len - 1] = '\0';
+
+      exit:
+	if (DAT_SUCCESS != status) {
+		if (NULL != token->value) {
+			dat_os_free(token->value, token->value_len);
+			token->value = NULL;
+		}
+	}
+
+	return status;
+}
+
+/***********************************************************************
+ * Function: dat_sr_read_comment
+ ***********************************************************************/
+
+void dat_sr_read_comment(DAT_OS_FILE * file)
+{
+	int c;
+
+	/* read up to an EOR or EOF to move past the comment */
+	do {
+		c = dat_os_fgetc(file);
+	} while ((DAT_SR_CHAR_NEWLINE != c) && (EOF != c));
+
+	/* put back the newline */
+	dat_os_ungetc(file, c);
+}
diff --git a/dat/udat/udat_sr_parser.h b/dat/udat/udat_sr_parser.h
new file mode 100644
index 0000000..82a027a
--- /dev/null
+++ b/dat/udat/udat_sr_parser.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+/**********************************************************************
+ * 
+ * HEADER: dat_sr_parser.h
+ *
+ * PURPOSE: static registry (SR) parser inteface declarations
+ *
+ * $Id: udat_sr_parser.h,v 1.4 2005/03/24 05:58:36 jlentini Exp $
+ **********************************************************************/
+
+#ifndef _DAT_SR_PARSER_H_
+#define _DAT_SR_PARSER_H_
+
+
+#include "dat_osd.h"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Function Declarations                                             *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * The static registry exports the same interface regardless of 
+ * platform. The particular implementation of dat_sr_load() is 
+ * found with other platform dependent sources.
+ */
+
+extern DAT_RETURN 
+dat_sr_load (void);
+
+
+#endif /* _DAT_SR_PARSER_H_ */
diff --git a/man/dapltest.1 b/man/dapltest.1
new file mode 100644
index 0000000..c1c4682
--- /dev/null
+++ b/man/dapltest.1
@@ -0,0 +1,390 @@
+." Text automatically generated by txt2man
+.TH dapltest 1 "February 23, 2007" "uDAPL 1.2" "USER COMMANDS"
+
+.SH NAME
+\fB
+\fBdapltest \fP- test for the Direct Access Programming Library (DAPL)
+\fB
+.SH DESCRIPTION
+
+Dapltest is a set of tests developed to exercise, characterize,
+and verify the DAPL interfaces during development and porting.
+At least two instantiations of the test must be run. One acts
+as the server, fielding requests and spawning server-side test
+threads as needed. Other client invocations connect to the server
+and issue test requests. The server side of the test, once invoked,
+listens continuously for client connection requests, until quit or 
+killed. Upon receipt of a connection request, the connection is 
+established, the server and client sides swap version numbers to 
+verify that they are able to communicate, and the client sends 
+the test request to the server. If the version numbers match, 
+and the test request is well-formed, the server spawns the threads
+needed to run the test before awaiting further connections.
+.SH USAGE
+
+dapltest [ -f script_file_name ]
+[ -T S|Q|T|P|L ] [ -D device_name ] [ -d ] [ -R HT|LL|EC|PM|BE ]
+.PP
+With no arguments, dapltest runs as a server using default values,
+and loops accepting requests from clients.
+
+The -f option allows all arguments to be placed in a file, to ease
+test automation.
+
+The following arguments are common to all tests:
+.TP
+.B
+[ -T S|Q|T|P|L ]
+Test function to be performed:
+.RS
+.TP
+.B
+S
+- server loop
+.TP
+.B
+Q
+- quit, client requests that server
+wait for any outstanding tests to
+complete, then clean up and exit
+.TP
+.B
+T
+- transaction test, transfers data between 
+client and server
+.TP
+.B
+P
+- performance test, times DTO operations
+.TP
+.B
+L
+- limit test, exhausts various resources,
+runs in client w/o server interaction
+Default: S
+.RE
+.TP
+.B
+[ -D device_name ]
+Specifies the interface adapter name as documented in 
+the /etc/dat.conf static configuration file. This name 
+corresponds to the provider library to open. 
+Default: none
+.TP
+.B
+[ -d ]
+Enables extra debug verbosity, primarily tracing
+of the various DAPL operations as they progress.
+Repeating this parameter increases debug spew.
+Errors encountered result in the test spewing some
+explanatory text and stopping; this flag provides
+more detail about what lead up to the error.
+Default: zero
+.TP
+.B
+[ -R BE ]
+Indicate the quality of service (QoS) desired.
+Choices are:
+.RS
+.TP
+.B
+HT
+- high throughput
+.TP
+.B
+LL
+- low latency
+.TP
+.B
+EC
+- economy (neither HT nor LL)
+.TP
+.B
+PM
+- premium
+.TP
+.B
+BE
+- best effort
+Default: BE
+.RE
+.RE
+.PP
+.B
+Usage - Quit test client
+.PP
+.nf
+.fam C
+    dapltest [Common_Args] [ -s server_name ]
+
+    Quit testing (-T Q) connects to the server to ask it to clean up and
+    exit (after it waits for any outstanding test runs to complete).
+    In addition to being more polite than simply killing the server,
+    this test exercises the DAPL object teardown code paths.
+    There is only one argument other than those supported by all tests:
+
+    -s server_name      Specifies the name of the server interface.
+                        No default.
+
+
+.fam T
+.fi
+.B
+Usage - Transaction test client
+.PP
+.nf
+.fam C
+    dapltest [Common_Args] [ -s server_name ]
+             [ -t threads ] [ -w endpoints ] [ -i iterations ] [ -Q ] 
+             [ -V ] [ -P ] OPclient OPserver [ op3, 
+
+    Transaction testing (-T T) transfers a variable amount of data between 
+    client and server.  The data transfer can be described as a sequence of 
+    individual operations; that entire sequence is transferred 'iterations' 
+    times by each thread over all of its endpoint(s).
+
+    The following parameters determine the behavior of the transaction test:
+
+    -s server_name      Specifies the name or IP address of the server interface.
+                        No default.
+
+    [ -t threads ]      Specify the number of threads to be used.
+                        Default: 1
+
+    [ -w endpoints ]    Specify the number of connected endpoints per thread.
+                        Default: 1
+
+    [ -i iterations ]   Specify the number of times the entire sequence
+                        of data transfers will be made over each endpoint.
+                        Default: 1000
+
+    [ -Q ]              Funnel completion events into a CNO.
+                        Default: use EVDs
+
+    [ -V ]              Validate the data being transferred.
+                        Default: ignore the data
+
+    [ -P ]              Turn on DTO completion polling
+                        Default: off
+
+    OP1 OP2 [ OP3, \.\.\. ]
+                        A single transaction (OPx) consists of:
+
+                        server|client   Indicates who initiates the
+                                        data transfer.
+
+                        SR|RR|RW        Indicates the type of transfer:
+                                        SR  send/recv
+                                        RR  RDMA read
+                                        RW  RDMA write
+                        Defaults: none
+
+                        [ seg_size [ num_segs ] ]
+                                        Indicates the amount and format
+                                        of the data to be transferred.
+                                        Default:  4096  1
+                                                  (i.e., 1 4KB buffer)
+
+                        [ -f ]          For SR transfers only, indicates
+                                        that a client's send transfer
+                                        completion should be reaped when
+                                        the next recv completion is reaped.
+                                        Sends and receives must be paired
+                                        (one client, one server, and in that
+                                        order) for this option to be used.
+
+    Restrictions:  
+
+    Due to the flow control algorithm used by the transaction test, there 
+    must be at least one SR OP for both the client and the server.  
+
+    Requesting data validation (-V) causes the test to automatically append 
+    three OPs to those specified. These additional operations provide 
+    synchronization points during each iteration, at which all user-specified 
+    transaction buffers are checked. These three appended operations satisfy 
+    the "one SR in each direction" requirement.
+
+    The transaction OP list is printed out if -d is supplied.
+
+.fam T
+.fi
+.B
+Usage - Performance test client
+.PP
+.nf
+.fam C
+    dapltest [Common_Args] -s server_name [ -m p|b ]
+             [ -i iterations ] [ -p pipeline ] OP
+
+    Performance testing (-T P) times the transfer of an operation.
+    The operation is posted 'iterations' times.
+
+    The following parameters determine the behavior of the transaction test:
+
+    -s server_name      Specifies the name or IP address of the server interface.
+                        No default.
+
+    -m b|p              Used to choose either blocking (b) or polling (p)
+                        Default: blocking (b)
+
+    [ -i iterations ]   Specify the number of times the entire sequence
+                        of data transfers will be made over each endpoint.
+                        Default: 1000
+
+    [ -p pipeline ]     Specify the pipline length, valid arguments are in 
+                        the range [0,MAX_SEND_DTOS]. If a value greater than 
+                        MAX_SEND_DTOS is requested the value will be
+                        adjusted down to MAX_SEND_DTOS.
+                        Default: MAX_SEND_DTOS
+                        
+    OP                  Specifies the operation as follow:                 
+
+                        RR|RW           Indicates the type of transfer:
+                                        RR  RDMA read
+                                        RW  RDMA write
+                                        Defaults: none
+
+                        [ seg_size [ num_segs ] ]
+                                        Indicates the amount and format
+                                        of the data to be transferred.
+                                        Default:  4096  1
+                                                  (i.e., 1 4KB buffer)
+.fam T
+.RE
+.RE
+.PP
+.B
+Usage - Limit test client
+.PP
+.nf
+.fam C
+    Limit testing (-T L) neither requires nor connects to any server
+    instance.  The client runs one or more tests which attempt to
+    exhaust various resources to determine DAPL limits and exercise
+    DAPL error paths.  If no arguments are given, all tests are run.
+
+    Limit testing creates the sequence of DAT objects needed to
+    move data back and forth, attempting to find the limits supported
+    for the DAPL object requested.  For example, if the LMR creation
+    limit is being examined, the test will create a set of
+    {IA, PZ, CNO, EVD, EP} before trying to run dat_lmr_create() to
+    failure using that set of DAPL objects.  The 'width' parameter
+    can be used to control how many of these parallel DAPL object
+    sets are created before beating upon the requested constructor.
+    Use of -m limits the number of dat_*_create() calls that will
+    be attempted, which can be helpful if the DAPL in use supports
+    essentailly unlimited numbers of some objects.
+
+    The limit test arguments are:
+
+    [ -m maximum ]      Specify the maximum number of dapl_*_create()
+                        attempts.
+                        Default: run to object creation failure
+
+    [ -w width ]        Specify the number of DAPL object sets to
+                        create while initializing.
+                        Default: 1
+
+    [ limit_ia ]        Attempt to exhaust dat_ia_open()
+
+    [ limit_pz ]        Attempt to exhaust dat_pz_create()
+
+    [ limit_cno ]       Attempt to exhaust dat_cno_create()
+
+    [ limit_evd ]       Attempt to exhaust dat_evd_create()
+
+    [ limit_ep ]        Attempt to exhaust dat_ep_create()
+
+    [ limit_rsp ]       Attempt to exhaust dat_rsp_create()
+
+    [ limit_psp ]       Attempt to exhaust dat_psp_create()
+
+    [ limit_lmr ]       Attempt to exhaust dat_lmr_create(4KB)
+
+    [ limit_rpost ]     Attempt to exhaust dat_ep_post_recv(4KB)
+
+    [ limit_size_lmr ]  Probe maximum size dat_lmr_create()
+
+.nf
+.fam C
+                        Default: run all tests
+
+
+.fam T
+.fi
+.SH EXAMPLES
+
+dapltest -T S -d -D OpenIB-cma
+.PP
+.nf
+.fam C
+                        Starts a server process with debug verbosity.
+
+.fam T
+.fi
+dapltest -T T -d -s host1-ib0 -D OpenIB-cma -i 100 client SR 4096 2 server SR 4096 2
+.PP
+.nf
+.fam C
+                        Runs a transaction test, with both sides
+                        sending one buffer with two 4KB segments,
+                        one hundred times.
+
+.fam T
+.fi
+dapltest -T P -d -s host1-ib0 -D OpenIB-cma -i 100 RW 4096 2
+.PP
+.nf
+.fam C
+                        Runs a performance test, with the client 
+                        sending one buffer with two 4KB segments,
+                        one hundred times.
+
+.fam T
+.fi
+dapltest -T Q -s host1-ib0 -D OpenIB-cma
+.PP
+.nf
+.fam C
+                        Asks the server to clean up and exit.
+
+.fam T
+.fi
+dapltest -T L -D OpenIB-cma -d -w 16 -m 1000
+.PP
+.nf
+.fam C
+                        Runs all of the limit tests, setting up
+                        16 complete sets of DAPL objects, and
+                        creating at most a thousand instances
+                        when trying to exhaust resources.
+
+.fam T
+.fi
+dapltest -T T -V -d -t 2 -w 4 -i 55555 -s linux3 -D OpenIB-cma  
+client RW 4096 1 server RW 2048 4 
+client SR 1024 4 server SR 4096 2 
+client SR 1024 3 -f server SR 2048 1 -f
+.PP
+.nf
+.fam C
+                        Runs a more complicated transaction test,
+                        with two thread using four EPs each,
+                        sending a more complicated buffer pattern
+                        for a larger number of iterations,
+                        validating the data received.
+
+
+.fam T
+.fi
+.RE
+.TP
+.B
+BUGS
+(and  To Do List)
+.PP
+.nf
+.fam C
+    Use of CNOs (-Q) is not yet supported.
+
+    Further limit tests could be added.
diff --git a/man/dat.conf.5 b/man/dat.conf.5
new file mode 100644
index 0000000..6dee668
--- /dev/null
+++ b/man/dat.conf.5
@@ -0,0 +1,62 @@
+.TH "DAT.CONF" "5" "25 March 2008" "" ""
+.SH NAME
+dat.conf \- configuration file for static registration of user-level DAT rdma providers
+.SH "DESCRIPTION"
+.PP
+The DAT (direct access transport) architecture supports the use of 
+multiple DAT providers within a single consumer application. 
+Consumers implicitly select a provider using the Interface Adapter 
+name parameter passed to dat_ia_open().
+.PP
+The subsystem that maps Interface Adapter names to provider
+implementations is known as the DAT registry. When a consumer calls
+dat_ia_open(), the appropriate provider is found and notified of the
+consumer's request to access the IA. After this point, all DAT API
+calls acting on DAT objects are automatically directed to the
+appropriate provider entry points.
+.PP
+A persistent, administratively configurable database is used to store
+mappings from IA names to provider information. This provider
+information includes: the file system path to the provider library
+object, version information, and thread safety information. The
+location and format of the registry is platform dependent. This
+database is known as the Static Registry (SR) and is provided via
+entries in the \fIdat.conf\fR file. The process of adding a provider 
+entry is termed Static Registration.
+.PP
+.SH "Registry File Format"
+\br 
+    * All characters after # on a line are ignored (comments).
+    * Lines on which there are no characters other than whitespace
+      and comments are considered blank lines and are ignored.
+    * Non-blank lines must have seven whitespace separated fields.
+      These fields may contain whitespace if the field is quoted
+      with double quotes. Within fields quoated with double quotes,
+      the backslash or qoute are valid escape sequences:
+    * Each non-blank line will contain the following fields:
+        - The IA Name.
+        - The API version of the library:
+          [k|u]major.minor where "major" and "minor" are both integers
+          in decimal format. User-level examples: "u1.2", and "u2.0".
+        - Whether the library is thread-safe: [threadsafe|nonthreadsafe]
+        - Whether this is the default section: [default|nondefault]
+        - The library image, version included, to be loaded.
+        - The vendor id and version of DAPL provider: id.major.minor  
+        - ia params, IA specific parameters - device name and port
+        - platform params, (not used) 
+.PP
+.SH Example netdev entries for OpenFabrics rdma_cm providers, both v1.2 and v2.0 
+\br 
+        OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "ib0 0" ""
+        ofa-v2-ib0 u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0 "ib0 0" ""
+
+        NOTE: The OpenFabrics providers use <ia_params> to specify the device with one of the following:
+              network address, network hostname, or netdev name; along with port number.
+
+              The OpenIB- and ofa-v2- IA names are unique mappings. Reserved for OpenFabrics providers. 
+.PP
+The default location for this configuration file is /etc/dat.conf. 
+The file location may be overridden with the environment variable DAT_OVERRIDE=/your_own_directory/your_dat.conf. 
+.PP
+.SH "SEE ALSO"
+.PP
diff --git a/man/dtest.1 b/man/dtest.1
new file mode 100755
index 0000000..1e227e5
--- /dev/null
+++ b/man/dtest.1
@@ -0,0 +1,78 @@
+.TH dtest 1 "February 23, 2007" "uDAPL 1.2" "USER COMMANDS"
+
+.SH NAME
+dtest \- simple uDAPL send/receive and RDMA test
+
+.SH SYNOPSIS
+.B dtest
+[\-P provider] [\-b buf size] [\-B burst count][\-v] [\-c] [\-p] [\-d]\fB [-s]\fR
+
+.B dtest
+[\-P provider] [\-b buf size] [\-B burst count][\-v] [\-c] [\-p] [\-d]\fB [-h HOSTNAME]\fR
+
+.SH DESCRIPTION
+.PP
+dtest is a simple test used to exercise and verify the uDAPL interfaces. 
+At least two instantiations of the test must be run. One acts as the server 
+and the other the client. The server side of the test, once invoked listens 
+for connection requests, until timing out or killed. Upon receipt of a cd 
+connection request, the connection is established, the server and client 
+sides exchange information necessary to perform RDMA writes and reads.
+
+.SH OPTIONS
+
+.PP
+.TP
+\fB\-P\fR=\fIPROVIDER\fR
+use \fIPROVIDER\fR to specify uDAPL interface using /etc/dat.conf (default OpenIB-cma)
+.TP
+\fB\-b\fR=\fIBUFFER_SIZE\fR
+use buffer size \fIBUFFER_SIZE\fR for RDMA(default 64)
+.TP
+\fB\-B\fR=\fIBURST_COUNT\fR
+use busrt count \fIBURST_COUNT\fR for interations (default 10)
+.TP
+\fB\-v\fR, verbose output(default off)
+.TP
+\fB\-c\fR, use consumer notification events (default off)
+.TP
+\fB\-p\fR, use polling (default wait for event)
+.TP
+\fB\-d\fR, delay in seconds before close (default off)
+.TP
+\fB\-s\fR, run as server (default - run as server)
+.TP
+\fB\-h\fR=\fIHOSTNAME\fR
+use \fIHOSTNAME\fR to specify server hostname or IP address (default - none)
+
+.SH EXAMPLES
+
+dtest -P OpenIB-cma -v -s
+.PP
+.nf
+.fam C
+     Starts a server process with debug verbosity using provider OpenIB-cma.
+
+.fam T
+.fi
+dtest -P OpenIB-cma -h server1-ib0 
+.PP
+.nf
+.fam C
+     Starts a client process, using OpenIB-cma provider to connect to hostname server1-ib0.
+
+.fam T
+
+.SH SEE ALSO
+.BR dapltest(1)
+
+.SH AUTHORS
+.TP
+Arlin Davis
+.RI < ardavis at ichips.intel.com >
+
+.SH BUGS 
+
+
+
+
diff --git a/test/dapltest/Makefile.am b/test/dapltest/Makefile.am
new file mode 100755
index 0000000..bfc2533
--- /dev/null
+++ b/test/dapltest/Makefile.am
@@ -0,0 +1,67 @@
+if EXT_TYPE_IB
+XFLAGS = -DDAT_EXTENSIONS
+else
+XFLAGS =
+endif
+
+AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+
+dapltest_CFLAGS = $(AM_FLAGS) $(XFLAGS)
+
+INCLUDES =  -I include \
+	    -I mdep/linux \
+	    -I $(srcdir)/../../dat/include
+                  
+bin_PROGRAMS = dapltest
+
+dapltest_SOURCES =				\
+	cmd/dapl_main.c				\
+	cmd/dapl_params.c			\
+	cmd/dapl_fft_cmd.c			\
+	cmd/dapl_getopt.c			\
+	cmd/dapl_limit_cmd.c			\
+	cmd/dapl_netaddr.c			\
+	cmd/dapl_performance_cmd.c		\
+	cmd/dapl_qos_util.c			\
+	cmd/dapl_quit_cmd.c			\
+	cmd/dapl_server_cmd.c			\
+	cmd/dapl_transaction_cmd.c		\
+	test/dapl_bpool.c			\
+	test/dapl_client.c			\
+	test/dapl_client_info.c			\
+	test/dapl_cnxn.c			\
+	test/dapl_execute.c			\
+	test/dapl_fft_connmgt.c			\
+	test/dapl_fft_endpoint.c		\
+	test/dapl_fft_hwconn.c			\
+	test/dapl_fft_mem.c			\
+	test/dapl_fft_pz.c			\
+	test/dapl_fft_queryinfo.c		\
+	test/dapl_fft_test.c			\
+	test/dapl_fft_util.c			\
+	test/dapl_limit.c			\
+	test/dapl_memlist.c			\
+	test/dapl_performance_client.c		\
+	test/dapl_performance_server.c		\
+	test/dapl_performance_stats.c		\
+	test/dapl_performance_util.c		\
+	test/dapl_quit_util.c			\
+	test/dapl_server.c			\
+	test/dapl_server_info.c			\
+	test/dapl_test_data.c			\
+	test/dapl_test_util.c			\
+	test/dapl_thread.c			\
+	test/dapl_transaction_stats.c		\
+	test/dapl_transaction_test.c		\
+	test/dapl_transaction_util.c		\
+	test/dapl_util.c			\
+	common/dapl_endian.c			\
+	common/dapl_global.c			\
+	common/dapl_performance_cmd_util.c	\
+	common/dapl_quit_cmd_util.c		\
+	common/dapl_transaction_cmd_util.c	\
+	udapl/udapl_tdep.c			\
+	mdep/linux/dapl_mdep_user.c
+	
+dapltest_LDADD = $(top_builddir)/dat/udat/libdat2.la
+dapltest_LDFLAGS = -lpthread  
diff --git a/test/dapltest/Makefile.in b/test/dapltest/Makefile.in
new file mode 100644
index 0000000..d0e7ecc
--- /dev/null
+++ b/test/dapltest/Makefile.in
@@ -0,0 +1,1264 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = dapltest$(EXEEXT)
+subdir = test/dapltest
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in NEWS
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_dapltest_OBJECTS = dapltest-dapl_main.$(OBJEXT) \
+	dapltest-dapl_params.$(OBJEXT) dapltest-dapl_fft_cmd.$(OBJEXT) \
+	dapltest-dapl_getopt.$(OBJEXT) \
+	dapltest-dapl_limit_cmd.$(OBJEXT) \
+	dapltest-dapl_netaddr.$(OBJEXT) \
+	dapltest-dapl_performance_cmd.$(OBJEXT) \
+	dapltest-dapl_qos_util.$(OBJEXT) \
+	dapltest-dapl_quit_cmd.$(OBJEXT) \
+	dapltest-dapl_server_cmd.$(OBJEXT) \
+	dapltest-dapl_transaction_cmd.$(OBJEXT) \
+	dapltest-dapl_bpool.$(OBJEXT) dapltest-dapl_client.$(OBJEXT) \
+	dapltest-dapl_client_info.$(OBJEXT) \
+	dapltest-dapl_cnxn.$(OBJEXT) dapltest-dapl_execute.$(OBJEXT) \
+	dapltest-dapl_fft_connmgt.$(OBJEXT) \
+	dapltest-dapl_fft_endpoint.$(OBJEXT) \
+	dapltest-dapl_fft_hwconn.$(OBJEXT) \
+	dapltest-dapl_fft_mem.$(OBJEXT) dapltest-dapl_fft_pz.$(OBJEXT) \
+	dapltest-dapl_fft_queryinfo.$(OBJEXT) \
+	dapltest-dapl_fft_test.$(OBJEXT) \
+	dapltest-dapl_fft_util.$(OBJEXT) dapltest-dapl_limit.$(OBJEXT) \
+	dapltest-dapl_memlist.$(OBJEXT) \
+	dapltest-dapl_performance_client.$(OBJEXT) \
+	dapltest-dapl_performance_server.$(OBJEXT) \
+	dapltest-dapl_performance_stats.$(OBJEXT) \
+	dapltest-dapl_performance_util.$(OBJEXT) \
+	dapltest-dapl_quit_util.$(OBJEXT) \
+	dapltest-dapl_server.$(OBJEXT) \
+	dapltest-dapl_server_info.$(OBJEXT) \
+	dapltest-dapl_test_data.$(OBJEXT) \
+	dapltest-dapl_test_util.$(OBJEXT) \
+	dapltest-dapl_thread.$(OBJEXT) \
+	dapltest-dapl_transaction_stats.$(OBJEXT) \
+	dapltest-dapl_transaction_test.$(OBJEXT) \
+	dapltest-dapl_transaction_util.$(OBJEXT) \
+	dapltest-dapl_util.$(OBJEXT) dapltest-dapl_endian.$(OBJEXT) \
+	dapltest-dapl_global.$(OBJEXT) \
+	dapltest-dapl_performance_cmd_util.$(OBJEXT) \
+	dapltest-dapl_quit_cmd_util.$(OBJEXT) \
+	dapltest-dapl_transaction_cmd_util.$(OBJEXT) \
+	dapltest-udapl_tdep.$(OBJEXT) \
+	dapltest-dapl_mdep_user.$(OBJEXT)
+dapltest_OBJECTS = $(am_dapltest_OBJECTS)
+dapltest_DEPENDENCIES = $(top_builddir)/dat/udat/libdat2.la
+dapltest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(dapltest_CFLAGS) $(CFLAGS) \
+	$(dapltest_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+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 = $(dapltest_SOURCES)
+DIST_SOURCES = $(dapltest_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+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@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+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_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+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@
+ at EXT_TYPE_IB_FALSE@XFLAGS = 
+ at EXT_TYPE_IB_TRUE@XFLAGS = -DDAT_EXTENSIONS
+AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+dapltest_CFLAGS = $(AM_FLAGS) $(XFLAGS)
+INCLUDES = -I include \
+	    -I mdep/linux \
+	    -I $(srcdir)/../../dat/include
+
+dapltest_SOURCES = \
+	cmd/dapl_main.c				\
+	cmd/dapl_params.c			\
+	cmd/dapl_fft_cmd.c			\
+	cmd/dapl_getopt.c			\
+	cmd/dapl_limit_cmd.c			\
+	cmd/dapl_netaddr.c			\
+	cmd/dapl_performance_cmd.c		\
+	cmd/dapl_qos_util.c			\
+	cmd/dapl_quit_cmd.c			\
+	cmd/dapl_server_cmd.c			\
+	cmd/dapl_transaction_cmd.c		\
+	test/dapl_bpool.c			\
+	test/dapl_client.c			\
+	test/dapl_client_info.c			\
+	test/dapl_cnxn.c			\
+	test/dapl_execute.c			\
+	test/dapl_fft_connmgt.c			\
+	test/dapl_fft_endpoint.c		\
+	test/dapl_fft_hwconn.c			\
+	test/dapl_fft_mem.c			\
+	test/dapl_fft_pz.c			\
+	test/dapl_fft_queryinfo.c		\
+	test/dapl_fft_test.c			\
+	test/dapl_fft_util.c			\
+	test/dapl_limit.c			\
+	test/dapl_memlist.c			\
+	test/dapl_performance_client.c		\
+	test/dapl_performance_server.c		\
+	test/dapl_performance_stats.c		\
+	test/dapl_performance_util.c		\
+	test/dapl_quit_util.c			\
+	test/dapl_server.c			\
+	test/dapl_server_info.c			\
+	test/dapl_test_data.c			\
+	test/dapl_test_util.c			\
+	test/dapl_thread.c			\
+	test/dapl_transaction_stats.c		\
+	test/dapl_transaction_test.c		\
+	test/dapl_transaction_util.c		\
+	test/dapl_util.c			\
+	common/dapl_endian.c			\
+	common/dapl_global.c			\
+	common/dapl_performance_cmd_util.c	\
+	common/dapl_quit_cmd_util.c		\
+	common/dapl_transaction_cmd_util.c	\
+	udapl/udapl_tdep.c			\
+	mdep/linux/dapl_mdep_user.c
+
+dapltest_LDADD = $(top_builddir)/dat/udat/libdat2.la
+dapltest_LDFLAGS = -lpthread  
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .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 ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  test/dapltest/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  test/dapltest/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(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) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
+dapltest$(EXEEXT): $(dapltest_OBJECTS) $(dapltest_DEPENDENCIES) 
+	@rm -f dapltest$(EXEEXT)
+	$(dapltest_LINK) $(dapltest_OBJECTS) $(dapltest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_bpool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_client.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_client_info.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_cnxn.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_endian.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_execute.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_connmgt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_endpoint.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_hwconn.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_mem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_pz.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_queryinfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_fft_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_getopt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_global.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_limit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_limit_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_mdep_user.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_memlist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_netaddr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_params.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_performance_client.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_performance_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_performance_cmd_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_performance_server.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_performance_stats.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_performance_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_qos_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_quit_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_quit_cmd_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_quit_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_server.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_server_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_server_info.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_test_data.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_test_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_thread.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_transaction_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_transaction_cmd_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_transaction_stats.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_transaction_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_transaction_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-dapl_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest-udapl_tdep.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(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@	mv -f $(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@	mv -f $(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 $@ $<
+
+dapltest-dapl_main.o: cmd/dapl_main.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_main.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_main.Tpo -c -o dapltest-dapl_main.o `test -f 'cmd/dapl_main.c' || echo '$(srcdir)/'`cmd/dapl_main.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_main.Tpo $(DEPDIR)/dapltest-dapl_main.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_main.c' object='dapltest-dapl_main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_main.o `test -f 'cmd/dapl_main.c' || echo '$(srcdir)/'`cmd/dapl_main.c
+
+dapltest-dapl_main.obj: cmd/dapl_main.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_main.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_main.Tpo -c -o dapltest-dapl_main.obj `if test -f 'cmd/dapl_main.c'; then $(CYGPATH_W) 'cmd/dapl_main.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_main.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_main.Tpo $(DEPDIR)/dapltest-dapl_main.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_main.c' object='dapltest-dapl_main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_main.obj `if test -f 'cmd/dapl_main.c'; then $(CYGPATH_W) 'cmd/dapl_main.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_main.c'; fi`
+
+dapltest-dapl_params.o: cmd/dapl_params.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_params.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_params.Tpo -c -o dapltest-dapl_params.o `test -f 'cmd/dapl_params.c' || echo '$(srcdir)/'`cmd/dapl_params.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_params.Tpo $(DEPDIR)/dapltest-dapl_params.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_params.c' object='dapltest-dapl_params.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_params.o `test -f 'cmd/dapl_params.c' || echo '$(srcdir)/'`cmd/dapl_params.c
+
+dapltest-dapl_params.obj: cmd/dapl_params.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_params.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_params.Tpo -c -o dapltest-dapl_params.obj `if test -f 'cmd/dapl_params.c'; then $(CYGPATH_W) 'cmd/dapl_params.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_params.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_params.Tpo $(DEPDIR)/dapltest-dapl_params.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_params.c' object='dapltest-dapl_params.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_params.obj `if test -f 'cmd/dapl_params.c'; then $(CYGPATH_W) 'cmd/dapl_params.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_params.c'; fi`
+
+dapltest-dapl_fft_cmd.o: cmd/dapl_fft_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_cmd.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_cmd.Tpo -c -o dapltest-dapl_fft_cmd.o `test -f 'cmd/dapl_fft_cmd.c' || echo '$(srcdir)/'`cmd/dapl_fft_cmd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_cmd.Tpo $(DEPDIR)/dapltest-dapl_fft_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_fft_cmd.c' object='dapltest-dapl_fft_cmd.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_cmd.o `test -f 'cmd/dapl_fft_cmd.c' || echo '$(srcdir)/'`cmd/dapl_fft_cmd.c
+
+dapltest-dapl_fft_cmd.obj: cmd/dapl_fft_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_cmd.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_cmd.Tpo -c -o dapltest-dapl_fft_cmd.obj `if test -f 'cmd/dapl_fft_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_fft_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_fft_cmd.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_cmd.Tpo $(DEPDIR)/dapltest-dapl_fft_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_fft_cmd.c' object='dapltest-dapl_fft_cmd.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_cmd.obj `if test -f 'cmd/dapl_fft_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_fft_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_fft_cmd.c'; fi`
+
+dapltest-dapl_getopt.o: cmd/dapl_getopt.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_getopt.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_getopt.Tpo -c -o dapltest-dapl_getopt.o `test -f 'cmd/dapl_getopt.c' || echo '$(srcdir)/'`cmd/dapl_getopt.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_getopt.Tpo $(DEPDIR)/dapltest-dapl_getopt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_getopt.c' object='dapltest-dapl_getopt.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_getopt.o `test -f 'cmd/dapl_getopt.c' || echo '$(srcdir)/'`cmd/dapl_getopt.c
+
+dapltest-dapl_getopt.obj: cmd/dapl_getopt.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_getopt.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_getopt.Tpo -c -o dapltest-dapl_getopt.obj `if test -f 'cmd/dapl_getopt.c'; then $(CYGPATH_W) 'cmd/dapl_getopt.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_getopt.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_getopt.Tpo $(DEPDIR)/dapltest-dapl_getopt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_getopt.c' object='dapltest-dapl_getopt.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_getopt.obj `if test -f 'cmd/dapl_getopt.c'; then $(CYGPATH_W) 'cmd/dapl_getopt.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_getopt.c'; fi`
+
+dapltest-dapl_limit_cmd.o: cmd/dapl_limit_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_limit_cmd.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_limit_cmd.Tpo -c -o dapltest-dapl_limit_cmd.o `test -f 'cmd/dapl_limit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_limit_cmd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_limit_cmd.Tpo $(DEPDIR)/dapltest-dapl_limit_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_limit_cmd.c' object='dapltest-dapl_limit_cmd.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_limit_cmd.o `test -f 'cmd/dapl_limit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_limit_cmd.c
+
+dapltest-dapl_limit_cmd.obj: cmd/dapl_limit_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_limit_cmd.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_limit_cmd.Tpo -c -o dapltest-dapl_limit_cmd.obj `if test -f 'cmd/dapl_limit_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_limit_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_limit_cmd.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_limit_cmd.Tpo $(DEPDIR)/dapltest-dapl_limit_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_limit_cmd.c' object='dapltest-dapl_limit_cmd.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_limit_cmd.obj `if test -f 'cmd/dapl_limit_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_limit_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_limit_cmd.c'; fi`
+
+dapltest-dapl_netaddr.o: cmd/dapl_netaddr.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_netaddr.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_netaddr.Tpo -c -o dapltest-dapl_netaddr.o `test -f 'cmd/dapl_netaddr.c' || echo '$(srcdir)/'`cmd/dapl_netaddr.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_netaddr.Tpo $(DEPDIR)/dapltest-dapl_netaddr.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_netaddr.c' object='dapltest-dapl_netaddr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_netaddr.o `test -f 'cmd/dapl_netaddr.c' || echo '$(srcdir)/'`cmd/dapl_netaddr.c
+
+dapltest-dapl_netaddr.obj: cmd/dapl_netaddr.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_netaddr.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_netaddr.Tpo -c -o dapltest-dapl_netaddr.obj `if test -f 'cmd/dapl_netaddr.c'; then $(CYGPATH_W) 'cmd/dapl_netaddr.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_netaddr.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_netaddr.Tpo $(DEPDIR)/dapltest-dapl_netaddr.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_netaddr.c' object='dapltest-dapl_netaddr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_netaddr.obj `if test -f 'cmd/dapl_netaddr.c'; then $(CYGPATH_W) 'cmd/dapl_netaddr.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_netaddr.c'; fi`
+
+dapltest-dapl_performance_cmd.o: cmd/dapl_performance_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_cmd.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_cmd.Tpo -c -o dapltest-dapl_performance_cmd.o `test -f 'cmd/dapl_performance_cmd.c' || echo '$(srcdir)/'`cmd/dapl_performance_cmd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_cmd.Tpo $(DEPDIR)/dapltest-dapl_performance_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_performance_cmd.c' object='dapltest-dapl_performance_cmd.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_cmd.o `test -f 'cmd/dapl_performance_cmd.c' || echo '$(srcdir)/'`cmd/dapl_performance_cmd.c
+
+dapltest-dapl_performance_cmd.obj: cmd/dapl_performance_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_cmd.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_cmd.Tpo -c -o dapltest-dapl_performance_cmd.obj `if test -f 'cmd/dapl_performance_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_performance_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_performance_cmd.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_cmd.Tpo $(DEPDIR)/dapltest-dapl_performance_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_performance_cmd.c' object='dapltest-dapl_performance_cmd.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_cmd.obj `if test -f 'cmd/dapl_performance_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_performance_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_performance_cmd.c'; fi`
+
+dapltest-dapl_qos_util.o: cmd/dapl_qos_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_qos_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_qos_util.Tpo -c -o dapltest-dapl_qos_util.o `test -f 'cmd/dapl_qos_util.c' || echo '$(srcdir)/'`cmd/dapl_qos_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_qos_util.Tpo $(DEPDIR)/dapltest-dapl_qos_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_qos_util.c' object='dapltest-dapl_qos_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_qos_util.o `test -f 'cmd/dapl_qos_util.c' || echo '$(srcdir)/'`cmd/dapl_qos_util.c
+
+dapltest-dapl_qos_util.obj: cmd/dapl_qos_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_qos_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_qos_util.Tpo -c -o dapltest-dapl_qos_util.obj `if test -f 'cmd/dapl_qos_util.c'; then $(CYGPATH_W) 'cmd/dapl_qos_util.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_qos_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_qos_util.Tpo $(DEPDIR)/dapltest-dapl_qos_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_qos_util.c' object='dapltest-dapl_qos_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_qos_util.obj `if test -f 'cmd/dapl_qos_util.c'; then $(CYGPATH_W) 'cmd/dapl_qos_util.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_qos_util.c'; fi`
+
+dapltest-dapl_quit_cmd.o: cmd/dapl_quit_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_quit_cmd.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_quit_cmd.Tpo -c -o dapltest-dapl_quit_cmd.o `test -f 'cmd/dapl_quit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_quit_cmd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_quit_cmd.Tpo $(DEPDIR)/dapltest-dapl_quit_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_quit_cmd.c' object='dapltest-dapl_quit_cmd.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_quit_cmd.o `test -f 'cmd/dapl_quit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_quit_cmd.c
+
+dapltest-dapl_quit_cmd.obj: cmd/dapl_quit_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_quit_cmd.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_quit_cmd.Tpo -c -o dapltest-dapl_quit_cmd.obj `if test -f 'cmd/dapl_quit_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_quit_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_quit_cmd.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_quit_cmd.Tpo $(DEPDIR)/dapltest-dapl_quit_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_quit_cmd.c' object='dapltest-dapl_quit_cmd.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_quit_cmd.obj `if test -f 'cmd/dapl_quit_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_quit_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_quit_cmd.c'; fi`
+
+dapltest-dapl_server_cmd.o: cmd/dapl_server_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_server_cmd.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_server_cmd.Tpo -c -o dapltest-dapl_server_cmd.o `test -f 'cmd/dapl_server_cmd.c' || echo '$(srcdir)/'`cmd/dapl_server_cmd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_server_cmd.Tpo $(DEPDIR)/dapltest-dapl_server_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_server_cmd.c' object='dapltest-dapl_server_cmd.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_server_cmd.o `test -f 'cmd/dapl_server_cmd.c' || echo '$(srcdir)/'`cmd/dapl_server_cmd.c
+
+dapltest-dapl_server_cmd.obj: cmd/dapl_server_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_server_cmd.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_server_cmd.Tpo -c -o dapltest-dapl_server_cmd.obj `if test -f 'cmd/dapl_server_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_server_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_server_cmd.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_server_cmd.Tpo $(DEPDIR)/dapltest-dapl_server_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_server_cmd.c' object='dapltest-dapl_server_cmd.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_server_cmd.obj `if test -f 'cmd/dapl_server_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_server_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_server_cmd.c'; fi`
+
+dapltest-dapl_transaction_cmd.o: cmd/dapl_transaction_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_cmd.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_cmd.Tpo -c -o dapltest-dapl_transaction_cmd.o `test -f 'cmd/dapl_transaction_cmd.c' || echo '$(srcdir)/'`cmd/dapl_transaction_cmd.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_cmd.Tpo $(DEPDIR)/dapltest-dapl_transaction_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_transaction_cmd.c' object='dapltest-dapl_transaction_cmd.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_cmd.o `test -f 'cmd/dapl_transaction_cmd.c' || echo '$(srcdir)/'`cmd/dapl_transaction_cmd.c
+
+dapltest-dapl_transaction_cmd.obj: cmd/dapl_transaction_cmd.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_cmd.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_cmd.Tpo -c -o dapltest-dapl_transaction_cmd.obj `if test -f 'cmd/dapl_transaction_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_transaction_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_transaction_cmd.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_cmd.Tpo $(DEPDIR)/dapltest-dapl_transaction_cmd.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_transaction_cmd.c' object='dapltest-dapl_transaction_cmd.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_cmd.obj `if test -f 'cmd/dapl_transaction_cmd.c'; then $(CYGPATH_W) 'cmd/dapl_transaction_cmd.c'; else $(CYGPATH_W) '$(srcdir)/cmd/dapl_transaction_cmd.c'; fi`
+
+dapltest-dapl_bpool.o: test/dapl_bpool.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_bpool.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_bpool.Tpo -c -o dapltest-dapl_bpool.o `test -f 'test/dapl_bpool.c' || echo '$(srcdir)/'`test/dapl_bpool.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_bpool.Tpo $(DEPDIR)/dapltest-dapl_bpool.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_bpool.c' object='dapltest-dapl_bpool.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_bpool.o `test -f 'test/dapl_bpool.c' || echo '$(srcdir)/'`test/dapl_bpool.c
+
+dapltest-dapl_bpool.obj: test/dapl_bpool.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_bpool.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_bpool.Tpo -c -o dapltest-dapl_bpool.obj `if test -f 'test/dapl_bpool.c'; then $(CYGPATH_W) 'test/dapl_bpool.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_bpool.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_bpool.Tpo $(DEPDIR)/dapltest-dapl_bpool.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_bpool.c' object='dapltest-dapl_bpool.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_bpool.obj `if test -f 'test/dapl_bpool.c'; then $(CYGPATH_W) 'test/dapl_bpool.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_bpool.c'; fi`
+
+dapltest-dapl_client.o: test/dapl_client.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_client.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_client.Tpo -c -o dapltest-dapl_client.o `test -f 'test/dapl_client.c' || echo '$(srcdir)/'`test/dapl_client.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_client.Tpo $(DEPDIR)/dapltest-dapl_client.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client.c' object='dapltest-dapl_client.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_client.o `test -f 'test/dapl_client.c' || echo '$(srcdir)/'`test/dapl_client.c
+
+dapltest-dapl_client.obj: test/dapl_client.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_client.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_client.Tpo -c -o dapltest-dapl_client.obj `if test -f 'test/dapl_client.c'; then $(CYGPATH_W) 'test/dapl_client.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_client.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_client.Tpo $(DEPDIR)/dapltest-dapl_client.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client.c' object='dapltest-dapl_client.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_client.obj `if test -f 'test/dapl_client.c'; then $(CYGPATH_W) 'test/dapl_client.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_client.c'; fi`
+
+dapltest-dapl_client_info.o: test/dapl_client_info.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_client_info.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_client_info.Tpo -c -o dapltest-dapl_client_info.o `test -f 'test/dapl_client_info.c' || echo '$(srcdir)/'`test/dapl_client_info.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_client_info.Tpo $(DEPDIR)/dapltest-dapl_client_info.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client_info.c' object='dapltest-dapl_client_info.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_client_info.o `test -f 'test/dapl_client_info.c' || echo '$(srcdir)/'`test/dapl_client_info.c
+
+dapltest-dapl_client_info.obj: test/dapl_client_info.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_client_info.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_client_info.Tpo -c -o dapltest-dapl_client_info.obj `if test -f 'test/dapl_client_info.c'; then $(CYGPATH_W) 'test/dapl_client_info.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_client_info.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_client_info.Tpo $(DEPDIR)/dapltest-dapl_client_info.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client_info.c' object='dapltest-dapl_client_info.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_client_info.obj `if test -f 'test/dapl_client_info.c'; then $(CYGPATH_W) 'test/dapl_client_info.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_client_info.c'; fi`
+
+dapltest-dapl_cnxn.o: test/dapl_cnxn.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_cnxn.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_cnxn.Tpo -c -o dapltest-dapl_cnxn.o `test -f 'test/dapl_cnxn.c' || echo '$(srcdir)/'`test/dapl_cnxn.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_cnxn.Tpo $(DEPDIR)/dapltest-dapl_cnxn.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_cnxn.c' object='dapltest-dapl_cnxn.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_cnxn.o `test -f 'test/dapl_cnxn.c' || echo '$(srcdir)/'`test/dapl_cnxn.c
+
+dapltest-dapl_cnxn.obj: test/dapl_cnxn.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_cnxn.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_cnxn.Tpo -c -o dapltest-dapl_cnxn.obj `if test -f 'test/dapl_cnxn.c'; then $(CYGPATH_W) 'test/dapl_cnxn.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_cnxn.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_cnxn.Tpo $(DEPDIR)/dapltest-dapl_cnxn.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_cnxn.c' object='dapltest-dapl_cnxn.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_cnxn.obj `if test -f 'test/dapl_cnxn.c'; then $(CYGPATH_W) 'test/dapl_cnxn.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_cnxn.c'; fi`
+
+dapltest-dapl_execute.o: test/dapl_execute.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_execute.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_execute.Tpo -c -o dapltest-dapl_execute.o `test -f 'test/dapl_execute.c' || echo '$(srcdir)/'`test/dapl_execute.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_execute.Tpo $(DEPDIR)/dapltest-dapl_execute.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_execute.c' object='dapltest-dapl_execute.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_execute.o `test -f 'test/dapl_execute.c' || echo '$(srcdir)/'`test/dapl_execute.c
+
+dapltest-dapl_execute.obj: test/dapl_execute.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_execute.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_execute.Tpo -c -o dapltest-dapl_execute.obj `if test -f 'test/dapl_execute.c'; then $(CYGPATH_W) 'test/dapl_execute.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_execute.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_execute.Tpo $(DEPDIR)/dapltest-dapl_execute.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_execute.c' object='dapltest-dapl_execute.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_execute.obj `if test -f 'test/dapl_execute.c'; then $(CYGPATH_W) 'test/dapl_execute.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_execute.c'; fi`
+
+dapltest-dapl_fft_connmgt.o: test/dapl_fft_connmgt.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_connmgt.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_connmgt.Tpo -c -o dapltest-dapl_fft_connmgt.o `test -f 'test/dapl_fft_connmgt.c' || echo '$(srcdir)/'`test/dapl_fft_connmgt.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_connmgt.Tpo $(DEPDIR)/dapltest-dapl_fft_connmgt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_connmgt.c' object='dapltest-dapl_fft_connmgt.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_connmgt.o `test -f 'test/dapl_fft_connmgt.c' || echo '$(srcdir)/'`test/dapl_fft_connmgt.c
+
+dapltest-dapl_fft_connmgt.obj: test/dapl_fft_connmgt.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_connmgt.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_connmgt.Tpo -c -o dapltest-dapl_fft_connmgt.obj `if test -f 'test/dapl_fft_connmgt.c'; then $(CYGPATH_W) 'test/dapl_fft_connmgt.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_connmgt.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_connmgt.Tpo $(DEPDIR)/dapltest-dapl_fft_connmgt.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_connmgt.c' object='dapltest-dapl_fft_connmgt.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_connmgt.obj `if test -f 'test/dapl_fft_connmgt.c'; then $(CYGPATH_W) 'test/dapl_fft_connmgt.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_connmgt.c'; fi`
+
+dapltest-dapl_fft_endpoint.o: test/dapl_fft_endpoint.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_endpoint.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_endpoint.Tpo -c -o dapltest-dapl_fft_endpoint.o `test -f 'test/dapl_fft_endpoint.c' || echo '$(srcdir)/'`test/dapl_fft_endpoint.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_endpoint.Tpo $(DEPDIR)/dapltest-dapl_fft_endpoint.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_endpoint.c' object='dapltest-dapl_fft_endpoint.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_endpoint.o `test -f 'test/dapl_fft_endpoint.c' || echo '$(srcdir)/'`test/dapl_fft_endpoint.c
+
+dapltest-dapl_fft_endpoint.obj: test/dapl_fft_endpoint.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_endpoint.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_endpoint.Tpo -c -o dapltest-dapl_fft_endpoint.obj `if test -f 'test/dapl_fft_endpoint.c'; then $(CYGPATH_W) 'test/dapl_fft_endpoint.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_endpoint.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_endpoint.Tpo $(DEPDIR)/dapltest-dapl_fft_endpoint.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_endpoint.c' object='dapltest-dapl_fft_endpoint.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_endpoint.obj `if test -f 'test/dapl_fft_endpoint.c'; then $(CYGPATH_W) 'test/dapl_fft_endpoint.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_endpoint.c'; fi`
+
+dapltest-dapl_fft_hwconn.o: test/dapl_fft_hwconn.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_hwconn.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_hwconn.Tpo -c -o dapltest-dapl_fft_hwconn.o `test -f 'test/dapl_fft_hwconn.c' || echo '$(srcdir)/'`test/dapl_fft_hwconn.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_hwconn.Tpo $(DEPDIR)/dapltest-dapl_fft_hwconn.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_hwconn.c' object='dapltest-dapl_fft_hwconn.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_hwconn.o `test -f 'test/dapl_fft_hwconn.c' || echo '$(srcdir)/'`test/dapl_fft_hwconn.c
+
+dapltest-dapl_fft_hwconn.obj: test/dapl_fft_hwconn.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_hwconn.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_hwconn.Tpo -c -o dapltest-dapl_fft_hwconn.obj `if test -f 'test/dapl_fft_hwconn.c'; then $(CYGPATH_W) 'test/dapl_fft_hwconn.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_hwconn.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_hwconn.Tpo $(DEPDIR)/dapltest-dapl_fft_hwconn.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_hwconn.c' object='dapltest-dapl_fft_hwconn.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_hwconn.obj `if test -f 'test/dapl_fft_hwconn.c'; then $(CYGPATH_W) 'test/dapl_fft_hwconn.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_hwconn.c'; fi`
+
+dapltest-dapl_fft_mem.o: test/dapl_fft_mem.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_mem.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_mem.Tpo -c -o dapltest-dapl_fft_mem.o `test -f 'test/dapl_fft_mem.c' || echo '$(srcdir)/'`test/dapl_fft_mem.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_mem.Tpo $(DEPDIR)/dapltest-dapl_fft_mem.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_mem.c' object='dapltest-dapl_fft_mem.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_mem.o `test -f 'test/dapl_fft_mem.c' || echo '$(srcdir)/'`test/dapl_fft_mem.c
+
+dapltest-dapl_fft_mem.obj: test/dapl_fft_mem.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_mem.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_mem.Tpo -c -o dapltest-dapl_fft_mem.obj `if test -f 'test/dapl_fft_mem.c'; then $(CYGPATH_W) 'test/dapl_fft_mem.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_mem.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_mem.Tpo $(DEPDIR)/dapltest-dapl_fft_mem.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_mem.c' object='dapltest-dapl_fft_mem.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_mem.obj `if test -f 'test/dapl_fft_mem.c'; then $(CYGPATH_W) 'test/dapl_fft_mem.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_mem.c'; fi`
+
+dapltest-dapl_fft_pz.o: test/dapl_fft_pz.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_pz.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_pz.Tpo -c -o dapltest-dapl_fft_pz.o `test -f 'test/dapl_fft_pz.c' || echo '$(srcdir)/'`test/dapl_fft_pz.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_pz.Tpo $(DEPDIR)/dapltest-dapl_fft_pz.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_pz.c' object='dapltest-dapl_fft_pz.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_pz.o `test -f 'test/dapl_fft_pz.c' || echo '$(srcdir)/'`test/dapl_fft_pz.c
+
+dapltest-dapl_fft_pz.obj: test/dapl_fft_pz.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_pz.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_pz.Tpo -c -o dapltest-dapl_fft_pz.obj `if test -f 'test/dapl_fft_pz.c'; then $(CYGPATH_W) 'test/dapl_fft_pz.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_pz.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_pz.Tpo $(DEPDIR)/dapltest-dapl_fft_pz.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_pz.c' object='dapltest-dapl_fft_pz.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_pz.obj `if test -f 'test/dapl_fft_pz.c'; then $(CYGPATH_W) 'test/dapl_fft_pz.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_pz.c'; fi`
+
+dapltest-dapl_fft_queryinfo.o: test/dapl_fft_queryinfo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_queryinfo.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_queryinfo.Tpo -c -o dapltest-dapl_fft_queryinfo.o `test -f 'test/dapl_fft_queryinfo.c' || echo '$(srcdir)/'`test/dapl_fft_queryinfo.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_queryinfo.Tpo $(DEPDIR)/dapltest-dapl_fft_queryinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_queryinfo.c' object='dapltest-dapl_fft_queryinfo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_queryinfo.o `test -f 'test/dapl_fft_queryinfo.c' || echo '$(srcdir)/'`test/dapl_fft_queryinfo.c
+
+dapltest-dapl_fft_queryinfo.obj: test/dapl_fft_queryinfo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_queryinfo.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_queryinfo.Tpo -c -o dapltest-dapl_fft_queryinfo.obj `if test -f 'test/dapl_fft_queryinfo.c'; then $(CYGPATH_W) 'test/dapl_fft_queryinfo.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_queryinfo.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_queryinfo.Tpo $(DEPDIR)/dapltest-dapl_fft_queryinfo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_queryinfo.c' object='dapltest-dapl_fft_queryinfo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_queryinfo.obj `if test -f 'test/dapl_fft_queryinfo.c'; then $(CYGPATH_W) 'test/dapl_fft_queryinfo.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_queryinfo.c'; fi`
+
+dapltest-dapl_fft_test.o: test/dapl_fft_test.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_test.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_test.Tpo -c -o dapltest-dapl_fft_test.o `test -f 'test/dapl_fft_test.c' || echo '$(srcdir)/'`test/dapl_fft_test.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_test.Tpo $(DEPDIR)/dapltest-dapl_fft_test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_test.c' object='dapltest-dapl_fft_test.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_test.o `test -f 'test/dapl_fft_test.c' || echo '$(srcdir)/'`test/dapl_fft_test.c
+
+dapltest-dapl_fft_test.obj: test/dapl_fft_test.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_test.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_test.Tpo -c -o dapltest-dapl_fft_test.obj `if test -f 'test/dapl_fft_test.c'; then $(CYGPATH_W) 'test/dapl_fft_test.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_test.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_test.Tpo $(DEPDIR)/dapltest-dapl_fft_test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_test.c' object='dapltest-dapl_fft_test.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_test.obj `if test -f 'test/dapl_fft_test.c'; then $(CYGPATH_W) 'test/dapl_fft_test.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_test.c'; fi`
+
+dapltest-dapl_fft_util.o: test/dapl_fft_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_util.Tpo -c -o dapltest-dapl_fft_util.o `test -f 'test/dapl_fft_util.c' || echo '$(srcdir)/'`test/dapl_fft_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_util.Tpo $(DEPDIR)/dapltest-dapl_fft_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_util.c' object='dapltest-dapl_fft_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_util.o `test -f 'test/dapl_fft_util.c' || echo '$(srcdir)/'`test/dapl_fft_util.c
+
+dapltest-dapl_fft_util.obj: test/dapl_fft_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_fft_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_fft_util.Tpo -c -o dapltest-dapl_fft_util.obj `if test -f 'test/dapl_fft_util.c'; then $(CYGPATH_W) 'test/dapl_fft_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_fft_util.Tpo $(DEPDIR)/dapltest-dapl_fft_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_util.c' object='dapltest-dapl_fft_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_fft_util.obj `if test -f 'test/dapl_fft_util.c'; then $(CYGPATH_W) 'test/dapl_fft_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_fft_util.c'; fi`
+
+dapltest-dapl_limit.o: test/dapl_limit.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_limit.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_limit.Tpo -c -o dapltest-dapl_limit.o `test -f 'test/dapl_limit.c' || echo '$(srcdir)/'`test/dapl_limit.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_limit.Tpo $(DEPDIR)/dapltest-dapl_limit.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_limit.c' object='dapltest-dapl_limit.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_limit.o `test -f 'test/dapl_limit.c' || echo '$(srcdir)/'`test/dapl_limit.c
+
+dapltest-dapl_limit.obj: test/dapl_limit.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_limit.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_limit.Tpo -c -o dapltest-dapl_limit.obj `if test -f 'test/dapl_limit.c'; then $(CYGPATH_W) 'test/dapl_limit.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_limit.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_limit.Tpo $(DEPDIR)/dapltest-dapl_limit.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_limit.c' object='dapltest-dapl_limit.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_limit.obj `if test -f 'test/dapl_limit.c'; then $(CYGPATH_W) 'test/dapl_limit.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_limit.c'; fi`
+
+dapltest-dapl_memlist.o: test/dapl_memlist.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_memlist.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_memlist.Tpo -c -o dapltest-dapl_memlist.o `test -f 'test/dapl_memlist.c' || echo '$(srcdir)/'`test/dapl_memlist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_memlist.Tpo $(DEPDIR)/dapltest-dapl_memlist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_memlist.c' object='dapltest-dapl_memlist.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_memlist.o `test -f 'test/dapl_memlist.c' || echo '$(srcdir)/'`test/dapl_memlist.c
+
+dapltest-dapl_memlist.obj: test/dapl_memlist.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_memlist.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_memlist.Tpo -c -o dapltest-dapl_memlist.obj `if test -f 'test/dapl_memlist.c'; then $(CYGPATH_W) 'test/dapl_memlist.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_memlist.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_memlist.Tpo $(DEPDIR)/dapltest-dapl_memlist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_memlist.c' object='dapltest-dapl_memlist.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_memlist.obj `if test -f 'test/dapl_memlist.c'; then $(CYGPATH_W) 'test/dapl_memlist.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_memlist.c'; fi`
+
+dapltest-dapl_performance_client.o: test/dapl_performance_client.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_client.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_client.Tpo -c -o dapltest-dapl_performance_client.o `test -f 'test/dapl_performance_client.c' || echo '$(srcdir)/'`test/dapl_performance_client.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_client.Tpo $(DEPDIR)/dapltest-dapl_performance_client.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_client.c' object='dapltest-dapl_performance_client.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_client.o `test -f 'test/dapl_performance_client.c' || echo '$(srcdir)/'`test/dapl_performance_client.c
+
+dapltest-dapl_performance_client.obj: test/dapl_performance_client.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_client.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_client.Tpo -c -o dapltest-dapl_performance_client.obj `if test -f 'test/dapl_performance_client.c'; then $(CYGPATH_W) 'test/dapl_performance_client.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_client.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_client.Tpo $(DEPDIR)/dapltest-dapl_performance_client.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_client.c' object='dapltest-dapl_performance_client.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_client.obj `if test -f 'test/dapl_performance_client.c'; then $(CYGPATH_W) 'test/dapl_performance_client.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_client.c'; fi`
+
+dapltest-dapl_performance_server.o: test/dapl_performance_server.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_server.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_server.Tpo -c -o dapltest-dapl_performance_server.o `test -f 'test/dapl_performance_server.c' || echo '$(srcdir)/'`test/dapl_performance_server.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_server.Tpo $(DEPDIR)/dapltest-dapl_performance_server.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_server.c' object='dapltest-dapl_performance_server.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_server.o `test -f 'test/dapl_performance_server.c' || echo '$(srcdir)/'`test/dapl_performance_server.c
+
+dapltest-dapl_performance_server.obj: test/dapl_performance_server.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_server.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_server.Tpo -c -o dapltest-dapl_performance_server.obj `if test -f 'test/dapl_performance_server.c'; then $(CYGPATH_W) 'test/dapl_performance_server.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_server.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_server.Tpo $(DEPDIR)/dapltest-dapl_performance_server.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_server.c' object='dapltest-dapl_performance_server.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_server.obj `if test -f 'test/dapl_performance_server.c'; then $(CYGPATH_W) 'test/dapl_performance_server.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_server.c'; fi`
+
+dapltest-dapl_performance_stats.o: test/dapl_performance_stats.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_stats.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_stats.Tpo -c -o dapltest-dapl_performance_stats.o `test -f 'test/dapl_performance_stats.c' || echo '$(srcdir)/'`test/dapl_performance_stats.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_stats.Tpo $(DEPDIR)/dapltest-dapl_performance_stats.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_stats.c' object='dapltest-dapl_performance_stats.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_stats.o `test -f 'test/dapl_performance_stats.c' || echo '$(srcdir)/'`test/dapl_performance_stats.c
+
+dapltest-dapl_performance_stats.obj: test/dapl_performance_stats.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_stats.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_stats.Tpo -c -o dapltest-dapl_performance_stats.obj `if test -f 'test/dapl_performance_stats.c'; then $(CYGPATH_W) 'test/dapl_performance_stats.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_stats.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_stats.Tpo $(DEPDIR)/dapltest-dapl_performance_stats.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_stats.c' object='dapltest-dapl_performance_stats.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_stats.obj `if test -f 'test/dapl_performance_stats.c'; then $(CYGPATH_W) 'test/dapl_performance_stats.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_stats.c'; fi`
+
+dapltest-dapl_performance_util.o: test/dapl_performance_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_util.Tpo -c -o dapltest-dapl_performance_util.o `test -f 'test/dapl_performance_util.c' || echo '$(srcdir)/'`test/dapl_performance_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_util.Tpo $(DEPDIR)/dapltest-dapl_performance_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_util.c' object='dapltest-dapl_performance_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_util.o `test -f 'test/dapl_performance_util.c' || echo '$(srcdir)/'`test/dapl_performance_util.c
+
+dapltest-dapl_performance_util.obj: test/dapl_performance_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_util.Tpo -c -o dapltest-dapl_performance_util.obj `if test -f 'test/dapl_performance_util.c'; then $(CYGPATH_W) 'test/dapl_performance_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_util.Tpo $(DEPDIR)/dapltest-dapl_performance_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_util.c' object='dapltest-dapl_performance_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_util.obj `if test -f 'test/dapl_performance_util.c'; then $(CYGPATH_W) 'test/dapl_performance_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_performance_util.c'; fi`
+
+dapltest-dapl_quit_util.o: test/dapl_quit_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_quit_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_quit_util.Tpo -c -o dapltest-dapl_quit_util.o `test -f 'test/dapl_quit_util.c' || echo '$(srcdir)/'`test/dapl_quit_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_quit_util.Tpo $(DEPDIR)/dapltest-dapl_quit_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_quit_util.c' object='dapltest-dapl_quit_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_quit_util.o `test -f 'test/dapl_quit_util.c' || echo '$(srcdir)/'`test/dapl_quit_util.c
+
+dapltest-dapl_quit_util.obj: test/dapl_quit_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_quit_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_quit_util.Tpo -c -o dapltest-dapl_quit_util.obj `if test -f 'test/dapl_quit_util.c'; then $(CYGPATH_W) 'test/dapl_quit_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_quit_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_quit_util.Tpo $(DEPDIR)/dapltest-dapl_quit_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_quit_util.c' object='dapltest-dapl_quit_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_quit_util.obj `if test -f 'test/dapl_quit_util.c'; then $(CYGPATH_W) 'test/dapl_quit_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_quit_util.c'; fi`
+
+dapltest-dapl_server.o: test/dapl_server.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_server.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_server.Tpo -c -o dapltest-dapl_server.o `test -f 'test/dapl_server.c' || echo '$(srcdir)/'`test/dapl_server.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_server.Tpo $(DEPDIR)/dapltest-dapl_server.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server.c' object='dapltest-dapl_server.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_server.o `test -f 'test/dapl_server.c' || echo '$(srcdir)/'`test/dapl_server.c
+
+dapltest-dapl_server.obj: test/dapl_server.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_server.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_server.Tpo -c -o dapltest-dapl_server.obj `if test -f 'test/dapl_server.c'; then $(CYGPATH_W) 'test/dapl_server.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_server.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_server.Tpo $(DEPDIR)/dapltest-dapl_server.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server.c' object='dapltest-dapl_server.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_server.obj `if test -f 'test/dapl_server.c'; then $(CYGPATH_W) 'test/dapl_server.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_server.c'; fi`
+
+dapltest-dapl_server_info.o: test/dapl_server_info.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_server_info.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_server_info.Tpo -c -o dapltest-dapl_server_info.o `test -f 'test/dapl_server_info.c' || echo '$(srcdir)/'`test/dapl_server_info.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_server_info.Tpo $(DEPDIR)/dapltest-dapl_server_info.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server_info.c' object='dapltest-dapl_server_info.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_server_info.o `test -f 'test/dapl_server_info.c' || echo '$(srcdir)/'`test/dapl_server_info.c
+
+dapltest-dapl_server_info.obj: test/dapl_server_info.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_server_info.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_server_info.Tpo -c -o dapltest-dapl_server_info.obj `if test -f 'test/dapl_server_info.c'; then $(CYGPATH_W) 'test/dapl_server_info.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_server_info.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_server_info.Tpo $(DEPDIR)/dapltest-dapl_server_info.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server_info.c' object='dapltest-dapl_server_info.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_server_info.obj `if test -f 'test/dapl_server_info.c'; then $(CYGPATH_W) 'test/dapl_server_info.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_server_info.c'; fi`
+
+dapltest-dapl_test_data.o: test/dapl_test_data.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_test_data.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_test_data.Tpo -c -o dapltest-dapl_test_data.o `test -f 'test/dapl_test_data.c' || echo '$(srcdir)/'`test/dapl_test_data.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_test_data.Tpo $(DEPDIR)/dapltest-dapl_test_data.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_data.c' object='dapltest-dapl_test_data.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_test_data.o `test -f 'test/dapl_test_data.c' || echo '$(srcdir)/'`test/dapl_test_data.c
+
+dapltest-dapl_test_data.obj: test/dapl_test_data.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_test_data.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_test_data.Tpo -c -o dapltest-dapl_test_data.obj `if test -f 'test/dapl_test_data.c'; then $(CYGPATH_W) 'test/dapl_test_data.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_test_data.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_test_data.Tpo $(DEPDIR)/dapltest-dapl_test_data.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_data.c' object='dapltest-dapl_test_data.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_test_data.obj `if test -f 'test/dapl_test_data.c'; then $(CYGPATH_W) 'test/dapl_test_data.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_test_data.c'; fi`
+
+dapltest-dapl_test_util.o: test/dapl_test_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_test_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_test_util.Tpo -c -o dapltest-dapl_test_util.o `test -f 'test/dapl_test_util.c' || echo '$(srcdir)/'`test/dapl_test_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_test_util.Tpo $(DEPDIR)/dapltest-dapl_test_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_util.c' object='dapltest-dapl_test_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_test_util.o `test -f 'test/dapl_test_util.c' || echo '$(srcdir)/'`test/dapl_test_util.c
+
+dapltest-dapl_test_util.obj: test/dapl_test_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_test_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_test_util.Tpo -c -o dapltest-dapl_test_util.obj `if test -f 'test/dapl_test_util.c'; then $(CYGPATH_W) 'test/dapl_test_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_test_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_test_util.Tpo $(DEPDIR)/dapltest-dapl_test_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_util.c' object='dapltest-dapl_test_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_test_util.obj `if test -f 'test/dapl_test_util.c'; then $(CYGPATH_W) 'test/dapl_test_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_test_util.c'; fi`
+
+dapltest-dapl_thread.o: test/dapl_thread.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_thread.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_thread.Tpo -c -o dapltest-dapl_thread.o `test -f 'test/dapl_thread.c' || echo '$(srcdir)/'`test/dapl_thread.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_thread.Tpo $(DEPDIR)/dapltest-dapl_thread.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_thread.c' object='dapltest-dapl_thread.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_thread.o `test -f 'test/dapl_thread.c' || echo '$(srcdir)/'`test/dapl_thread.c
+
+dapltest-dapl_thread.obj: test/dapl_thread.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_thread.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_thread.Tpo -c -o dapltest-dapl_thread.obj `if test -f 'test/dapl_thread.c'; then $(CYGPATH_W) 'test/dapl_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_thread.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_thread.Tpo $(DEPDIR)/dapltest-dapl_thread.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_thread.c' object='dapltest-dapl_thread.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_thread.obj `if test -f 'test/dapl_thread.c'; then $(CYGPATH_W) 'test/dapl_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_thread.c'; fi`
+
+dapltest-dapl_transaction_stats.o: test/dapl_transaction_stats.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_stats.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_stats.Tpo -c -o dapltest-dapl_transaction_stats.o `test -f 'test/dapl_transaction_stats.c' || echo '$(srcdir)/'`test/dapl_transaction_stats.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_stats.Tpo $(DEPDIR)/dapltest-dapl_transaction_stats.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_stats.c' object='dapltest-dapl_transaction_stats.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_stats.o `test -f 'test/dapl_transaction_stats.c' || echo '$(srcdir)/'`test/dapl_transaction_stats.c
+
+dapltest-dapl_transaction_stats.obj: test/dapl_transaction_stats.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_stats.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_stats.Tpo -c -o dapltest-dapl_transaction_stats.obj `if test -f 'test/dapl_transaction_stats.c'; then $(CYGPATH_W) 'test/dapl_transaction_stats.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_transaction_stats.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_stats.Tpo $(DEPDIR)/dapltest-dapl_transaction_stats.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_stats.c' object='dapltest-dapl_transaction_stats.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_stats.obj `if test -f 'test/dapl_transaction_stats.c'; then $(CYGPATH_W) 'test/dapl_transaction_stats.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_transaction_stats.c'; fi`
+
+dapltest-dapl_transaction_test.o: test/dapl_transaction_test.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_test.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_test.Tpo -c -o dapltest-dapl_transaction_test.o `test -f 'test/dapl_transaction_test.c' || echo '$(srcdir)/'`test/dapl_transaction_test.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_test.Tpo $(DEPDIR)/dapltest-dapl_transaction_test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_test.c' object='dapltest-dapl_transaction_test.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_test.o `test -f 'test/dapl_transaction_test.c' || echo '$(srcdir)/'`test/dapl_transaction_test.c
+
+dapltest-dapl_transaction_test.obj: test/dapl_transaction_test.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_test.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_test.Tpo -c -o dapltest-dapl_transaction_test.obj `if test -f 'test/dapl_transaction_test.c'; then $(CYGPATH_W) 'test/dapl_transaction_test.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_transaction_test.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_test.Tpo $(DEPDIR)/dapltest-dapl_transaction_test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_test.c' object='dapltest-dapl_transaction_test.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_test.obj `if test -f 'test/dapl_transaction_test.c'; then $(CYGPATH_W) 'test/dapl_transaction_test.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_transaction_test.c'; fi`
+
+dapltest-dapl_transaction_util.o: test/dapl_transaction_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_util.Tpo -c -o dapltest-dapl_transaction_util.o `test -f 'test/dapl_transaction_util.c' || echo '$(srcdir)/'`test/dapl_transaction_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_util.Tpo $(DEPDIR)/dapltest-dapl_transaction_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_util.c' object='dapltest-dapl_transaction_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_util.o `test -f 'test/dapl_transaction_util.c' || echo '$(srcdir)/'`test/dapl_transaction_util.c
+
+dapltest-dapl_transaction_util.obj: test/dapl_transaction_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_util.Tpo -c -o dapltest-dapl_transaction_util.obj `if test -f 'test/dapl_transaction_util.c'; then $(CYGPATH_W) 'test/dapl_transaction_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_transaction_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_util.Tpo $(DEPDIR)/dapltest-dapl_transaction_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_util.c' object='dapltest-dapl_transaction_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_util.obj `if test -f 'test/dapl_transaction_util.c'; then $(CYGPATH_W) 'test/dapl_transaction_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_transaction_util.c'; fi`
+
+dapltest-dapl_util.o: test/dapl_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_util.Tpo -c -o dapltest-dapl_util.o `test -f 'test/dapl_util.c' || echo '$(srcdir)/'`test/dapl_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_util.Tpo $(DEPDIR)/dapltest-dapl_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_util.c' object='dapltest-dapl_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_util.o `test -f 'test/dapl_util.c' || echo '$(srcdir)/'`test/dapl_util.c
+
+dapltest-dapl_util.obj: test/dapl_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_util.Tpo -c -o dapltest-dapl_util.obj `if test -f 'test/dapl_util.c'; then $(CYGPATH_W) 'test/dapl_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_util.Tpo $(DEPDIR)/dapltest-dapl_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_util.c' object='dapltest-dapl_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_util.obj `if test -f 'test/dapl_util.c'; then $(CYGPATH_W) 'test/dapl_util.c'; else $(CYGPATH_W) '$(srcdir)/test/dapl_util.c'; fi`
+
+dapltest-dapl_endian.o: common/dapl_endian.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_endian.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_endian.Tpo -c -o dapltest-dapl_endian.o `test -f 'common/dapl_endian.c' || echo '$(srcdir)/'`common/dapl_endian.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_endian.Tpo $(DEPDIR)/dapltest-dapl_endian.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_endian.c' object='dapltest-dapl_endian.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_endian.o `test -f 'common/dapl_endian.c' || echo '$(srcdir)/'`common/dapl_endian.c
+
+dapltest-dapl_endian.obj: common/dapl_endian.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_endian.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_endian.Tpo -c -o dapltest-dapl_endian.obj `if test -f 'common/dapl_endian.c'; then $(CYGPATH_W) 'common/dapl_endian.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_endian.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_endian.Tpo $(DEPDIR)/dapltest-dapl_endian.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_endian.c' object='dapltest-dapl_endian.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_endian.obj `if test -f 'common/dapl_endian.c'; then $(CYGPATH_W) 'common/dapl_endian.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_endian.c'; fi`
+
+dapltest-dapl_global.o: common/dapl_global.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_global.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_global.Tpo -c -o dapltest-dapl_global.o `test -f 'common/dapl_global.c' || echo '$(srcdir)/'`common/dapl_global.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_global.Tpo $(DEPDIR)/dapltest-dapl_global.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_global.c' object='dapltest-dapl_global.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_global.o `test -f 'common/dapl_global.c' || echo '$(srcdir)/'`common/dapl_global.c
+
+dapltest-dapl_global.obj: common/dapl_global.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_global.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_global.Tpo -c -o dapltest-dapl_global.obj `if test -f 'common/dapl_global.c'; then $(CYGPATH_W) 'common/dapl_global.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_global.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_global.Tpo $(DEPDIR)/dapltest-dapl_global.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_global.c' object='dapltest-dapl_global.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_global.obj `if test -f 'common/dapl_global.c'; then $(CYGPATH_W) 'common/dapl_global.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_global.c'; fi`
+
+dapltest-dapl_performance_cmd_util.o: common/dapl_performance_cmd_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_cmd_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_cmd_util.Tpo -c -o dapltest-dapl_performance_cmd_util.o `test -f 'common/dapl_performance_cmd_util.c' || echo '$(srcdir)/'`common/dapl_performance_cmd_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_cmd_util.Tpo $(DEPDIR)/dapltest-dapl_performance_cmd_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_performance_cmd_util.c' object='dapltest-dapl_performance_cmd_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_cmd_util.o `test -f 'common/dapl_performance_cmd_util.c' || echo '$(srcdir)/'`common/dapl_performance_cmd_util.c
+
+dapltest-dapl_performance_cmd_util.obj: common/dapl_performance_cmd_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_performance_cmd_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_performance_cmd_util.Tpo -c -o dapltest-dapl_performance_cmd_util.obj `if test -f 'common/dapl_performance_cmd_util.c'; then $(CYGPATH_W) 'common/dapl_performance_cmd_util.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_performance_cmd_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_performance_cmd_util.Tpo $(DEPDIR)/dapltest-dapl_performance_cmd_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_performance_cmd_util.c' object='dapltest-dapl_performance_cmd_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_performance_cmd_util.obj `if test -f 'common/dapl_performance_cmd_util.c'; then $(CYGPATH_W) 'common/dapl_performance_cmd_util.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_performance_cmd_util.c'; fi`
+
+dapltest-dapl_quit_cmd_util.o: common/dapl_quit_cmd_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_quit_cmd_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_quit_cmd_util.Tpo -c -o dapltest-dapl_quit_cmd_util.o `test -f 'common/dapl_quit_cmd_util.c' || echo '$(srcdir)/'`common/dapl_quit_cmd_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_quit_cmd_util.Tpo $(DEPDIR)/dapltest-dapl_quit_cmd_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_quit_cmd_util.c' object='dapltest-dapl_quit_cmd_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_quit_cmd_util.o `test -f 'common/dapl_quit_cmd_util.c' || echo '$(srcdir)/'`common/dapl_quit_cmd_util.c
+
+dapltest-dapl_quit_cmd_util.obj: common/dapl_quit_cmd_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_quit_cmd_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_quit_cmd_util.Tpo -c -o dapltest-dapl_quit_cmd_util.obj `if test -f 'common/dapl_quit_cmd_util.c'; then $(CYGPATH_W) 'common/dapl_quit_cmd_util.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_quit_cmd_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_quit_cmd_util.Tpo $(DEPDIR)/dapltest-dapl_quit_cmd_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_quit_cmd_util.c' object='dapltest-dapl_quit_cmd_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_quit_cmd_util.obj `if test -f 'common/dapl_quit_cmd_util.c'; then $(CYGPATH_W) 'common/dapl_quit_cmd_util.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_quit_cmd_util.c'; fi`
+
+dapltest-dapl_transaction_cmd_util.o: common/dapl_transaction_cmd_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_cmd_util.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_cmd_util.Tpo -c -o dapltest-dapl_transaction_cmd_util.o `test -f 'common/dapl_transaction_cmd_util.c' || echo '$(srcdir)/'`common/dapl_transaction_cmd_util.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_cmd_util.Tpo $(DEPDIR)/dapltest-dapl_transaction_cmd_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_transaction_cmd_util.c' object='dapltest-dapl_transaction_cmd_util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_cmd_util.o `test -f 'common/dapl_transaction_cmd_util.c' || echo '$(srcdir)/'`common/dapl_transaction_cmd_util.c
+
+dapltest-dapl_transaction_cmd_util.obj: common/dapl_transaction_cmd_util.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_transaction_cmd_util.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_transaction_cmd_util.Tpo -c -o dapltest-dapl_transaction_cmd_util.obj `if test -f 'common/dapl_transaction_cmd_util.c'; then $(CYGPATH_W) 'common/dapl_transaction_cmd_util.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_transaction_cmd_util.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_transaction_cmd_util.Tpo $(DEPDIR)/dapltest-dapl_transaction_cmd_util.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_transaction_cmd_util.c' object='dapltest-dapl_transaction_cmd_util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_transaction_cmd_util.obj `if test -f 'common/dapl_transaction_cmd_util.c'; then $(CYGPATH_W) 'common/dapl_transaction_cmd_util.c'; else $(CYGPATH_W) '$(srcdir)/common/dapl_transaction_cmd_util.c'; fi`
+
+dapltest-udapl_tdep.o: udapl/udapl_tdep.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-udapl_tdep.o -MD -MP -MF $(DEPDIR)/dapltest-udapl_tdep.Tpo -c -o dapltest-udapl_tdep.o `test -f 'udapl/udapl_tdep.c' || echo '$(srcdir)/'`udapl/udapl_tdep.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-udapl_tdep.Tpo $(DEPDIR)/dapltest-udapl_tdep.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='udapl/udapl_tdep.c' object='dapltest-udapl_tdep.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-udapl_tdep.o `test -f 'udapl/udapl_tdep.c' || echo '$(srcdir)/'`udapl/udapl_tdep.c
+
+dapltest-udapl_tdep.obj: udapl/udapl_tdep.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-udapl_tdep.obj -MD -MP -MF $(DEPDIR)/dapltest-udapl_tdep.Tpo -c -o dapltest-udapl_tdep.obj `if test -f 'udapl/udapl_tdep.c'; then $(CYGPATH_W) 'udapl/udapl_tdep.c'; else $(CYGPATH_W) '$(srcdir)/udapl/udapl_tdep.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-udapl_tdep.Tpo $(DEPDIR)/dapltest-udapl_tdep.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='udapl/udapl_tdep.c' object='dapltest-udapl_tdep.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-udapl_tdep.obj `if test -f 'udapl/udapl_tdep.c'; then $(CYGPATH_W) 'udapl/udapl_tdep.c'; else $(CYGPATH_W) '$(srcdir)/udapl/udapl_tdep.c'; fi`
+
+dapltest-dapl_mdep_user.o: mdep/linux/dapl_mdep_user.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_mdep_user.o -MD -MP -MF $(DEPDIR)/dapltest-dapl_mdep_user.Tpo -c -o dapltest-dapl_mdep_user.o `test -f 'mdep/linux/dapl_mdep_user.c' || echo '$(srcdir)/'`mdep/linux/dapl_mdep_user.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_mdep_user.Tpo $(DEPDIR)/dapltest-dapl_mdep_user.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mdep/linux/dapl_mdep_user.c' object='dapltest-dapl_mdep_user.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_mdep_user.o `test -f 'mdep/linux/dapl_mdep_user.c' || echo '$(srcdir)/'`mdep/linux/dapl_mdep_user.c
+
+dapltest-dapl_mdep_user.obj: mdep/linux/dapl_mdep_user.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -MT dapltest-dapl_mdep_user.obj -MD -MP -MF $(DEPDIR)/dapltest-dapl_mdep_user.Tpo -c -o dapltest-dapl_mdep_user.obj `if test -f 'mdep/linux/dapl_mdep_user.c'; then $(CYGPATH_W) 'mdep/linux/dapl_mdep_user.c'; else $(CYGPATH_W) '$(srcdir)/mdep/linux/dapl_mdep_user.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dapltest-dapl_mdep_user.Tpo $(DEPDIR)/dapltest-dapl_mdep_user.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mdep/linux/dapl_mdep_user.c' object='dapltest-dapl_mdep_user.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest_CFLAGS) $(CFLAGS) -c -o dapltest-dapl_mdep_user.obj `if test -f 'mdep/linux/dapl_mdep_user.c'; then $(CYGPATH_W) 'mdep/linux/dapl_mdep_user.c'; else $(CYGPATH_W) '$(srcdir)/mdep/linux/dapl_mdep_user.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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; 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  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; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.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-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
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/dapltest/NEWS b/test/dapltest/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/test/dapltest/README b/test/dapltest/README
new file mode 100644
index 0000000..98f6656
--- /dev/null
+++ b/test/dapltest/README
@@ -0,0 +1,293 @@
+
+NAME
+
+    dapltest    - test for the Direct Access Programming Library (DAPL)
+
+DESCRIPTION
+
+    Dapltest is a set of tests developed to exercise, characterize,
+    and verify the DAPL interfaces during development and porting.
+    At least two instantiations of the test must be run.  One acts
+    as the server, fielding requests and spawning server-side test
+    threads as needed.  Other client invocations connect to the
+    server and issue test requests.
+
+    The server side of the test, once invoked, listens continuously
+    for client connection requests, until quit or killed.  Upon
+    receipt of a connection request, the connection is established,
+    the server and client sides swap version numbers to verify that
+    they are able to communicate, and the client sends the test
+    request to the server.  If the version numbers match, and the
+    test request is well-formed, the server spawns the threads
+    needed to run the test before awaiting further connections.
+
+USAGE
+
+    dapltest [ -f script_file_name ]
+             [ -T S|Q|T|P|L ] [ -D device_name ] [ -d ] [ -R HT|LL|EC|PM|BE ]
+
+    With no arguments, dapltest runs as a server using default values,
+    and loops accepting requests from clients.  The -f option allows
+    all arguments to be placed in a file, to ease test automation.
+    The following arguments are common to all tests:
+
+    [ -T S|Q|T|P|L ]    Test function to be performed:
+                            S   - server loop
+                            Q   - quit, client requests that server
+                                  wait for any outstanding tests to
+                                  complete, then clean up and exit
+                            T   - transaction test, transfers data between 
+                                  client and server
+                            P   - performance test, times DTO operations
+                            L   - limit test, exhausts various resources,
+                                  runs in client w/o server interaction
+                        Default: S
+
+    [ -D device_name ]  Specifies the name of the device (interface adapter).
+                        Default: host-specific, look for DT_MdepDeviceName
+                                 in dapl_mdep.h
+
+    [ -d ]              Enables extra debug verbosity, primarily tracing
+			of the various DAPL operations as they progress.
+			Repeating this parameter increases debug spew.
+			Errors encountered result in the test spewing some
+			explanatory text and stopping; this flag provides
+			more detail about what lead up to the error.
+                        Default: zero
+
+    [ -R BE ]           Indicate the quality of service (QoS) desired.
+                        Choices are:
+                            HT  - high throughput
+                            LL  - low latency
+                            EC  - economy (neither HT nor LL)
+                            PM  - premium
+                            BE  - best effort
+                        Default: BE
+
+USAGE - Quit test client
+
+    dapltest [Common_Args] [ -s server_name ]
+
+    Quit testing (-T Q) connects to the server to ask it to clean up and
+    exit (after it waits for any outstanding test runs to complete).
+    In addition to being more polite than simply killing the server,
+    this test exercises the DAPL object teardown code paths.
+    There is only one argument other than those supported by all tests:
+
+    -s server_name      Specifies the name of the server interface.
+                        No default.
+
+
+USAGE - Transaction test client
+
+    dapltest [Common_Args] [ -s server_name ]
+             [ -t threads ] [ -w endpoints ] [ -i iterations ] [ -Q ] 
+             [ -V ] [ -P ] OPclient OPserver [ op3, 
+
+    Transaction testing (-T T) transfers a variable amount of data between 
+    client and server.  The data transfer can be described as a sequence of 
+    individual operations; that entire sequence is transferred 'iterations' 
+    times by each thread over all of its endpoint(s).
+
+    The following parameters determine the behavior of the transaction test:
+
+    -s server_name      Specifies the name of the server interface.
+                        No default.
+
+    [ -t threads ]      Specify the number of threads to be used.
+                        Default: 1
+
+    [ -w endpoints ]    Specify the number of connected endpoints per thread.
+                        Default: 1
+
+    [ -i iterations ]   Specify the number of times the entire sequence
+                        of data transfers will be made over each endpoint.
+                        Default: 1000
+
+    [ -Q ]              Funnel completion events into a CNO.
+			Default: use EVDs
+
+    [ -V ]              Validate the data being transferred.
+			Default: ignore the data
+
+    [ -P ]		Turn on DTO completion polling
+			Default: off
+
+    OP1 OP2 [ OP3, ... ]
+                        A single transaction (OPx) consists of:
+
+                        server|client   Indicates who initiates the
+                                        data transfer.
+
+                        SR|RR|RW        Indicates the type of transfer:
+                                        SR  send/recv
+                                        RR  RDMA read
+                                        RW  RDMA write
+                        Defaults: none
+
+                        [ seg_size [ num_segs ] ]
+                                        Indicates the amount and format
+                                        of the data to be transferred.
+                                        Default:  4096  1
+                                                  (i.e., 1 4KB buffer)
+
+                        [ -f ]          For SR transfers only, indicates
+                                        that a client's send transfer
+                                        completion should be reaped when
+                                        the next recv completion is reaped.
+					Sends and receives must be paired
+					(one client, one server, and in that
+					order) for this option to be used.
+
+    Restrictions:  
+    
+    Due to the flow control algorithm used by the transaction test, there 
+    must be at least one SR OP for both the client and the server.  
+
+    Requesting data validation (-V) causes the test to automatically append 
+    three OPs to those specified. These additional operations provide 
+    synchronization points during each iteration, at which all user-specified 
+    transaction buffers are checked. These three appended operations satisfy 
+    the "one SR in each direction" requirement.
+
+    The transaction OP list is printed out if -d is supplied.
+
+USAGE - Performance test client
+
+    dapltest [Common_Args] -s server_name [ -m p|b ]
+             [ -i iterations ] [ -p pipeline ] OP
+
+    Performance testing (-T P) times the transfer of an operation.
+    The operation is posted 'iterations' times.
+
+    The following parameters determine the behavior of the transaction test:
+
+    -s server_name      Specifies the name of the server interface.
+                        No default.
+
+    -m b|p		Used to choose either blocking (b) or polling (p)
+                        Default: blocking (b)
+
+    [ -i iterations ]   Specify the number of times the entire sequence
+                        of data transfers will be made over each endpoint.
+                        Default: 1000
+
+    [ -p pipeline ]     Specify the pipline length, valid arguments are in 
+                        the range [0,MAX_SEND_DTOS]. If a value greater than 
+                        MAX_SEND_DTOS is requested the value will be
+                        adjusted down to MAX_SEND_DTOS.
+                        Default: MAX_SEND_DTOS
+
+    OP
+                        An operation consists of:
+
+                        RR|RW           Indicates the type of transfer:
+                                        RR  RDMA read
+                                        RW  RDMA write
+                        Default: none
+
+                        [ seg_size [ num_segs ] ]
+                                        Indicates the amount and format
+                                        of the data to be transferred.
+                                        Default:  4096  1
+                                                  (i.e., 1 4KB buffer)
+
+USAGE - Limit test client
+
+    Limit testing (-T L) neither requires nor connects to any server
+    instance.  The client runs one or more tests which attempt to
+    exhaust various resources to determine DAPL limits and exercise
+    DAPL error paths.  If no arguments are given, all tests are run.
+
+    Limit testing creates the sequence of DAT objects needed to
+    move data back and forth, attempting to find the limits supported
+    for the DAPL object requested.  For example, if the LMR creation
+    limit is being examined, the test will create a set of
+    {IA, PZ, CNO, EVD, EP} before trying to run dat_lmr_create() to
+    failure using that set of DAPL objects.  The 'width' parameter
+    can be used to control how many of these parallel DAPL object
+    sets are created before beating upon the requested constructor.
+    Use of -m limits the number of dat_*_create() calls that will
+    be attempted, which can be helpful if the DAPL in use supports
+    essentailly unlimited numbers of some objects.
+
+    The limit test arguments are:
+
+    [ -m maximum ]      Specify the maximum number of dapl_*_create()
+                        attempts.
+                        Default: run to object creation failure
+
+    [ -w width ]        Specify the number of DAPL object sets to
+                        create while initializing.
+                        Default: 1
+
+    [ limit_ia ]        Attempt to exhaust dat_ia_open()
+
+    [ limit_pz ]        Attempt to exhaust dat_pz_create()
+
+    [ limit_cno ]       Attempt to exhaust dat_cno_create()
+
+    [ limit_evd ]       Attempt to exhaust dat_evd_create()
+
+    [ limit_ep ]        Attempt to exhaust dat_ep_create()
+
+    [ limit_rsp ]       Attempt to exhaust dat_rsp_create()
+
+    [ limit_psp ]       Attempt to exhaust dat_psp_create()
+
+    [ limit_lmr ]       Attempt to exhaust dat_lmr_create(4KB)
+
+    [ limit_rpost ]     Attempt to exhaust dat_ep_post_recv(4KB)
+
+    [ limit_size_lmr ]  Probe maximum size dat_lmr_create()
+
+                        Default: run all tests
+
+
+EXAMPLES
+
+    dapltest -T S -d -D jni0a
+
+                        Starts a server process with debug verbosity.
+    
+    dapltest -T T -d -s linux3 -D jni0a -i 100 \
+    client SR 4096 2 server SR 4096 2
+
+                        Runs a transaction test, with both sides
+                        sending one buffer with two 4KB segments,
+                        one hundred times.
+
+    dapltest -T P -d -s linux3 -D JniIbdd0 -i 100 SR 4096 2
+
+                        Runs a performance test, with the client 
+                        sending one buffer with two 4KB segments,
+                        one hundred times.
+
+    dapltest -T Q -s linux3 -D jni0a
+
+                        Asks the server to clean up and exit.
+
+    dapltest -T L -D jni0a -d -w 16 -m 1000
+
+                        Runs all of the limit tests, setting up
+                        16 complete sets of DAPL objects, and
+                        creating at most a thousand instances
+                        when trying to exhaust resources.
+
+    dapltest -T T -V -d -t 2 -w 4 -i 55555 -s linux3 -D jni0a \
+    client RW  4096 1    server RW  2048 4    \
+    client SR  1024 4    server SR  4096 2    \
+    client SR  1024 3 -f server SR  2048 1 -f
+
+                        Runs a more complicated transaction test,
+                        with two thread using four EPs each,
+                        sending a more complicated buffer pattern
+                        for a larger number of iterations,
+                        validating the data received.
+
+
+BUGS  (and  To Do List)
+
+    Use of CNOs (-Q) is not yet supported.
+
+    Further limit tests could be added.
diff --git a/test/dapltest/cmd/dapl_fft_cmd.c b/test/dapltest/cmd/dapl_fft_cmd.c
new file mode 100644
index 0000000..a604e93
--- /dev/null
+++ b/test/dapltest/cmd/dapl_fft_cmd.c
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+//---------------------------------------------------------------------------
+void DT_FFT_Cmd_Init(FFT_Cmd_t * cmd)
+{
+	int i;
+	memset((void *)cmd, 0, sizeof(FFT_Cmd_t));
+	cmd->fft_type = NONE;
+	cmd->device_name[0] = '\0';
+	cmd->server_name[0] = '\0';
+	for (i = 0; i < MAXCASES; i++) {
+		cmd->cases_flag[i] = false;
+	}
+	cmd->size = 0;
+	cmd->num_iter = 1000;
+	cmd->num_threads = 10;
+	cmd->num_vis = 500;
+	cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
+}
+
+//------------------------------------------------------------------------------
+bool DT_FFT_Cmd_Parse(FFT_Cmd_t * cmd,
+		      int my_argc, char **my_argv, mygetopt_t * opts)
+{
+	int c;
+	int i, caseNum;
+	unsigned int len;
+
+	for (;;) {
+		c = DT_mygetopt_r(my_argc, my_argv, "D:f:s:i:t:v:R:", opts);
+		if (c == EOF) {
+			break;
+		}
+		switch (c) {
+		case 'D':	//device name
+			{
+				strcpy(cmd->device_name, opts->optarg);
+				break;
+			}
+		case 's':	//server name
+			{
+				strcpy(cmd->server_name, opts->optarg);
+				break;
+			}
+		case 'i':	// num iterations
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -i<iterations> option\n");
+					DT_FFT_Cmd_Usage();
+					return (false);
+				}
+				cmd->num_iter = atoi(opts->optarg);
+				break;
+			}
+		case 't':	// num threads
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -t<num_threads> option\n");
+					DT_FFT_Cmd_Usage();
+					return (false);
+				}
+				cmd->num_threads = atoi(opts->optarg);
+				break;
+			}
+		case 'v':	// num vis
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -v<num_vis> option\n");
+					DT_FFT_Cmd_Usage();
+					return (false);
+				}
+				cmd->num_vis = atoi(opts->optarg);
+				break;
+			}
+		case 'f':	//function feature
+			{
+				if (strcmp(opts->optarg, "hwconn") == 0) {
+					cmd->fft_type = HWCONN;
+					cmd->size = 4;	//4 cases for hwconn
+					break;
+				}
+#if 0				// not yet implemented
+				else if (strcmp(opts->optarg, "cqmgt") == 0) {
+					cmd->fft_type = CQMGT;
+					cmd->size = 10;	//10 cases for cqmgt
+					break;
+				}
+#endif
+				else if (strcmp(opts->optarg, "endpoint") == 0) {
+					cmd->fft_type = ENDPOINT;
+					cmd->size = 3;	//13 cases for endpoint
+					break;
+				} else if (strcmp(opts->optarg, "pz") == 0) {
+					cmd->fft_type = PTAGMGT;
+					cmd->size = 3;	//10 cases for Ptagmgt
+					break;
+				} else if (strcmp(opts->optarg, "mem") == 0) {
+					cmd->fft_type = MEMMGT;
+					cmd->size = 5;	//12 cases for Memmgt
+					break;
+				} else if (strcmp(opts->optarg, "connmgt") == 0) {
+					cmd->fft_type = CONNMGT;
+					cmd->size = 2;	//16 cases for connmgt
+					break;
+				}
+#if 0				// not yet implemented
+				else if (strcmp(opts->optarg, "connmgt_client")
+					 == 0) {
+					cmd->fft_type = CONNMGT_CLIENT;
+					cmd->size = 16;	//16 cases for connmgt_client
+					break;
+				}
+#endif
+				else if (strcmp(opts->optarg, "queryinfo") == 0) {
+					cmd->fft_type = QUERYINFO;
+#ifndef __KDAPLTEST__
+					cmd->size = 18;	//18 cases for UDAPL queryinfo
+#else
+					cmd->size = 16;	//16 cases for KDAPL queryinfo
+#endif
+					break;
+				}
+#if 0				// not yet implemented
+				else if (strcmp(opts->optarg, "ns") == 0) {
+					cmd->fft_type = NS;
+					cmd->size = 10;	//10 cases for ns
+					break;
+				} else if (strcmp(opts->optarg, "errhand") == 0) {
+					cmd->fft_type = ERRHAND;
+					cmd->size = 2;	//2 cases for errhand
+					break;
+				} else if (strcmp(opts->optarg, "unsupp") == 0) {
+					cmd->fft_type = UNSUPP;
+					cmd->size = 2;	//2 cases for unsupp
+					break;
+				} else if (strcmp(opts->optarg, "stress") == 0) {
+					cmd->fft_type = STRESS;
+					cmd->size = 6;	//6 cases for stress
+					break;
+				} else if (strcmp(opts->optarg, "stress_client")
+					   == 0) {
+					cmd->fft_type = STRESS_CLIENT;
+					cmd->size = 6;	//6 cases for stress_client
+					break;
+				}
+#endif
+				else {
+					DT_Mdep_printf
+					    ("don't know this function feature: %s\n",
+					     opts->optarg);
+					DT_FFT_Cmd_Usage();
+					return (false);
+				}
+			}
+		case 'R':	// Service Reliability Level
+			{
+				cmd->ReliabilityLevel =
+				    DT_ParseQoS(opts->optarg);
+				if (0 == cmd->ReliabilityLevel) {
+					DT_Mdep_printf
+					    ("Invalid FFT Test Parameter: %c\n",
+					     c);
+					DT_FFT_Cmd_Usage();
+					return (false);
+				}
+				break;
+			}
+
+		case '?':
+		default:
+			{
+				DT_Mdep_printf
+				    ("Invalid FFT Test Parameter: %c\n", c);
+				DT_FFT_Cmd_Usage();
+				return (false);
+			}
+		}
+	}
+	if (cmd->device_name[0] == '\0') {
+		if (!DT_Mdep_GetDefaultDeviceName(cmd->device_name)) {
+			DT_Mdep_printf("can't get default device name\n");
+			DT_FFT_Cmd_Usage();
+			return (false);
+		}
+	}
+
+	if (cmd->fft_type == NONE) {
+		DT_Mdep_printf
+		    ("must define the function feature with -f to test\n");
+		DT_FFT_Cmd_Usage();
+		return (false);
+	}
+	if (cmd->server_name[0] == '\0' &&
+	    (cmd->fft_type == CONNMGT_CLIENT || cmd->fft_type == DATAXFER_CLIENT
+	     || cmd->fft_type == UNSUPP || cmd->fft_type == STRESS_CLIENT)) {
+		DT_Mdep_printf("must define the server name with -s option\n");
+		DT_FFT_Cmd_Usage();
+		return (false);
+	}
+
+	if (cmd->server_name[0] == '\0' && cmd->fft_type == NS) {
+		DT_Mdep_printf("\
+	    Must specify host name or host IP address with -s option to be tested\n");
+		DT_FFT_Cmd_Usage();
+		return (false);
+	}
+	//now parse the test cases
+	if (opts->optind == my_argc)	//default: test all cases
+	{
+		for (i = 0; i < cmd->size; i++) {
+			cmd->cases_flag[i] = true;
+		}
+		return true;
+	}
+	//test specified cases
+	i = opts->optind;
+	while (i < my_argc) {
+		if (strlen(my_argv[i]) < 5
+		    || strncmp(my_argv[i], "case", 4) != 0) {
+			DT_Mdep_printf("test cases format is not correct: %s\n",
+				       my_argv[i]);
+			DT_FFT_Cmd_Usage();
+			return (false);
+		}
+		len = strspn(my_argv[i] + 4, "0123456789");
+		if (len == 0 || len != strlen(my_argv[i] + 4)) {
+			DT_Mdep_printf("must specify case number: %s\n",
+				       my_argv[i]);
+			DT_FFT_Cmd_Usage();
+			return (false);
+		}
+		caseNum = atoi(my_argv[i] + 4);
+		if (caseNum < 0 || caseNum >= cmd->size) {
+			DT_Mdep_printf
+			    ("test case number must be within range : 0 -- %d\n",
+			     cmd->size - 1);
+			DT_FFT_Cmd_Usage();
+			return (false);
+		}
+		cmd->cases_flag[caseNum] = true;
+		i++;
+	}
+	return (true);
+}
+
+//--------------------------------------------------------------
+void DT_FFT_Cmd_Usage(void)
+{
+	char usage[] = {
+		"dapltest -T F [-D <dev_name>] -f <funcfeature> [-i <iter_num>] \n"
+		    "[-t <num_threads>] [-v <num_vis>] [-s <server_name>] [case0] [case1] [...]\n"
+		    "USAGE:        [-D <device Name>]\n"
+		    "USAGE:         -f <func_feature>\n"
+		    "USAGE:             hwconn\n"
+		    "USAGE:             endpoint\n"
+		    "USAGE:             pz\n"
+		    "USAGE:             mem\n"
+		    "USAGE:             connmgt\n"
+		    "USAGE:             queryinfo\n"
+#if 0				// not yet implemented
+		    "USAGE:             connmgt_client       (not yet implemented)\n"
+		    "USAGE:             cqmgt                (not yet implemented)\n"
+		    "USAGE:             ns                   (not yet implemented)\n"
+		    "USAGE:             errhand              (not yet implemented)\n"
+		    "USAGE:             unsupp               (not yet implemented)\n"
+		    "USAGE:             stress               (not yet implemented)\n"
+		    "USAGE:             stress_client        (not yet implemented)\n"
+#endif
+		"USAGE:         -i <iter_num>: itreration time for stress test\n"
+		    "USAGE:         -t <num_threads>: number of threads for stress test\n"
+		    "USAGE:         -v <num_vis>: number of vis for stress test\n"
+		    "USAGE:         -s <server_name>\n"
+		    "USAGE:             server host name or ip address\n"
+		    "USAGE:        [-R <service reliability>]\n"
+		    "USAGE:            (BE == QOS_BEST_EFFORT - Default )\n"
+		    "USAGE:            (HT == QOS_HIGH_THROUGHPUT))\n"
+		    "USAGE:            (LL == QOS_LOW_LATENCY)\n"
+		    "USAGE:            (EC == QOS_ECONOMY)\n"
+		    "USAGE:            (PM == QOS_PREMIUM)\n"
+		    "NOTE: iter_num is just for stress_client test, default 100000\n"
+		    "NOTE: Server_name must be specified for connmgt_client, \n"
+		    "      NS and unsupp function feature.\n"
+		    "NOTE: if test cases are not specified, test all cases in that function\n"
+		    "      feature. else just test the specified cases\n"
+	};
+
+	DT_Mdep_printf("USAGE: -------FFT TEST------------\n");
+	DT_Mdep_printf("%s\n", usage);
+}
diff --git a/test/dapltest/cmd/dapl_getopt.c b/test/dapltest/cmd/dapl_getopt.c
new file mode 100644
index 0000000..293ab67
--- /dev/null
+++ b/test/dapltest/cmd/dapl_getopt.c
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define GETOPT_MAGIC 0x04030201
+
+#define BADCH   (int)'?'
+#define BADARG  (int)':'
+#define EMSG    ""
+
+/**
+ *  Initialize the getopt fields in preparation for parsing
+ *  a command line.
+ */
+void DT_mygetopt_init(mygetopt_t * opts)
+{
+	opts->magic = GETOPT_MAGIC;
+	opts->place = EMSG;
+	opts->opterr = 1;
+	opts->optind = 1;
+	opts->optopt = 0;
+	opts->optarg = 0;
+}
+
+/**
+ *  Parse command line arguments.
+ *
+ *  Return either the option discovered, or
+ *    (int) -1 when there are no more options
+ *    (int) '?' when an illegal option is found
+ *    (int) ':' when a required option argument is missing.
+ */
+int
+DT_mygetopt_r(int argc, char *const *argv, const char *ostr, mygetopt_t * opts)
+{
+	char *p;
+	char *oli;		/* option letter list index */
+	if (GETOPT_MAGIC != opts->magic) {
+		DT_Mdep_printf("%s: getopt warning: "
+			       "option argument is not properly initialized.\n",
+			       argc > 0 ? argv[0] : "unknown command");
+		DT_mygetopt_init(opts);
+	}
+	if (!*(opts->place)) {	/* update scanning pointer */
+		if ((opts->optind) >= argc ||
+		    *((opts->place) = argv[(opts->optind)]) != '-') {
+			(opts->place) = EMSG;
+			return (EOF);
+		}
+		if ((opts->place)[0] != '-') {
+			/* Invalid 1st argument */
+			return (BADCH);
+		}
+		if ((opts->place)[1] && *++(opts->place) == '-') {
+			/* found "--" which is an invalid option */
+			++(opts->optind);
+			(opts->place) = EMSG;
+			return (BADCH);
+		}
+	}			/* option letter okay? */
+	opts->optopt = (int)*(opts->place)++;
+	oli = strchr(ostr, (opts->optopt));
+	if (opts->optopt == (int)':' || !oli) {
+		/*
+		 * if the user didn't specify '-' as an option, assume it means EOF.
+		 */
+		if ((opts->optopt) == (int)'-') {
+			/* return (EOF); */
+			return (BADCH);
+		}
+		if (!*(opts->place)) {
+			++(opts->optind);
+		}
+		if ((opts->opterr) && *ostr != ':') {
+			p = strchr(*argv, '/');
+			if (!p) {
+				p = *argv;
+			} else {
+				++p;
+			}
+
+			if (opts->optopt != '?') {	/* Anything but '?' needs error */
+				DT_Mdep_printf("%s: Illegal option -- %c\n",
+					       p, (opts->optopt));
+			}
+		}
+		return (BADCH);
+	}
+	if (*++oli != ':') {	/* don't need argument */
+		(opts->optarg) = NULL;
+		if (!*(opts->place)) {
+			++(opts->optind);
+		}
+	} else {		/* need an argument */
+
+		if (*(opts->place)) {	/* no white space */
+			(opts->optarg) = (opts->place);
+		} else {
+			if (argc <= ++(opts->optind)) {	/* no arg */
+				(opts->place) = EMSG;
+				if (*ostr == ':') {
+					return (BADARG);
+				}
+				p = strchr(*argv, '/');
+				if (!p) {
+					p = *argv;
+				} else {
+					++p;
+				}
+				if ((opts->opterr)) {
+					DT_Mdep_printf
+					    ("%s: option requires an argument -- %c\n",
+					     p, (opts->optopt));
+				}
+				return (BADCH);
+			} else {	/* white space */
+
+				(opts->optarg) = argv[(opts->optind)];
+			}
+		}
+		(opts->place) = EMSG;
+		++(opts->optind);
+	}
+	return (opts->optopt);	/* dump back option letter */
+}
diff --git a/test/dapltest/cmd/dapl_limit_cmd.c b/test/dapltest/cmd/dapl_limit_cmd.c
new file mode 100644
index 0000000..69b8b7c
--- /dev/null
+++ b/test/dapltest/cmd/dapl_limit_cmd.c
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/* --------------------------------------------------- */
+void DT_Limit_Cmd_Init(Limit_Cmd_t * cmd)
+{
+	memset((void *)cmd, 0, sizeof(Limit_Cmd_t));
+	cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
+	cmd->width = 1;
+	cmd->maximum = ~0U;
+}
+
+/* --------------------------------------------------- */
+bool
+DT_Limit_Cmd_Parse(Limit_Cmd_t * cmd,
+		   int my_argc, char **my_argv, mygetopt_t * opts)
+{
+	int c;
+	int i;
+
+	for (;;) {
+		c = DT_mygetopt_r(my_argc, my_argv, "dm:w:D:R:", opts);
+		if (c == EOF) {
+			break;
+		}
+		switch (c) {
+		case 'D':	/* device name */
+			{
+				strcpy(cmd->device_name, opts->optarg);
+				break;
+			}
+		case 'R':	/* Service Reliability Level */
+			{
+				cmd->ReliabilityLevel =
+				    DT_ParseQoS(opts->optarg);
+				break;
+			}
+		case 'd':	/* print debug messages */
+			{
+				DT_dapltest_debug++;
+				cmd->debug = true;
+				break;
+			}
+		case 'm':	/* maximum for exhaustion testing */
+			{
+				unsigned int len =
+				    strspn(opts->optarg, "0123456789");
+
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -m<maximum> option\n");
+					DT_Limit_Cmd_Usage();
+					return (false);
+				}
+				cmd->maximum = atol(opts->optarg);
+				break;
+			}
+		case 'w':	/* width (number of {ia,evd,ep,...} sets) */
+			{
+				unsigned int len =
+				    strspn(opts->optarg, "0123456789");
+
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -w<width> option\n");
+					DT_Limit_Cmd_Usage();
+					return (false);
+				}
+				cmd->width = atol(opts->optarg);
+				break;
+			}
+		case '?':
+		default:
+			{
+				DT_Mdep_printf
+				    ("Invalid Limit Test Parameter: %c\n", c);
+				DT_Limit_Cmd_Usage();
+				return (false);
+			}
+		}
+	}
+	if (cmd->device_name[0] == '\0') {
+		if (!DT_Mdep_GetDefaultDeviceName(cmd->device_name)) {
+			DT_Mdep_printf("can't get default device name\n");
+			DT_Limit_Cmd_Usage();
+			return (false);
+		}
+	}
+
+	/*
+	 * by default: test all limit tests
+	 * otherwise:  parse the remaining limit test arguments
+	 */
+	if (opts->optind == my_argc) {
+		for (i = 0; i < LIM_NUM_TESTS; i++) {
+			cmd->Test_List[i] = 1;
+		}
+	} else {
+		for (i = opts->optind; i < my_argc; i++) {
+
+			if (strcmp(my_argv[i], "limit_ia") == 0) {
+				cmd->Test_List[LIM_IA] = 1;
+				continue;
+			}
+			if (strcmp(my_argv[i], "limit_pz") == 0) {
+				cmd->Test_List[LIM_PZ] = 1;
+				continue;
+			}
+#ifndef __KDAPLTEST__
+			if (strcmp(my_argv[i], "limit_cno") == 0) {
+				cmd->Test_List[LIM_CNO] = 1;
+				continue;
+			}
+#endif
+			if (strcmp(my_argv[i], "limit_evd") == 0) {
+				cmd->Test_List[LIM_EVD] = 1;
+				continue;
+			}
+			if (strcmp(my_argv[i], "limit_ep") == 0) {
+				cmd->Test_List[LIM_EP] = 1;
+				continue;
+			}
+			if (strcmp(my_argv[i], "limit_rsp") == 0) {
+				cmd->Test_List[LIM_RSP] = 1;
+				continue;
+			}
+			if (strcmp(my_argv[i], "limit_psp") == 0) {
+				cmd->Test_List[LIM_PSP] = 1;
+				continue;
+			}
+			if (strcmp(my_argv[i], "limit_lmr") == 0) {
+				cmd->Test_List[LIM_LMR] = 1;
+				continue;
+			}
+			if (strcmp(my_argv[i], "limit_rpost") == 0) {
+				cmd->Test_List[LIM_RPOST] = 1;
+				continue;
+			}
+			if (strcmp(my_argv[i], "limit_size_lmr") == 0) {
+				cmd->Test_List[LIM_SIZE_LMR] = 1;
+				continue;
+			}
+
+			DT_Mdep_printf("Cannot find this limit test: %s\n",
+				       my_argv[i]);
+			DT_Limit_Cmd_Usage();
+			return (false);
+
+		}		/* end foreach remaining argv */
+	}
+
+	return (true);
+}
+
+/* --------------------------------------------------- */
+void DT_Limit_Cmd_Usage(void)
+{
+	DT_Mdep_printf("USAGE: ---- LIMIT TEST ----\n");
+	DT_Mdep_printf("USAGE:     dapltest -T L\n");
+	DT_Mdep_printf("USAGE:              [-D <device Name>]\n");
+	DT_Mdep_printf("USAGE:              [-d] : debug (zero)\n");
+	DT_Mdep_printf("USAGE:              [-w <width_of_resource_sets>]\n");
+	DT_Mdep_printf
+	    ("USAGE:              [-m <maximum_for_exhaustion_tests>]\n");
+	DT_Mdep_printf("USAGE:              [-R <service reliability>]\n");
+	DT_Mdep_printf
+	    ("USAGE:                  (BE == QOS_BEST_EFFORT - Default)\n");
+	DT_Mdep_printf("USAGE:                  (HT == QOS_HIGH_THROUGHPUT)\n");
+	DT_Mdep_printf("USAGE:                  (LL == QOS_LOW_LATENCY)\n");
+	DT_Mdep_printf("USAGE:                  (EC == QOS_ECONOMY)\n");
+	DT_Mdep_printf("USAGE:                  (PM == QOS_PREMIUM)\n");
+	DT_Mdep_printf
+	    ("USAGE:              [limit_ia [limit_pz] [limit_evd] ... ]\n");
+	DT_Mdep_printf
+	    ("NOTE: If test is not specified, do all the limit tests\n");
+	DT_Mdep_printf("NOTE: Else, just do the specified tests\n");
+	DT_Mdep_printf
+	    ("NOTE: Each test is separated by space, the test can be:\n");
+
+	DT_Mdep_printf("NOTE: [limit_ia]         test max num  of  open IAs\n");
+	DT_Mdep_printf("NOTE: [limit_pz]         test max num  of  PZs\n");
+#ifndef __KDAPLTEST__
+	DT_Mdep_printf("NOTE: [limit_cno]        test max num  of  CNOs\n");
+#endif
+	DT_Mdep_printf("NOTE: [limit_evd]        test max num  of  EVDs\n");
+	DT_Mdep_printf("NOTE: [limit_rsp]        test max num  of  RSPs\n");
+	DT_Mdep_printf("NOTE: [limit_psp]        test max num  of  PSPs\n");
+	DT_Mdep_printf("NOTE: [limit_ep]         test max num  of  EPs\n");
+	DT_Mdep_printf("NOTE: [limit_lmr]        test max num  of  LMRs\n");
+	DT_Mdep_printf
+	    ("NOTE: [limit_rpost]      test max num  of  recvs posted\n");
+	DT_Mdep_printf("NOTE: [limit_size_lmr]   test max size of  LMR\n");
+}
diff --git a/test/dapltest/cmd/dapl_main.c b/test/dapltest/cmd/dapl_main.c
new file mode 100644
index 0000000..9ac6f12
--- /dev/null
+++ b/test/dapltest/cmd/dapl_main.c
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/* Main Entry Point */
+int main(int argc, char *argv[])
+{
+	return (dapltest(argc, argv));
+}
+
+/*
+ * dapltest main program
+ */
+int dapltest(int argc, char *argv[])
+{
+	Params_t *params_ptr;
+	DAT_RETURN rc = DAT_SUCCESS;
+
+	/* check memory leaking */
+	/*
+	 * DT_Mdep_LockInit(&Alloc_Count_Lock); alloc_count = 0;
+	 */
+
+#if defined(_WIN32) || defined(_WIN64)
+	{
+		/* Cannot be done from DT_Mdep_Init as dapl_init makes some socket
+		 * calls....So need to do this before calling dapl_init */
+		WSADATA wsaData;
+		int i;
+
+		i = WSAStartup(MAKEWORD(2, 2), &wsaData);
+		if (i != 0) {
+			printf("%s WSAStartup(2.2) failed? (0x%x)\n", argv[0],
+			       i);
+			exit(1);
+		}
+	}
+#endif
+
+#ifdef GPROF
+	{
+		extern void dapl_init(void);
+		dapl_init();
+	}
+#endif
+	DT_dapltest_debug = 0;
+
+	params_ptr = (Params_t *) DT_Mdep_Malloc(sizeof(Params_t));
+	if (!params_ptr) {
+		DT_Mdep_printf("Cannot allocate memory for Params structure\n");
+		return (1);
+	}
+
+	DT_Tdep_Init();		/* init (kdapl/udapl)test-dependent code */
+	DT_Endian_Init();	/* init endian of local machine */
+	DT_Mdep_Init();		/* init OS, libraries, etc.     */
+
+	params_ptr->local_is_little_endian = DT_local_is_little_endian;
+
+	/*
+	 * parse command line arguments
+	 */
+	if (!DT_Params_Parse(argc, argv, params_ptr)) {
+		DT_Mdep_printf("Command line syntax error\n");
+		return 1;
+	}
+	params_ptr->cpu_mhz = DT_Mdep_GetCpuMhz();
+	/* call the test-dependent code for invoking the actual test */
+	rc = DT_Tdep_Execute_Test(params_ptr);
+
+	/* cleanup */
+
+	DT_Mdep_End();
+	DT_Mdep_Free(params_ptr);
+	DT_Tdep_End();
+#ifdef GPROF
+	{
+		extern void dapl_fini(void);
+		dapl_fini();
+	}
+#endif
+
+	/*
+	 * check memory leaking DT_Mdep_printf("App allocated Memory left: %d\n",
+	 * alloc_count); DT_Mdep_LockDestroy(&Alloc_Count_Lock);
+	 */
+
+	return (rc);
+}
+
+void Dapltest_Main_Usage(void)
+{
+	DT_Mdep_printf("USAGE:\n");
+	DT_Mdep_printf
+	    ("USAGE:     dapltest -T <Test_Type> [-D IA_name] [test-specific args]\n");
+	DT_Mdep_printf("USAGE:         where <Test_Type>\n");
+	DT_Mdep_printf("USAGE:         S = Run as a server\n");
+	DT_Mdep_printf("USAGE:         T = Transaction Test\n");
+	DT_Mdep_printf("USAGE:         Q = Quit Test\n");
+	DT_Mdep_printf("USAGE:         P = Performance Test\n");
+	DT_Mdep_printf("USAGE:         L = Limit Test\n");
+	DT_Mdep_printf("USAGE:         F = FFT Test\n");
+	DT_Mdep_printf("USAGE:\n");
+	DT_Mdep_printf
+	    ("USAGE:         -D Interface_Adapter {default ibnic0v2}\n");
+	DT_Mdep_printf("USAGE:\n");
+	DT_Mdep_printf
+	    ("NOTE:\tRun as server taking defaults (dapltest -T S [-D ibnic0v2])\n");
+	DT_Mdep_printf("NOTE:         dapltest\n");
+	DT_Mdep_printf("NOTE:\n");
+	DT_Mdep_printf
+	    ("NOTE:\tdapltest arguments may be supplied in a script file\n");
+	DT_Mdep_printf("NOTE:\tdapltest -f <script_file>\n");
+	DT_Mdep_printf("USAGE:\n");
+}
diff --git a/test/dapltest/cmd/dapl_netaddr.c b/test/dapltest/cmd/dapl_netaddr.c
new file mode 100644
index 0000000..e54dec9
--- /dev/null
+++ b/test/dapltest/cmd/dapl_netaddr.c
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+DAT_IA_ADDRESS_PTR DT_NetAddrAlloc(Per_Test_Data_t * pt_ptr)
+{
+	DAT_IA_ADDRESS_PTR netaddr;
+
+	netaddr = (DAT_IA_ADDRESS_PTR) DT_Mdep_Malloc(sizeof(DAT_SOCK_ADDR));
+	if (!netaddr) {
+		DT_Mdep_printf("dapltest: No Memory to create netaddr!\n");
+	}
+	return netaddr;
+}
+
+void DT_NetAddrFree(Per_Test_Data_t * pt_ptr, DAT_IA_ADDRESS_PTR netaddr)
+{
+	DT_Mdep_Free(netaddr);
+}
+
+bool
+DT_NetAddrLookupHostAddress(DAT_IA_ADDRESS_PTR to_netaddr,
+			    DAT_NAME_PTR hostname)
+{
+	struct addrinfo *target;
+	int rval;
+
+	rval = getaddrinfo(hostname, NULL, NULL, &target);
+	if (rval != 0) {
+		char *whatzit = "unknown error return";
+
+		switch (rval) {
+		case EAI_FAMILY:
+			{
+				whatzit = "unsupported address family";
+				break;
+			}
+		case EAI_SOCKTYPE:
+			{
+				whatzit = "unsupported socket type";
+				break;
+			}
+		case EAI_BADFLAGS:
+			{
+				whatzit = "invalid flags";
+				break;
+			}
+		case EAI_NONAME:
+			{
+				whatzit = "unknown node name";
+				break;
+			}
+		case EAI_SERVICE:
+			{
+				whatzit = "service unavailable";
+				break;
+			}
+#if !defined(WIN32) && defined(__USE_GNU)
+		case EAI_ADDRFAMILY:
+			{
+				whatzit = "node has no address in this family";
+				break;
+			}
+		case EAI_NODATA:
+			{
+				whatzit = "node has no addresses defined";
+				break;
+			}
+#endif
+		case EAI_MEMORY:
+			{
+				whatzit = "out of memory";
+				break;
+			}
+		case EAI_FAIL:
+			{
+				whatzit = "permanent name server failure";
+				break;
+			}
+		case EAI_AGAIN:
+			{
+				whatzit = "temporary name server failure";
+				break;
+			}
+#if !defined(WIN32)
+		case EAI_SYSTEM:
+			{
+				whatzit = "system error";
+				break;
+			}
+#endif
+		}
+
+		DT_Mdep_printf("getaddrinfo (%s) failed (%s)\n",
+			       hostname, whatzit);
+		return DAT_FALSE;
+	}
+
+	/* Pull out IP address and print it as a sanity check */
+	DT_Mdep_printf("Server Name: %s \n", hostname);
+	DT_Mdep_printf("Server Net Address: %s\n",
+		       inet_ntoa(((struct sockaddr_in *)target->ai_addr)->
+				 sin_addr));
+
+	*to_netaddr = *((DAT_IA_ADDRESS_PTR) target->ai_addr);
+	freeaddrinfo(target);
+
+	return (DAT_TRUE);
+}
diff --git a/test/dapltest/cmd/dapl_params.c b/test/dapltest/cmd/dapl_params.c
new file mode 100644
index 0000000..9d5e510
--- /dev/null
+++ b/test/dapltest/cmd/dapl_params.c
@@ -0,0 +1,281 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define MAX_ARGC    500
+#define MAX_ARG_LEN 100
+
+/* Parse command line arguments */
+bool DT_Params_Parse(int argc, char *argv[], Params_t * params_ptr)
+{
+	Server_Cmd_t *Server_Cmd;
+	Transaction_Cmd_t *Transaction_Cmd;
+	Quit_Cmd_t *Quit_Cmd;
+	Limit_Cmd_t *Limit_Cmd;
+	Performance_Cmd_t *Performance_Cmd;
+	FFT_Cmd_t *FFT_Cmd;
+
+	char *filename;
+	FILE *fd;
+	mygetopt_t opts;
+	int c;
+	char *cp;
+	char *sp;
+	char line[256];
+	char *my_argv[MAX_ARGC];
+	int my_argc;
+	int i;
+	DT_mygetopt_init(&opts);
+	opts.opterr = 0;	/* turn off automatical error handler */
+
+	fd = 0;
+	my_argc = 0;
+	for (i = 0; i < MAX_ARGC; i++) {
+		my_argv[i] = NULL;
+	}
+
+	/* dapltest with no arguments means run as a server with default values */
+	if (argc == 1) {
+		params_ptr->test_type = SERVER_TEST;
+		params_ptr->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
+		Server_Cmd = &params_ptr->u.Server_Cmd;
+		DT_Server_Cmd_Init(Server_Cmd);
+		if (!DT_Mdep_GetDefaultDeviceName(Server_Cmd->dapl_name)) {
+			DT_Mdep_printf("can't get default device name\n");
+			return false;
+		}
+		return true;
+	}
+	/* check for a script file */
+	if (strncmp(argv[1], "-f", 2) == 0) {
+		if (argc == 2) {	/* dapltest -fdata  */
+			filename = argv[1] + 2;
+		} else {
+			if (argc == 3 && strcmp(argv[1], "-f") == 0) {	/* dapltest -f data */
+				filename = argv[2];
+			} else {
+				DT_Mdep_printf
+				    ("-f <script_file> allows no additional options\n");
+				goto main_usage;
+			}
+		}
+
+		if (!filename || strlen(filename) == 0) {
+			DT_Mdep_printf
+			    ("Missing <script_file> with -f option\n");
+			goto main_usage;
+		}
+		/* read the script file and create a fake argc, argv */
+		fd = fopen(filename, "r");
+		if (fd == 0) {
+			DT_Mdep_printf("Cannot open script file: %s\n",
+				       filename);
+			goto main_usage;
+		}
+		my_argc = 1;
+		my_argv[0] = DT_Mdep_Malloc(MAX_ARG_LEN);
+		if (!my_argv[0]) {
+			DT_Mdep_printf("No Memory\n");
+			goto error_return;
+		}
+		strcpy(my_argv[0], argv[0]);
+		while (fgets(&line[0], 256, fd)) {
+			sp = &line[0];
+			for (;;) {
+				cp = strtok(sp, " \t\n");
+				sp = 0;	/* so can continue to parse this string */
+				if (!cp) {	/* no more token found */
+					break;
+				}
+				if (*cp == '#') {	/* Comment; go to next line.  */
+					break;
+				}
+				my_argv[my_argc] = DT_Mdep_Malloc(MAX_ARG_LEN);
+				if (!my_argv[my_argc]) {
+					DT_Mdep_printf("No Memory\n");
+					goto error_return;
+				}
+				strcpy(my_argv[my_argc], cp);
+				my_argc++;
+			}
+		}
+	} else {
+		my_argc = argc;
+		for (i = 0; i < argc; i++) {
+			my_argv[i] = argv[i];
+		}
+	}
+
+#if 0
+	for (i = 0; i < my_argc; i++) {
+		DT_Mdep_printf("ARG %s\n", my_argv[i]);
+	}
+	exit(1);
+#endif
+
+	/* get test type - which must be the first arg */
+	c = DT_mygetopt_r(my_argc, my_argv, "T:", &opts);
+	if (c != 'T') {
+		DT_Mdep_printf("Must Specify Test (-T) option first\n");
+		goto main_usage;
+	}
+	if ((opts.optarg == 0) || strlen(opts.optarg) == 0
+	    || *opts.optarg == '-') {
+		DT_Mdep_printf("Must specify test type\n");
+		goto main_usage;
+	}
+	switch (*opts.optarg) {
+	case 'S':		/* Server Test */
+		{
+			params_ptr->test_type = SERVER_TEST;
+			Server_Cmd = &params_ptr->u.Server_Cmd;
+			DT_Server_Cmd_Init(Server_Cmd);
+			if (!DT_Server_Cmd_Parse(Server_Cmd,
+						 my_argc, my_argv, &opts)) {
+				goto error_return;
+			}
+			params_ptr->ReliabilityLevel =
+			    Server_Cmd->ReliabilityLevel;
+			params_ptr->debug = Server_Cmd->debug;
+			break;
+		}
+	case 'T':		/* Transaction Test */
+		{
+			params_ptr->test_type = TRANSACTION_TEST;
+			Transaction_Cmd = &params_ptr->u.Transaction_Cmd;
+			DT_Transaction_Cmd_Init(Transaction_Cmd);
+			if (!DT_Transaction_Cmd_Parse(Transaction_Cmd,
+						      my_argc, my_argv, &opts))
+			{
+				goto error_return;
+			}
+			params_ptr->ReliabilityLevel =
+			    Transaction_Cmd->ReliabilityLevel;
+			params_ptr->debug = Transaction_Cmd->debug;
+			DT_NetAddrLookupHostAddress(&params_ptr->server_netaddr,
+						    Transaction_Cmd->
+						    server_name);
+			break;
+		}
+	case 'Q':		/* Quit server Test */
+		{
+			params_ptr->test_type = QUIT_TEST;
+			Quit_Cmd = &params_ptr->u.Quit_Cmd;
+			DT_Quit_Cmd_Init(Quit_Cmd);
+			if (!DT_Quit_Cmd_Parse(Quit_Cmd,
+					       my_argc, my_argv, &opts)) {
+				goto error_return;
+			}
+			params_ptr->ReliabilityLevel =
+			    Quit_Cmd->ReliabilityLevel;
+			params_ptr->debug = Quit_Cmd->debug;
+			DT_NetAddrLookupHostAddress(&params_ptr->server_netaddr,
+						    Quit_Cmd->server_name);
+			break;
+		}
+	case 'L':		/* Limit Test */
+		{
+			params_ptr->test_type = LIMIT_TEST;
+			Limit_Cmd = &params_ptr->u.Limit_Cmd;
+			DT_Limit_Cmd_Init(Limit_Cmd);
+			if (!DT_Limit_Cmd_Parse
+			    (Limit_Cmd, my_argc, my_argv, &opts)) {
+				goto error_return;
+			}
+			params_ptr->ReliabilityLevel =
+			    Limit_Cmd->ReliabilityLevel;
+			params_ptr->debug = Limit_Cmd->debug;
+			break;
+		}
+	case 'P':		/* Performance Test */
+		{
+			params_ptr->test_type = PERFORMANCE_TEST;
+			Performance_Cmd = &params_ptr->u.Performance_Cmd;
+
+			if (!DT_Performance_Cmd_Init(Performance_Cmd)) {
+				goto error_return;
+			}
+
+			if (!DT_Performance_Cmd_Parse(Performance_Cmd,
+						      my_argc, my_argv, &opts))
+			{
+				goto error_return;
+			}
+
+			params_ptr->ReliabilityLevel = Performance_Cmd->qos;
+			params_ptr->debug = Performance_Cmd->debug;
+			DT_NetAddrLookupHostAddress(&params_ptr->server_netaddr,
+						    Performance_Cmd->
+						    server_name);
+			break;
+		}
+	case 'F':
+		{
+			params_ptr->test_type = FFT_TEST;
+			FFT_Cmd = &params_ptr->u.FFT_Cmd;
+			DT_FFT_Cmd_Init(FFT_Cmd);
+			if (!DT_FFT_Cmd_Parse(FFT_Cmd, my_argc, my_argv, &opts)) {
+				goto error_return;
+			}
+			params_ptr->ReliabilityLevel =
+			    FFT_Cmd->ReliabilityLevel;
+			DT_NetAddrLookupHostAddress(&params_ptr->server_netaddr,
+						    FFT_Cmd->server_name);
+			params_ptr->debug = false;
+			break;
+		}
+
+	default:
+		{
+			DT_Mdep_printf("Invalid Test Type\n");
+			goto main_usage;
+		}
+	}
+
+	if (fd) {
+		for (i = 0; i < my_argc; i++) {
+			DT_Mdep_Free(my_argv[i]);
+		}
+		fclose(fd);
+	}
+	return true;
+
+      main_usage:
+	Dapltest_Main_Usage();
+      error_return:
+	if (fd) {
+		for (i = 0; i < my_argc; i++) {
+			DT_Mdep_Free(my_argv[i]);
+		}
+		fclose(fd);
+	}
+	return false;
+}
diff --git a/test/dapltest/cmd/dapl_performance_cmd.c b/test/dapltest/cmd/dapl_performance_cmd.c
new file mode 100644
index 0000000..5f9b9f1
--- /dev/null
+++ b/test/dapltest/cmd/dapl_performance_cmd.c
@@ -0,0 +1,297 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+static void DT_Performance_Cmd_Usage(void)
+{
+	DT_Mdep_printf("USAGE: ---- PERFORMANCE TEST ----\n");
+	DT_Mdep_printf("USAGE:     dapltest -T P\n");
+	DT_Mdep_printf("USAGE:              -s <server Name>\n");
+	DT_Mdep_printf("USAGE:              [-m b|p]\n");
+	DT_Mdep_printf("USAGE:              [-D <device Name>]\n");
+	DT_Mdep_printf("USAGE:              [-d] : debug (zero)\n");
+	DT_Mdep_printf
+	    ("USAGE:              [-i <num iterations>]     : (1, 000)\n");
+	DT_Mdep_printf("USAGE:              [-p <pipline>]\n");
+	DT_Mdep_printf("USAGE:              [-R <service reliability>]\n");
+	DT_Mdep_printf
+	    ("USAGE:                  (BE == QOS_BEST_EFFORT - Default)\n");
+	DT_Mdep_printf("USAGE:                  (HT == QOS_HIGH_THROUGHPUT)\n");
+	DT_Mdep_printf("USAGE:                  (LL == QOS_LOW_LATENCY)\n");
+	DT_Mdep_printf("USAGE:                  (EC == QOS_ECONOMY)\n");
+	DT_Mdep_printf("USAGE:                  (PM == QOS_PREMIUM)\n");
+	DT_Mdep_printf("USAGE:           <OP>\n");
+	DT_Mdep_printf("USAGE:\n");
+	DT_Mdep_printf("USAGE: Each OP consists of:\n");
+	DT_Mdep_printf("USAGE:     <transfer_type> : \"RR\" (RDMA READ)\n");
+	DT_Mdep_printf("USAGE:                     : \"RW\" (RDMA WRITE)\n");
+	DT_Mdep_printf("USAGE:     [seg_size [num_segs] ]      : (4096, 1)\n");
+}
+
+static bool
+DT_Performance_Cmd_Parse_Op(Performance_Cmd_t * cmd,
+			    int index, int my_argc, char **my_argv)
+{
+	int i;
+
+	/*
+	 * Op Format: <RR/RW> [seg_size] [num_segs]
+	 */
+
+	if (index == my_argc) {
+		DT_Mdep_printf("Operation Missing Transfer Type\n");
+		return (false);
+	}
+
+	for (i = 0; index < my_argc; i++, index++) {
+		switch (i) {
+		case 0:
+			{
+				if (0 ==
+				    strncmp(my_argv[index], "RR",
+					    strlen("RR"))) {
+					cmd->op.transfer_type = RDMA_READ;
+				} else if (0 ==
+					   strncmp(my_argv[index], "RW",
+						   strlen("RW"))) {
+					cmd->op.transfer_type = RDMA_WRITE;
+				} else {
+					DT_Mdep_printf
+					    ("OP type must be <RR/RW/SR>\n");
+					return (false);
+				}
+				break;
+			}
+		case 1:
+			{
+				cmd->op.seg_size = atoi(my_argv[index]);
+				break;
+			}
+		case 2:
+			{
+				cmd->op.num_segs = atoi(my_argv[index]);
+				break;
+			}
+		default:
+			{
+				DT_Mdep_printf("Too many OP args\n");
+				return (false);
+			}
+		}
+	}
+
+	return (true);
+}
+
+static bool DT_Performance_Cmd_Validate(Performance_Cmd_t * cmd)
+{
+	if ('\0' == cmd->server_name[0]) {
+		DT_Mdep_printf
+		    ("Must specify server_name in command line or scriptfile\n");
+		return (false);
+	}
+
+	if ('\0' == cmd->dapl_name[0]) {
+		DT_Mdep_printf
+		    ("Must specify device_name in command line or scriptfile\n");
+		return (false);
+	}
+
+	if (0 == cmd->pipeline_len) {
+		DT_Mdep_printf("Pipeline size must not be 0\n");
+		return (false);
+	}
+
+	if (cmd->debug) {
+		DT_Performance_Cmd_Print(cmd);
+	}
+
+	return true;
+}
+
+bool
+DT_Performance_Cmd_Parse(Performance_Cmd_t * cmd,
+			 int my_argc, char **my_argv, mygetopt_t * opts)
+{
+	int c;
+	unsigned int len;
+
+	for (;;) {
+		c = DT_mygetopt_r(my_argc, my_argv, "D:dm:i:p:R:s:", opts);
+
+		if (EOF == c) {
+			break;
+		}
+
+		switch (c) {
+		case 'D':	/* device name */
+			{
+				strncpy(cmd->dapl_name, opts->optarg, NAME_SZ);
+				break;
+			}
+		case 'd':	/* print debug messages */
+			{
+				DT_dapltest_debug++;
+				cmd->debug = true;
+				break;
+			}
+		case 'm':	/* mode */
+			{
+				if (!strncmp(opts->optarg, "b", strlen("b"))) {
+					cmd->mode = BLOCKING_MODE;
+				} else
+				    if (!strncmp
+					(opts->optarg, "p", strlen("p"))) {
+					cmd->mode = POLLING_MODE;
+				} else {
+					DT_Mdep_printf
+					    ("Syntax Error -m <mode> option\n");
+					DT_Performance_Cmd_Usage();
+					return (false);
+				}
+
+				break;
+			}
+		case 'i':	/* num iterations */
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -i <iterations> option\n");
+					DT_Performance_Cmd_Usage();
+					return (false);
+				}
+				cmd->num_iterations = atol(opts->optarg);
+				break;
+			}
+		case 'p':	/* pipline size */
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -p <piplein> option\n");
+					DT_Performance_Cmd_Usage();
+					return (false);
+				}
+				cmd->pipeline_len = atol(opts->optarg);
+				break;
+			}
+		case 'R':	/* Service Reliability Level */
+			{
+				cmd->qos = DT_ParseQoS(opts->optarg);
+				break;
+			}
+		case 's':	/* server name */
+			{
+				if ((opts->optarg == 0) ||
+				    strlen(opts->optarg) == 0 ||
+				    *opts->optarg == '-') {
+					DT_Mdep_printf
+					    ("must specify server name\n");
+					DT_Performance_Cmd_Usage();
+					return (false);
+				}
+
+				strncpy(cmd->server_name, opts->optarg,
+					NAME_SZ);
+				break;
+			}
+		default:
+			{
+				DT_Mdep_printf
+				    ("Invalid Performance Test Parameter: %c\n",
+				     c);
+				DT_Performance_Cmd_Usage();
+				return (false);
+			}
+		}
+	}
+
+	/*
+	 * now parse the op
+	 */
+	if (!DT_Performance_Cmd_Parse_Op(cmd, opts->optind, my_argc, my_argv)) {
+		DT_Performance_Cmd_Usage();
+		return (false);
+	}
+
+	if (!DT_Performance_Cmd_Validate(cmd)) {
+		DT_Performance_Cmd_Usage();
+		return (false);
+	}
+
+	return (true);
+}
+
+bool DT_Performance_Cmd_Init(Performance_Cmd_t * cmd)
+{
+	memset(cmd, 0, sizeof(Performance_Cmd_t));
+	cmd->dapltest_version = DAPLTEST_VERSION;
+	cmd->client_is_little_endian = DT_local_is_little_endian;
+	cmd->qos = DAT_QOS_BEST_EFFORT;
+	cmd->debug = false;
+	cmd->num_iterations = 1000;
+	cmd->pipeline_len = ~0;
+
+	cmd->op.transfer_type = RDMA_WRITE;
+	cmd->op.seg_size = 4096;
+	cmd->op.num_segs = 1;
+
+	if (!DT_Mdep_GetDefaultDeviceName(cmd->dapl_name)) {
+		DT_Mdep_printf("can't get default device name\n");
+		return (false);
+	}
+
+	return (true);
+}
+
+void DT_Performance_Cmd_Print(Performance_Cmd_t * cmd)
+{
+	DT_Mdep_printf("-------------------------------------\n");
+	DT_Mdep_printf("PerfCmd.server_name              : %s\n",
+		       cmd->server_name);
+	DT_Mdep_printf("PerfCmd.dapl_name                : %s\n",
+		       cmd->dapl_name);
+	DT_Mdep_printf("PerfCmd.mode                     : %s\n",
+		       (cmd->mode == BLOCKING_MODE) ? "BLOCKING" : "POLLING");
+	DT_Mdep_printf("PerfCmd.num_iterations           : %d\n",
+		       cmd->num_iterations);
+	DT_Mdep_printf("PerfCmd.pipeline_len             : %d\n",
+		       cmd->pipeline_len);
+	DT_Mdep_printf("PerfCmd.op.transfer_type         : %s\n",
+		       cmd->op.transfer_type == RDMA_READ ? "RDMA_READ" :
+		       cmd->op.transfer_type == RDMA_WRITE ? "RDMA_WRITE" :
+		       "SEND_RECV");
+	DT_Mdep_printf("PerfCmd.op.num_segs              : %d\n",
+		       cmd->op.num_segs);
+	DT_Mdep_printf("PerfCmd.op.seg_size              : %d\n",
+		       cmd->op.seg_size);
+}
diff --git a/test/dapltest/cmd/dapl_qos_util.c b/test/dapltest/cmd/dapl_qos_util.c
new file mode 100644
index 0000000..42995dc
--- /dev/null
+++ b/test/dapltest/cmd/dapl_qos_util.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/*
+ * Parse a QOS argument into a DAT_QOS.
+ *
+ * Returns no errors: defaults to best effort.
+ */
+DAT_QOS DT_ParseQoS(char *arg)
+{
+	if (0 == strcmp(arg, "HT")) {
+		return (DAT_QOS_HIGH_THROUGHPUT);
+	}
+
+	if (0 == strcmp(arg, "LL")) {
+		return (DAT_QOS_LOW_LATENCY);
+	}
+
+	if (0 == strcmp(arg, "EC")) {
+		return (DAT_QOS_ECONOMY);
+	}
+
+	if (0 == strcmp(arg, "PM")) {
+		return (DAT_QOS_PREMIUM);
+	}
+	/*
+	 * Default to "BE" so no point in checking further
+	 */
+	return (DAT_QOS_BEST_EFFORT);
+}
diff --git a/test/dapltest/cmd/dapl_quit_cmd.c b/test/dapltest/cmd/dapl_quit_cmd.c
new file mode 100644
index 0000000..d8536a7
--- /dev/null
+++ b/test/dapltest/cmd/dapl_quit_cmd.c
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/*--------------------------------------------------------- */
+void DT_Quit_Cmd_Init(Quit_Cmd_t * cmd)
+{
+	memset((void *)cmd, 0, sizeof(Quit_Cmd_t));
+	cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
+}
+
+/*--------------------------------------------------------- */
+bool
+DT_Quit_Cmd_Parse(Quit_Cmd_t * cmd,
+		  int my_argc, char **my_argv, mygetopt_t * opts)
+{
+	int c;
+
+	for (;;) {
+		c = DT_mygetopt_r(my_argc, my_argv, "ds:D:R:", opts);
+		if (c == EOF) {
+			break;
+		}
+		switch (c) {
+		case 'D':
+			{
+				strcpy(cmd->device_name, opts->optarg);
+				break;
+			}
+		case 's':
+			{
+				strcpy(cmd->server_name, opts->optarg);
+				break;
+			}
+		case 'd':	/* print debug messages */
+			{
+				DT_dapltest_debug++;
+				cmd->debug = true;
+				break;
+			}
+		case 'R':	/* Service Reliability Level */
+			{
+				cmd->ReliabilityLevel =
+				    DT_ParseQoS(opts->optarg);
+				break;
+			}
+		case '?':
+		default:
+			{
+				DT_Mdep_printf("Invalid Quit option: %c\n",
+					       opts->optopt);
+				DT_Quit_Cmd_Usage();
+				return (false);
+			}
+		}
+	}
+	if (cmd->device_name[0] == '\0') {
+		if (!DT_Mdep_GetDefaultDeviceName(cmd->device_name)) {
+			DT_Mdep_printf("can't get default device name\n");
+			DT_Quit_Cmd_Usage();
+			return (false);
+		}
+	}
+	if (!DT_Quit_Cmd_Validate(cmd)) {
+		DT_Quit_Cmd_Usage();
+		return (false);
+	}
+	return (true);
+}
+
+/*------------------------------------------------------------------------------ */
+bool DT_Quit_Cmd_Validate(Quit_Cmd_t * cmd)
+{
+	if (cmd->server_name[0] == '\0') {
+		DT_Mdep_printf
+		    ("Must specify server_name in command line or scriptfile\n");
+		return (false);
+	}
+	return (true);
+}
+
+/*--------------------------------------------------------- */
+void DT_Quit_Cmd_Usage(void)
+{
+	DT_Mdep_printf("USAGE: ---- QUIT TEST ----\n");
+	DT_Mdep_printf("USAGE:     dapltest -T Q\n");
+	DT_Mdep_printf("USAGE:              -s <server Name>\n");
+	DT_Mdep_printf("USAGE:              [-D <device Name>]\n");
+	DT_Mdep_printf("USAGE:              [-d] : debug (zero)\n");
+	DT_Mdep_printf("USAGE:              [-R <service reliability>]\n");
+	DT_Mdep_printf
+	    ("USAGE:                  (BE == QOS_BEST_EFFORT - Default)\n");
+	DT_Mdep_printf("USAGE:                  (HT == QOS_HIGH_THROUGHPUT)\n");
+	DT_Mdep_printf("USAGE:                  (LL == QOS_LOW_LATENCY)\n");
+	DT_Mdep_printf("USAGE:                  (EC == QOS_ECONOMY)\n");
+	DT_Mdep_printf("USAGE:                  (PM == QOS_PREMIUM)\n");
+}
+
+/*--------------------------------------------------------- */
+void DT_Quit_Cmd_Print(Quit_Cmd_t * cmd)
+{
+	DT_Mdep_printf("Quit_Cmd.server_name: %s\n", cmd->server_name);
+	DT_Mdep_printf("Quit_Cmd.device_name: %s\n", cmd->device_name);
+}
diff --git a/test/dapltest/cmd/dapl_server_cmd.c b/test/dapltest/cmd/dapl_server_cmd.c
new file mode 100644
index 0000000..5859471
--- /dev/null
+++ b/test/dapltest/cmd/dapl_server_cmd.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_Server_Cmd_Init(Server_Cmd_t * Server_Cmd)
+{
+	DT_dapltest_debug = 0;
+	Server_Cmd->debug = false;
+	Server_Cmd->dapl_name[0] = '\0';
+	Server_Cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
+}
+
+bool
+DT_Server_Cmd_Parse(Server_Cmd_t * Server_Cmd,
+		    int my_argc, char **my_argv, mygetopt_t * opts)
+{
+	int c;
+	for (;;) {
+		c = DT_mygetopt_r(my_argc, my_argv, "dD:R:", opts);
+		if (c == EOF) {
+			break;
+		}
+		switch (c) {
+		case 'D':
+			{
+				strcpy(Server_Cmd->dapl_name, opts->optarg);
+				break;
+			}
+		case 'd':
+			{
+				DT_dapltest_debug++;
+				Server_Cmd->debug = true;
+				break;
+			}
+		case 'R':	/* Service Reliability Level */
+			{
+				Server_Cmd->ReliabilityLevel =
+				    DT_ParseQoS(opts->optarg);
+				if (0 == Server_Cmd->ReliabilityLevel) {
+					return (false);
+				}
+				break;
+			}
+		case '?':
+		default:
+			{
+				DT_Mdep_printf("Invalid Server option: %c\n",
+					       opts->optopt);
+				DT_Server_Cmd_Usage();
+				return (false);
+			}
+		}
+	}
+	if (Server_Cmd->dapl_name == '\0') {
+		if (!DT_Mdep_GetDefaultDeviceName(Server_Cmd->dapl_name)) {
+			DT_Mdep_printf("can't get default device name\n");
+			DT_Server_Cmd_Usage();
+			return (false);
+		}
+	}
+	return (true);
+}
+
+void DT_Server_Cmd_Usage(void)
+{
+	DT_Mdep_printf("USAGE: ---- SERVER MODE ----\n");
+	DT_Mdep_printf("USAGE:     dapltest -T S\n");
+	DT_Mdep_printf("USAGE:              [-D <device Name>]\n");
+	DT_Mdep_printf("USAGE:              [-d] : debug (zero)\n");
+	DT_Mdep_printf("USAGE:              [-R <service reliability>]\n");
+	DT_Mdep_printf
+	    ("USAGE:                  (BE == QOS_BEST_EFFORT - Default)\n");
+	DT_Mdep_printf("USAGE:                  (HT == QOS_HIGH_THROUGHPUT)\n");
+	DT_Mdep_printf("USAGE:                  (LL == QOS_LOW_LATENCY)\n");
+	DT_Mdep_printf("USAGE:                  (EC == QOS_ECONOMY)\n");
+	DT_Mdep_printf("USAGE:                  (PM == QOS_PREMIUM)\n");
+	DT_Mdep_printf("USAGE: Run as server using default parameters\n");
+	DT_Mdep_printf("USAGE:     dapltest\n");
+	DT_Mdep_printf("USAGE:\n");
+}
+
+void DT_Server_Cmd_Print(Server_Cmd_t * Server_Cmd)
+{
+	DT_Mdep_printf("Server_Cmd.debug:       %d\n", Server_Cmd->debug);
+	DT_Mdep_printf("Server_Cmd.dapl_name: %s\n", Server_Cmd->dapl_name);
+}
diff --git a/test/dapltest/cmd/dapl_transaction_cmd.c b/test/dapltest/cmd/dapl_transaction_cmd.c
new file mode 100644
index 0000000..5bdcab8
--- /dev/null
+++ b/test/dapltest/cmd/dapl_transaction_cmd.c
@@ -0,0 +1,453 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+static bool DT_Transaction_Cmd_Parse_Op(Transaction_Cmd_t * cmd, char *arg)
+{
+	char *c_ptr;
+	int op;
+	if (cmd->num_ops >= MAX_OPS) {
+		DT_Mdep_printf("Client: Too Many Ops - Max %d\n", MAX_OPS);
+		goto error_return;
+	}
+	op = cmd->num_ops;
+	cmd->num_ops++;
+
+	/* set some defaults */
+	cmd->op[op].seg_size = 4096;
+	cmd->op[op].num_segs = 1;
+	cmd->op[op].reap_send_on_recv = false;
+
+	/*
+	 * packet format: <server/client> <RR/RW/SR> [seg_size] [num_segs]
+	 */
+	c_ptr = strtok(arg, " \t");
+	if (!c_ptr) {
+		DT_Mdep_printf("OP first arg must <server/client>\n");
+		goto error_return;
+	}
+	/* first token is <who>: */
+	if (strcmp(c_ptr, "server") == 0) {
+		cmd->op[op].server_initiated = true;
+	} else {
+		if (strcmp(c_ptr, "client") == 0) {
+			cmd->op[op].server_initiated = false;
+		} else {
+			DT_Mdep_printf("OP first arg must <server/client>\n");
+			goto error_return;
+		}
+	}
+
+	c_ptr = strtok(0, " \t");
+	if (!c_ptr) {
+		DT_Mdep_printf("OP Second arg must be <RR/RW/SR>\n");
+		goto error_return;
+	}
+	/* second token is <transfer_type>: */
+	if (strcmp(c_ptr, "RR") == 0) {
+		cmd->op[op].transfer_type = RDMA_READ;
+	} else {
+		if (strcmp(c_ptr, "RW") == 0) {
+			cmd->op[op].transfer_type = RDMA_WRITE;
+		} else {
+			if (strcmp(c_ptr, "SR") == 0) {
+				cmd->op[op].transfer_type = SEND_RECV;
+			} else {
+				DT_Mdep_printf
+				    ("OP Second arg must be <RR/RW/SR>\n");
+				goto error_return;
+			}
+		}
+	}
+	/*
+	 * there may or may not be additional parameters... [seg_size] [num_segs]
+	 * [-f]
+	 */
+	c_ptr = strtok(0, " \t");
+	if (c_ptr && strspn(c_ptr, "0123456789") != 0) {
+		cmd->op[op].seg_size = atoi(c_ptr);
+		c_ptr = strtok(0, " \t");
+	}
+	if (c_ptr && strspn(c_ptr, "0123456789") != 0) {
+		cmd->op[op].num_segs = atoi(c_ptr);
+		c_ptr = strtok(0, " \t");
+	}
+	if (c_ptr && strcmp(c_ptr, "-f") == 0) {
+		cmd->op[op].reap_send_on_recv = true;
+		if (cmd->op[op].transfer_type != SEND_RECV) {
+			DT_Mdep_printf("OP: -f only valid on SEND_RECV\n");
+			goto error_return;
+		}
+		c_ptr = strtok(0, " \t");
+	}
+	if (c_ptr) {
+		DT_Mdep_printf("OP too many args \n");
+		goto error_return;
+	}
+	return true;
+
+      error_return:
+	return false;
+}
+
+static bool DT_Transaction_Cmd_Validate(Transaction_Cmd_t * cmd)
+{
+	unsigned int i;
+	bool has_server_send;
+	bool has_client_send;
+	unsigned int reap_count;
+	has_server_send = false;
+	has_client_send = false;
+	reap_count = 0;
+
+	if (cmd->server_name[0] == '\0') {
+		DT_Mdep_printf
+		    ("Must specify server_name in command line or scriptfile\n");
+		return (false);
+	}
+	for (i = 0; i < cmd->num_ops; i++) {
+		switch (cmd->op[i].transfer_type) {
+		case SEND_RECV:
+			{
+				if (cmd->op[i].server_initiated) {
+					has_server_send = true;
+				} else {
+					has_client_send = true;
+				}
+				if (cmd->op[i].reap_send_on_recv) {
+					if (!cmd->op[i].server_initiated) {
+						/* client */
+						reap_count++;
+					} else {
+						/* server */
+						if (reap_count > 0) {
+							reap_count--;
+						} else {
+							DT_Mdep_printf
+							    ("OP: Unbalanced -f options\n");
+							return false;
+						}
+					}
+				}
+				break;
+			}
+		case RDMA_READ:
+			{
+				break;
+			}
+		case RDMA_WRITE:
+			{
+				break;
+			}
+		}
+	}
+
+	if (!has_server_send || !has_client_send) {
+		DT_Mdep_printf("Error: Transaction test requires \n");
+		DT_Mdep_printf
+		    ("Error: At least one server SR and one client SR Operation\n");
+		return false;
+	}
+	if (reap_count != 0) {
+		DT_Mdep_printf("OP: Unbalanced -f options\n");
+		return false;
+	}
+	if (cmd->debug) {
+		DT_Transaction_Cmd_Print(cmd);
+	}
+	return true;
+}
+
+static void DT_Transaction_Cmd_Usage(void)
+{
+	DT_Mdep_printf("USAGE: ---- TRANSACTION TEST ----\n");
+	DT_Mdep_printf("USAGE:     dapltest -T T\n");
+	DT_Mdep_printf("USAGE:              -s <server Name>\n");
+	DT_Mdep_printf("USAGE:              [-D <device Name>]\n");
+	DT_Mdep_printf("USAGE:              [-d] : debug (zero)\n");
+	DT_Mdep_printf
+	    ("USAGE:              [-i <num iterations>]     : (1, 000)\n");
+	DT_Mdep_printf("USAGE:              [-t <num threads>]        : (1)\n");
+	DT_Mdep_printf("USAGE:              [-w <num EPs per thread>] : (1)\n");
+	DT_Mdep_printf("USAGE:              [-V ] : Validate data: (false)\n");
+	DT_Mdep_printf
+	    ("USAGE:              [-P ] : DTO Completion Polling: (false)\n");
+	DT_Mdep_printf("USAGE:              [-r ] : Use RSPs: (false)\n");
+	DT_Mdep_printf("USAGE:              [-R <service reliability>]\n");
+	DT_Mdep_printf
+	    ("USAGE:                  (BE == QOS_BEST_EFFORT - Default)\n");
+	DT_Mdep_printf("USAGE:                  (HT == QOS_HIGH_THROUGHPUT)\n");
+	DT_Mdep_printf("USAGE:                  (LL == QOS_LOW_LATENCY)\n");
+	DT_Mdep_printf("USAGE:                  (EC == QOS_ECONOMY)\n");
+	DT_Mdep_printf("USAGE:                  (PM == QOS_PREMIUM)\n");
+	DT_Mdep_printf("USAGE:           <OP [OP...]\n");
+	DT_Mdep_printf("USAGE:\n");
+	DT_Mdep_printf("USAGE: Each OP consists of:\n");
+	DT_Mdep_printf("USAGE:     <who>       : \"server\"/\"client\"\n");
+	DT_Mdep_printf("USAGE:     <transfer_type> : \"SR\" (SEND/RECV)\n");
+	DT_Mdep_printf("USAGE:                     : \"RR\" (RDMA READ)\n");
+	DT_Mdep_printf("USAGE:                     : \"RW\" (RDMA WRITE)\n");
+	DT_Mdep_printf("USAGE:     [seg_size [num_segs] ]      : (4096, 1)\n");
+	DT_Mdep_printf
+	    ("USAGE:     [-f]                 : Reap sends on recv\n");
+	DT_Mdep_printf("USAGE:\n");
+	DT_Mdep_printf("NOTE: -f is only allowed on \"SR\" OPs\n");
+	DT_Mdep_printf
+	    ("NOTE: -f must appear in pairs (one client, one server)\n");
+	DT_Mdep_printf
+	    ("NOTE: At least one server SR and one client SR OP are required\n");
+	DT_Mdep_printf
+	    ("NOTE: and use of -V results in the use of three extra OPs\n");
+}
+
+void DT_Transaction_Cmd_Init(Transaction_Cmd_t * cmd)
+{
+	memset((void *)cmd, 0, sizeof(Transaction_Cmd_t));
+	cmd->dapltest_version = DAPLTEST_VERSION;
+	cmd->client_is_little_endian = DT_local_is_little_endian;
+	cmd->num_iterations = 1000;
+	cmd->num_threads = 1;
+	cmd->eps_per_thread = 1;
+	cmd->debug = false;
+	cmd->validate = false;
+	cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
+}
+
+bool
+DT_Transaction_Cmd_Parse(Transaction_Cmd_t * cmd,
+			 int my_argc, char **my_argv, mygetopt_t * opts)
+{
+	int c;
+	unsigned int len;
+	int i;
+	char op[100];
+	for (;;) {
+		c = DT_mygetopt_r(my_argc, my_argv, "rQVPdw:s:D:i:t:v:R:",
+				  opts);
+		if (c == EOF) {
+			break;
+		}
+		switch (c) {
+		case 's':	/* server name */
+			{
+				if ((opts->optarg == 0)
+				    || strlen(opts->optarg) == 0
+				    || *opts->optarg == '-') {
+					DT_Mdep_printf
+					    ("must specify server name\n");
+					DT_Transaction_Cmd_Usage();
+					return (false);
+				}
+				strcpy(cmd->server_name, opts->optarg);
+				break;
+			}
+		case 'D':	/* device name */
+			{
+				strcpy(cmd->dapl_name, opts->optarg);
+				break;
+			}
+
+		case 'i':	/* num iterations */
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -i<iterations> option\n");
+					DT_Transaction_Cmd_Usage();
+					return (false);
+				}
+				cmd->num_iterations = atol(opts->optarg);
+
+				break;
+			}
+		case 't':	/* num threads */
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -t<num threads> option\n");
+					DT_Transaction_Cmd_Usage();
+					return (false);
+				}
+				cmd->num_threads = atol(opts->optarg);
+				break;
+			}
+		case 'w':	/* num EPs per thread */
+			{
+				len = strspn(opts->optarg, "0123456789");
+				if (len == 0 || len != strlen(opts->optarg)) {
+					DT_Mdep_printf
+					    ("Syntax Error -w<EPs/thread> option\n");
+					DT_Transaction_Cmd_Usage();
+					return (false);
+				}
+				cmd->eps_per_thread = atol(opts->optarg);
+				break;
+			}
+		case 'd':	/* print debug messages */
+			{
+				DT_dapltest_debug++;
+				cmd->debug = true;
+				break;
+			}
+		case 'r':	/* use RSP instead of PSP */
+			{
+				cmd->use_rsp = true;
+				break;
+			}
+		case 'V':	/* validate data being sent/received */
+			{
+				cmd->validate = true;
+				break;
+			}
+		case 'P':	/* use completion polling */
+			{
+				cmd->poll = true;
+				break;
+			}
+		case 'R':	/* Service Reliability Level */
+			{
+				cmd->ReliabilityLevel =
+				    DT_ParseQoS(opts->optarg);
+				break;
+			}
+		case '?':
+		default:
+			{
+				DT_Mdep_printf
+				    ("Invalid Transaction Test Parameter: %c\n",
+				     c);
+				DT_Transaction_Cmd_Usage();
+				return (false);
+			}
+		}
+	}
+	if (cmd->dapl_name[0] == '\0') {
+		if (!DT_Mdep_GetDefaultDeviceName(cmd->dapl_name)) {
+			DT_Mdep_printf("can't get default device name\n");
+			DT_Transaction_Cmd_Usage();
+			return (false);
+		}
+	}
+	/*
+	 * now parse the transaction ops this is ugly, but it's easier to gather
+	 * each transaction into a single string
+	 */
+	for (i = opts->optind; i < my_argc; i++) {
+		strcpy(&op[0], my_argv[i]);
+		while (i < my_argc - 1) {
+			i++;
+			if ((strncmp(my_argv[i], "client", 6) == 0) ||
+			    strncmp(my_argv[i], "server", 6) == 0) {
+				i--;
+				break;
+			}
+			strcat(op, " ");
+			strcat(op, my_argv[i]);
+		}
+		if (!DT_Transaction_Cmd_Parse_Op(cmd, op)) {
+			DT_Transaction_Cmd_Usage();
+			return (false);
+		}
+	}
+
+	/*
+	 * If we're going to validate the data, we append 3 OPs that
+	 * serve as barriers so that both the client and server can
+	 * validate their entire set of recv transactions without
+	 * interference.
+	 *
+	 * The first op appended serves to notify the client that the
+	 * server is at the rendezvous and will transfer nothing else,
+	 * so the client can validate all recv buffers.  The second op
+	 * notifies the server that the client is quiescent, so the
+	 * server can safely validate its recv buffers.  The final op
+	 * tells the client that the server is done, and both can
+	 * proceed with the next iteration.
+	 */
+	if (cmd->validate) {
+		DT_Mdep_printf
+		    ("NOTE: Adding OP \"server SR\" - for validation\n");
+		memcpy(op, "server SR", strlen("server SR") + 1);
+		DT_Transaction_Cmd_Parse_Op(cmd, op);
+
+		DT_Mdep_printf
+		    ("NOTE: Adding OP \"client SR\" - for validation\n");
+		memcpy(op, "client SR", strlen("client SR") + 1);
+		DT_Transaction_Cmd_Parse_Op(cmd, op);
+
+		DT_Mdep_printf
+		    ("NOTE: Adding OP \"server SR\" - for validation\n");
+		memcpy(op, "server SR", strlen("server SR") + 1);
+		DT_Transaction_Cmd_Parse_Op(cmd, op);
+	}
+	if (!DT_Transaction_Cmd_Validate(cmd)) {
+		DT_Transaction_Cmd_Usage();
+		return (false);
+	}
+	return (true);
+}
+
+void DT_Transaction_Cmd_Print(Transaction_Cmd_t * cmd)
+{
+	unsigned int i;
+	DT_Mdep_printf("-------------------------------------\n");
+	DT_Mdep_printf("TransCmd.server_name              : %s\n",
+		       cmd->server_name);
+	DT_Mdep_printf("TransCmd.num_iterations           : %d\n",
+		       cmd->num_iterations);
+	DT_Mdep_printf("TransCmd.num_threads              : %d\n",
+		       cmd->num_threads);
+	DT_Mdep_printf("TransCmd.eps_per_thread           : %d\n",
+		       cmd->eps_per_thread);
+	DT_Mdep_printf("TransCmd.validate                 : %d\n",
+		       cmd->validate);
+	DT_Mdep_printf("TransCmd.dapl_name                : %s\n",
+		       cmd->dapl_name);
+	DT_Mdep_printf("TransCmd.num_ops                  : %d\n",
+		       cmd->num_ops);
+
+	for (i = 0; i < cmd->num_ops; i++) {
+		DT_Mdep_printf("TransCmd.op[%d].transfer_type      : %s %s\n",
+			       i,
+			       cmd->op[i].transfer_type == 0 ? "RDMA_READ" :
+			       cmd->op[i].transfer_type == 1 ? "RDMA_WRITE" :
+			       "SEND_RECV",
+			       cmd->op[i].
+			       server_initiated ? " (server)" : " (client)");
+		DT_Mdep_printf("TransCmd.op[%d].seg_size           : %d\n", i,
+			       cmd->op[i].seg_size);
+		DT_Mdep_printf("TransCmd.op[%d].num_segs           : %d\n", i,
+			       cmd->op[i].num_segs);
+		DT_Mdep_printf("TransCmd.op[%d].reap_send_on_recv  : %d\n", i,
+			       cmd->op[i].reap_send_on_recv);
+	}
+}
diff --git a/test/dapltest/common/dapl_endian.c b/test/dapltest/common/dapl_endian.c
new file mode 100644
index 0000000..d93fbb9
--- /dev/null
+++ b/test/dapltest/common/dapl_endian.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_Endian_Init(void)
+{
+	int endian;
+	endian = 1;
+	DT_local_is_little_endian = *((unsigned char *)(&endian)) == 1;
+}
+
+/*
+ * Big/Little Endian conversion functions
+ */
+
+#define c1a32 ((DAT_UINT32)0x00FF00FF)
+#define c1b32 ((DAT_UINT32)0xFF00FF00)
+#define c2a32 ((DAT_UINT32)0x0000FFFF)
+#define c2b32 ((DAT_UINT32)0xFFFF0000)
+#define c164 ((DAT_UINT64)0x00FF00FF)
+#define c1a64 (c164 | (c164 << 32))
+#define c1b64 (c1a64 << 8)
+#define c264 ((DAT_UINT64)0x0000FFFF)
+#define c2a64 (c264 | (c264 << 32))
+#define c2b64 (c2a64 << 16)
+#define c3a64 ((DAT_UINT64)0xFFFFFFFF)
+#define c3b64 (c3a64 << 32)
+
+DAT_UINT32 DT_Endian32(DAT_UINT32 val)
+{
+	if (DT_local_is_little_endian) {
+		return val;
+	}
+	val = ((val & c1a32) << 8) | ((val & c1b32) >> 8);
+	val = ((val & c2a32) << 16) | ((val & c2b32) >> 16);
+	return (val);
+}
+
+DAT_UINT64 DT_Endian64(DAT_UINT64 val)
+{
+	if (DT_local_is_little_endian) {
+		return val;
+	}
+	val = ((val & c1a64) << 8) | ((val & c1b64) >> 8);
+	val = ((val & c2a64) << 16) | ((val & c2b64) >> 16);
+	val = ((val & c3a64) << 32) | ((val & c3b64) >> 32);
+	return (val);
+}
+
+DAT_UINT32 DT_EndianMemHandle(DAT_UINT32 val)
+{
+	if (DT_local_is_little_endian)
+		return val;
+	val = ((val & c1a32) << 8) | ((val & c1b32) >> 8);
+	val = ((val & c2a32) << 16) | ((val & c2b32) >> 16);
+	return (val);
+}
+
+DAT_UINT64 DT_EndianMemAddress(DAT_UINT64 val)
+{
+	DAT_UINT64 val64;
+
+	if (DT_local_is_little_endian)
+		return val;
+	val64 = val;
+	val64 = ((val64 & c1a64) << 8) | ((val64 & c1b64) >> 8);
+	val64 = ((val64 & c2a64) << 16) | ((val64 & c2b64) >> 16);
+	val64 = ((val64 & c3a64) << 32) | ((val64 & c3b64) >> 32);
+	return val64;
+}
diff --git a/test/dapltest/common/dapl_global.c b/test/dapltest/common/dapl_global.c
new file mode 100644
index 0000000..ecd61e7
--- /dev/null
+++ b/test/dapltest/common/dapl_global.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+bool DT_local_is_little_endian;
+DAT_COUNT DT_dapltest_debug = 0;
diff --git a/test/dapltest/common/dapl_performance_cmd_util.c b/test/dapltest/common/dapl_performance_cmd_util.c
new file mode 100644
index 0000000..5321809
--- /dev/null
+++ b/test/dapltest/common/dapl_performance_cmd_util.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_Performance_Cmd_Endian(Performance_Cmd_t * cmd)
+{
+	cmd->dapltest_version = DT_Endian32(cmd->dapltest_version);
+	cmd->qos = DT_Endian32(cmd->qos);
+	cmd->num_iterations = DT_Endian32(cmd->num_iterations);
+	cmd->debug = DT_Endian32(cmd->debug);
+
+	cmd->op.transfer_type = DT_Endian32(cmd->op.transfer_type);
+	cmd->op.seg_size = DT_Endian32(cmd->op.seg_size);
+	cmd->op.num_segs = DT_Endian32(cmd->op.num_segs);
+}
+
+/*
+ *  * Map Performance_Mode_Type values to readable strings
+ *   */
+const char *DT_PerformanceModeToString(Performance_Mode_Type mode)
+{
+	if (BLOCKING_MODE == mode) {
+		return "blocking";
+	} else if (POLLING_MODE == mode) {
+		return "polling";
+	} else {
+		return "error: unkown mode";
+	}
+}
diff --git a/test/dapltest/common/dapl_quit_cmd_util.c b/test/dapltest/common/dapl_quit_cmd_util.c
new file mode 100644
index 0000000..b629ae0
--- /dev/null
+++ b/test/dapltest/common/dapl_quit_cmd_util.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/*--------------------------------------------------------- */
+void DT_Quit_Cmd_Endian(Quit_Cmd_t * cmd, bool to_wire)
+{
+	/* do nothing */
+}
diff --git a/test/dapltest/common/dapl_transaction_cmd_util.c b/test/dapltest/common/dapl_transaction_cmd_util.c
new file mode 100644
index 0000000..30301b1
--- /dev/null
+++ b/test/dapltest/common/dapl_transaction_cmd_util.c
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_Transaction_Cmd_Endian(Transaction_Cmd_t * cmd, bool to_wire)
+{
+	unsigned int i;
+
+	cmd->dapltest_version = DT_Endian32(cmd->dapltest_version);
+	cmd->num_iterations = DT_Endian32(cmd->num_iterations);
+	cmd->num_threads = DT_Endian32(cmd->num_threads);
+	cmd->eps_per_thread = DT_Endian32(cmd->eps_per_thread);
+	cmd->use_rsp = DT_Endian32(cmd->use_rsp);
+	cmd->debug = DT_Endian32(cmd->debug);
+	cmd->validate = DT_Endian32(cmd->validate);
+	cmd->ReliabilityLevel = DT_Endian32(cmd->ReliabilityLevel);
+
+	if (!to_wire) {
+		cmd->num_ops = DT_Endian32(cmd->num_ops);
+	}
+	for (i = 0; i < cmd->num_ops; i++) {
+		cmd->op[i].server_initiated =
+		    DT_Endian32(cmd->op[i].server_initiated);
+		cmd->op[i].transfer_type =
+		    DT_Endian32(cmd->op[i].transfer_type);
+		cmd->op[i].num_segs = DT_Endian32(cmd->op[i].num_segs);
+		cmd->op[i].seg_size = DT_Endian32(cmd->op[i].seg_size);
+		cmd->op[i].reap_send_on_recv =
+		    DT_Endian32(cmd->op[i].reap_send_on_recv);
+	}
+	if (to_wire) {
+		cmd->num_ops = DT_Endian32(cmd->num_ops);
+	}
+}
diff --git a/test/dapltest/include/dapl_bpool.h b/test/dapltest/include/dapl_bpool.h
new file mode 100644
index 0000000..33ba485
--- /dev/null
+++ b/test/dapltest/include/dapl_bpool.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_BPOOL_H__
+#define __DAPL_BPOOL_H__
+
+#include "dapl_proto.h"
+
+typedef struct Bpool_tag Bpool;
+/*
+ * struct Bpool
+ */
+
+struct Bpool_tag
+{
+    unsigned char  *alloc_ptr;
+    DAT_UINT32      alloc_size;
+    DAT_PZ_HANDLE   pz_handle;
+    DAT_COUNT       seg_size;
+    DAT_COUNT       num_segs;		/* num segments */
+    unsigned char  *buffer_start;	/* Start of buffer area */
+    DAT_VLEN        buffer_size;	/* Size of data buffer (rounded) */
+    DAT_VADDR	    reg_addr;		/* start of registered area */
+    DAT_VLEN        reg_size;		/* size of registered area */
+    DAT_EP_HANDLE   ep_handle;		/* EP area is registered to */
+    DAT_LMR_HANDLE  lmr_handle;		/* local access */
+    DAT_LMR_CONTEXT lmr_context;
+    DAT_LMR_TRIPLET*tripl_start;	/* local IOV */
+    DAT_BOOLEAN     enable_rdma_write;	/* remote access */
+    DAT_BOOLEAN     enable_rdma_read;
+    DAT_RMR_HANDLE  rmr_handle;
+    DAT_RMR_CONTEXT rmr_context;
+    DAT_EVD_HANDLE  rmr_evd_handle;
+};
+#endif
diff --git a/test/dapltest/include/dapl_client_info.h b/test/dapltest/include/dapl_client_info.h
new file mode 100644
index 0000000..6431f8d
--- /dev/null
+++ b/test/dapltest/include/dapl_client_info.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_CLIENT_INFO_H__
+#define __DAPL_CLIENT_INFO_H__
+
+#include "dapl_proto.h"
+
+#pragma pack (2)
+
+typedef struct
+{
+    DAT_UINT32      dapltest_version;
+    DAT_UINT32      is_little_endian;
+    DAT_UINT32      test_type;
+    DAT_UINT32      total_threads;
+} Client_Info_t;
+#pragma pack ()
+
+#endif
diff --git a/test/dapltest/include/dapl_common.h b/test/dapltest/include/dapl_common.h
new file mode 100644
index 0000000..df3e000
--- /dev/null
+++ b/test/dapltest/include/dapl_common.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_COMMON_H__
+#define __DAPL_COMMON_H__
+
+#include "dapl_proto.h"
+
+typedef enum
+{
+    RDMA_READ,
+    RDMA_WRITE,
+    SEND_RECV
+} DT_Transfer_Type;
+
+
+#pragma pack(1)
+typedef struct
+{
+    DAT_RMR_CONTEXT         rmr_context;
+    DAT_CONTEXT             mem_address;
+} RemoteMemoryInfo;
+#pragma pack()
+
+
+#endif /* __DAPL_COMMON_H__ */
diff --git a/test/dapltest/include/dapl_execute.h b/test/dapltest/include/dapl_execute.h
new file mode 100644
index 0000000..eb2d54a
--- /dev/null
+++ b/test/dapltest/include/dapl_execute.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef _DAPL_EXECUTE_H_
+#define _DAPL_EXECUTE_H_
+
+#include "dapl_proto.h"
+#include "dapl_params.h"
+
+DAT_RETURN
+DT_Execute_Test ( Params_t *params_ptr ) ;
+
+#endif
diff --git a/test/dapltest/include/dapl_fft_cmd.h b/test/dapltest/include/dapl_fft_cmd.h
new file mode 100644
index 0000000..0989a2e
--- /dev/null
+++ b/test/dapltest/include/dapl_fft_cmd.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_FFT_CMD_H__
+#define __DAPL_FFT_CMD_H__
+
+#include "dapl_proto.h"
+
+#define MAXCASES	100
+
+typedef enum
+{
+    NONE,
+    HWCONN,
+    CQMGT,
+    ENDPOINT,
+    PTAGMGT,
+    MEMMGT,
+    CONNMGT,
+    CONNMGT_CLIENT,
+    DATAXFER,
+    DATAXFER_CLIENT,
+    QUERYINFO,
+    NS,
+    ERRHAND,
+    UNSUPP,
+    STRESS,
+    STRESS_CLIENT,
+} FFT_Type_e;
+
+
+typedef struct
+{
+    FFT_Type_e		fft_type;
+    char 		device_name[256];	//-D
+    char		server_name[256];
+    bool		cases_flag[MAXCASES];
+    int 		size;
+    int 		num_iter;	//-i
+    int 		num_threads;	//-t
+    int 		num_vis;	//-v
+    DAT_QOS		ReliabilityLevel;	//-R
+} FFT_Cmd_t;
+
+#endif
diff --git a/test/dapltest/include/dapl_fft_util.h b/test/dapltest/include/dapl_fft_util.h
new file mode 100644
index 0000000..17675cf
--- /dev/null
+++ b/test/dapltest/include/dapl_fft_util.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef DAPL_FFT_UTIL_H
+#define DAPL_FFT_UTIL_H
+
+#include "dapl_proto.h"
+#include "dapl_test_data.h"
+
+#define DT_assert_dat(test_num, x)   if(x) ; \
+    else { \
+	DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \
+	DT_Tdep_PT_Printf(test_num,"Error = %d, %s\n", rc, DT_RetToString(rc)); \
+	res = 0; \
+	goto cleanup; \
+    }
+
+#define DT_assert(test_num, x)   if(x) ; \
+    else { \
+	DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \
+	res = 0; \
+	goto cleanup; \
+    }
+
+#define DT_assert_clean(test_num, x)  if(x) ; \
+    else { \
+	DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \
+	DT_Tdep_PT_Printf(test_num,"Error = %d, %s\n", rc, DT_RetToString(rc)); \
+	return 0; \
+    }
+
+typedef struct
+{
+    DAT_IA_HANDLE ia_handle;
+    DAT_PZ_HANDLE pz_handle;
+    DAT_PSP_HANDLE psp_handle;
+    DAT_EP_HANDLE ep_handle;
+    DAT_EVD_HANDLE cr_evd, conn_evd, send_evd, recv_evd;
+    DAT_EVENT event;
+    DAT_COUNT count;
+    DAT_CR_HANDLE cr_handle;
+    Bpool *bpool;
+    DAT_CR_ARRIVAL_EVENT_DATA cr_stat;
+    DAT_EVENT_NUMBER event_num;
+    DAT_IA_ADDRESS_PTR remote_netaddr;
+    Per_Test_Data_t *pt_ptr;
+    bool connected;
+} FFT_Connection_t;
+
+typedef enum
+{
+    QUERY_CNO,
+    QUERY_CR,
+    QUERY_EP,
+    QUERY_EVD,
+    QUERY_IA,
+    QUERY_LMR,
+    QUERY_RMR,
+    QUERY_PSP,
+    QUERY_RSP,
+    QUERY_PZ,
+} FFT_query_enum;
+
+typedef struct
+{
+    int	(*fun) (Params_t *params_ptr, FFT_Cmd_t* cmd);
+} FFT_Testfunc_t;
+
+#endif
+
diff --git a/test/dapltest/include/dapl_getopt.h b/test/dapltest/include/dapl_getopt.h
new file mode 100644
index 0000000..e8874b6
--- /dev/null
+++ b/test/dapltest/include/dapl_getopt.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_GETOPT_H__
+#define __DAPL_GETOPT_H__
+
+typedef struct
+{
+    int             magic;
+    char           *place;
+
+    int             opterr;
+    int             optind;
+    int             optopt;
+    char           *optarg;
+} mygetopt_t;
+/* function prototypes */
+void
+DT_mygetopt_init (mygetopt_t * opts);
+int
+DT_mygetopt_r (int argc,
+	   char *const * argv,
+	   const char *ostr,
+	   mygetopt_t * opts);
+#endif
diff --git a/test/dapltest/include/dapl_global.h b/test/dapltest/include/dapl_global.h
new file mode 100644
index 0000000..562404f
--- /dev/null
+++ b/test/dapltest/include/dapl_global.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_GLOBAL_H__
+#define __DAPL_GLOBAL_H__
+
+#include "dapl_proto.h"
+
+extern DAT_COUNT        DT_dapltest_debug;
+extern bool             DT_local_is_little_endian;
+
+#endif
diff --git a/test/dapltest/include/dapl_limit_cmd.h b/test/dapltest/include/dapl_limit_cmd.h
new file mode 100644
index 0000000..03bc773
--- /dev/null
+++ b/test/dapltest/include/dapl_limit_cmd.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_LIMIT_CMD_H__
+#define __DAPL_LIMIT_CMD_H__
+
+#include "dapl_proto.h"
+
+typedef enum
+{
+    LIM_IA,
+    LIM_PZ,
+#ifndef __KDAPLTEST__
+    LIM_CNO,
+#endif
+    LIM_EVD,
+    LIM_EP,
+    LIM_RSP,
+    LIM_PSP,
+    LIM_LMR,
+    LIM_RPOST,
+    LIM_SIZE_LMR,
+    /* add further tests here */
+
+    LIM_NUM_TESTS   /* for array size & limit checks */
+} Limit_Index;
+
+//-------------------------------------
+#pragma pack (2)
+typedef struct
+{
+    char 		device_name[256];	/* -D */
+    DAT_QOS		ReliabilityLevel;	/* -R */
+    DAT_UINT32		width;			/* -w */
+    DAT_UINT32		debug;			/* -d */
+    DAT_UINT32		maximum;		/* -m */
+    DAT_UINT32 		Test_List[ LIM_NUM_TESTS ];
+} Limit_Cmd_t;
+
+#pragma pack ()
+
+#endif
diff --git a/test/dapltest/include/dapl_mdep.h b/test/dapltest/include/dapl_mdep.h
new file mode 100644
index 0000000..72f4aec
--- /dev/null
+++ b/test/dapltest/include/dapl_mdep.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_MDEP_H__
+#define __DAPL_MDEP_H__
+
+#ifdef __KERNEL__
+#include "dapl_mdep_kernel.h"
+#else
+#include "dapl_mdep_user.h"
+#endif
+
+#endif
diff --git a/test/dapltest/include/dapl_memlist.h b/test/dapltest/include/dapl_memlist.h
new file mode 100644
index 0000000..b383610
--- /dev/null
+++ b/test/dapltest/include/dapl_memlist.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_MEMLIST_H__
+#define __DAPL_MEMLIST_H__
+
+#include "dapl_proto.h"
+
+typedef enum
+{
+    BPOOL,
+    BUFF,
+    PERTESTDATA,
+    NIC,
+    NETADDRESS,
+    TRANSACTIONTEST,
+    THREAD,
+    EPCONTEXT
+} mem_type_e;
+
+struct Mem_list_entry
+{
+    char            filename[50];
+    mem_type_e      MemType;
+    void           *mem_ptr;
+    struct Mem_list_entry *next;
+};
+
+typedef struct Mem_list_entry MemListEntry_t;
+#endif
diff --git a/test/dapltest/include/dapl_params.h b/test/dapltest/include/dapl_params.h
new file mode 100644
index 0000000..dc500b7
--- /dev/null
+++ b/test/dapltest/include/dapl_params.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_PARAMS_H__
+#define __DAPL_PARAMS_H__
+
+#include "dapl_proto.h"
+#include "dapl_server_cmd.h"
+#include "dapl_transaction_cmd.h"
+#include "dapl_performance_cmd.h"
+#include "dapl_limit_cmd.h"
+#include "dapl_quit_cmd.h"
+#include "dapl_fft_cmd.h"
+
+typedef enum
+{
+    SERVER_TEST,
+    TRANSACTION_TEST,
+    PERFORMANCE_TEST,
+    LIMIT_TEST,
+    QUIT_TEST,
+    FFT_TEST
+} test_type_e;
+
+typedef struct
+{
+    test_type_e     test_type;
+
+    union
+    {
+	Server_Cmd_t        Server_Cmd;
+	Transaction_Cmd_t   Transaction_Cmd;
+	Performance_Cmd_t   Performance_Cmd;
+	Limit_Cmd_t         Limit_Cmd;
+	Quit_Cmd_t          Quit_Cmd;
+	FFT_Cmd_t	    FFT_Cmd;
+    } u;
+
+    /* Needed here due to structure of command processing */
+    DAT_QOS         ReliabilityLevel;
+    DAT_SOCK_ADDR   server_netaddr;
+    void *	    phead;
+    bool	    local_is_little_endian;
+    bool	    debug;
+    double	    cpu_mhz;
+} Params_t;
+
+#endif
diff --git a/test/dapltest/include/dapl_performance_cmd.h b/test/dapltest/include/dapl_performance_cmd.h
new file mode 100644
index 0000000..93fb321
--- /dev/null
+++ b/test/dapltest/include/dapl_performance_cmd.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_PERFORMANCE_CMD_H__
+#define __DAPL_PERFORMANCE_CMD_H__
+
+#include "dapl_proto.h"
+
+#define NAME_SZ 256
+
+typedef enum
+{
+    BLOCKING_MODE,
+    POLLING_MODE
+} Performance_Mode_Type;
+
+#pragma pack (2)
+typedef struct
+{
+    DAT_UINT32      transfer_type;
+    DAT_UINT32      seg_size;
+    DAT_UINT32      num_segs;
+} Performance_Cmd_Op_t;
+
+typedef struct
+{
+    DAT_UINT32      		dapltest_version;
+    DAT_UINT32      		client_is_little_endian;
+    char            		server_name[NAME_SZ];	/* -s */
+    char            		dapl_name[NAME_SZ];	/* -D */
+    DAT_QOS         		qos;
+    DAT_UINT32      		debug;			/* -d */
+    Performance_Mode_Type	mode;			/* -m */
+    DAT_UINT32      		num_iterations;		/* -i */
+    DAT_UINT32      		pipeline_len;		/* -p */
+    Performance_Cmd_Op_t 	op;
+    DAT_UINT32      		use_rsp;		/* -r */
+
+} Performance_Cmd_t;
+#pragma pack ()
+
+#endif
diff --git a/test/dapltest/include/dapl_performance_stats.h b/test/dapltest/include/dapl_performance_stats.h
new file mode 100644
index 0000000..44c117c
--- /dev/null
+++ b/test/dapltest/include/dapl_performance_stats.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_STATS_H__
+#define __DAPL_STATS_H__
+
+#include "dapl_proto.h"
+
+#define DT_min(a, b)	   ((a < b) ? (a) : (b))
+#define DT_max(a, b)        ((a > b) ? (a) : (b))
+#define DT_whole(num)      ((unsigned int)(num))
+#define DT_hundredths(num) ((unsigned int)(((num) - (unsigned int)(num)) * 100))
+
+typedef struct
+{
+    unsigned int 	num;
+    DT_Mdep_TimeStamp 	total_ts;
+    DT_Mdep_TimeStamp 	max_ts;
+    DT_Mdep_TimeStamp 	min_ts;
+} Performance_Stats_Data_t;
+
+
+typedef struct
+{
+    unsigned int 		num_ops;
+    int64_t 			bytes;
+    unsigned int 		post_ctxt_switch_num;
+    unsigned int 		reap_ctxt_switch_num;
+    double			cpu_utilization;
+    DT_Mdep_TimeStamp 		time_ts;
+    Performance_Stats_Data_t 	posts_sans_ctxt;
+    Performance_Stats_Data_t 	posts_with_ctxt;
+    Performance_Stats_Data_t 	reaps_sans_ctxt;
+    Performance_Stats_Data_t 	reaps_with_ctxt;
+    Performance_Stats_Data_t	latency;
+} Performance_Stats_t;
+
+#endif
diff --git a/test/dapltest/include/dapl_performance_test.h b/test/dapltest/include/dapl_performance_test.h
new file mode 100644
index 0000000..82040a2
--- /dev/null
+++ b/test/dapltest/include/dapl_performance_test.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_PERFORMANCE_TEST_H__
+#define __DAPL_PERFORMANCE_TEST_H__
+
+#include "dapl_proto.h"
+#include "dapl_tdep.h"
+#include "dapl_common.h"
+#include "dapl_test_data.h"
+#include "dapl_performance_cmd.h"
+
+
+#define DT_PERF_SYNC_SEND_BUFFER_ID 	0
+#define DT_PERF_SYNC_RECV_BUFFER_ID  	1
+#define DT_PERF_SYNC_BUFF_SIZE       	sizeof (RemoteMemoryInfo)
+#define DT_PERF_DFLT_EVD_LENGTH		8
+
+
+typedef struct
+{
+    DT_Transfer_Type        transfer_type;
+    DAT_UINT32              num_segs;
+    DAT_UINT32              seg_size;
+    Bpool                   *bp;
+
+    /* RDMA info */
+    DAT_RMR_CONTEXT         Rdma_Context;
+    DAT_VADDR               Rdma_Address;
+} Performance_Test_Op_t;
+
+typedef struct
+{
+    DAT_EP_HANDLE           ep_handle;
+    DAT_EP_ATTR		    ep_attr;
+    DAT_CONN_QUAL           port;
+    DAT_COUNT               pipeline_len;
+    Bpool                   *bp;
+    Performance_Test_Op_t   op;
+} Performance_Ep_Context_t;
+
+typedef struct
+{
+    Per_Test_Data_t         	*pt_ptr;
+    Performance_Cmd_t           *cmd;
+    DAT_IA_ADDRESS_PTR      	remote_ia_addr;
+    DAT_BOOLEAN             	is_remote_little_endian;
+    DAT_CONN_QUAL           	base_port;
+    DAT_IA_ATTR			ia_attr;
+    DAT_IA_HANDLE           	ia_handle;
+    DAT_PZ_HANDLE           	pz_handle;
+    DAT_CNO_HANDLE          	cno_handle;
+    DAT_COUNT               	reqt_evd_length;
+    DAT_EVD_HANDLE          	reqt_evd_hdl;	/* request+rmr  */
+    DAT_COUNT               	recv_evd_length;
+    DAT_EVD_HANDLE          	recv_evd_hdl;	/* receive	*/
+    DAT_COUNT               	conn_evd_length;
+    DAT_EVD_HANDLE          	conn_evd_hdl;	/* connect	*/
+    DAT_COUNT               	creq_evd_length;
+    DAT_EVD_HANDLE          	creq_evd_hdl;	/* "" request   */
+    Performance_Ep_Context_t 	ep_context;
+} Performance_Test_t;
+
+#endif
diff --git a/test/dapltest/include/dapl_proto.h b/test/dapltest/include/dapl_proto.h
new file mode 100644
index 0000000..fb5a293
--- /dev/null
+++ b/test/dapltest/include/dapl_proto.h
@@ -0,0 +1,667 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_PROTO_H__
+#define __DAPL_PROTO_H__
+
+#ifdef __KERNEL__
+#include <dat2/kdat.h>
+#else
+#include <dat2/udat.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#endif
+
+#include "dapl_mdep.h"
+#include "dapl_tdep_print.h"
+#include "dapl_bpool.h"
+#include "dapl_client_info.h"
+#include "dapl_common.h"
+#include "dapl_client_info.h"
+#include "dapl_execute.h"
+#include "dapl_getopt.h"
+#include "dapl_global.h"
+#include "dapl_fft_cmd.h"
+#include "dapl_fft_util.h"
+#include "dapl_limit_cmd.h"
+#include "dapl_memlist.h"
+#include "dapl_params.h"
+#include "dapl_performance_stats.h"
+#include "dapl_performance_test.h"
+#include "dapl_quit_cmd.h"
+#include "dapl_server_info.h"
+#include "dapl_tdep.h"
+#include "dapl_test_data.h"
+#include "dapl_transaction_cmd.h"
+#include "dapl_transaction_test.h"
+#include "dapl_transaction_stats.h"
+#include "dapl_version.h"
+
+#define DAT_ERROR(Type,SubType) ((DAT_RETURN)(DAT_CLASS_ERROR | Type | SubType))
+
+/*
+ * Prototypes
+ */
+
+/* dapl_bpool.c */
+Bpool *         DT_BpoolAlloc (Per_Test_Data_t * pt_ptr,
+			       DT_Tdep_Print_Head* phead,
+			       DAT_IA_HANDLE ia_handle,
+			       DAT_PZ_HANDLE pz_handle,
+			       DAT_EP_HANDLE ep_handle,
+			       DAT_EVD_HANDLE rmr_evd_handle,
+			       DAT_COUNT seg_size,
+			       DAT_COUNT num_segs,
+			       DAT_COUNT alignment,
+			       DAT_BOOLEAN enable_rdma_write,
+			       DAT_BOOLEAN enable_rdma_read);
+
+bool            DT_Bpool_Destroy (Per_Test_Data_t * pt_ptr,
+				  DT_Tdep_Print_Head *phead,
+				     Bpool * bpool_ptr);
+
+unsigned char   *DT_Bpool_GetBuffer (Bpool * bpool_ptr, int index);
+DAT_COUNT        DT_Bpool_GetBuffSize (Bpool * bpool_ptr, int index);
+DAT_LMR_TRIPLET *DT_Bpool_GetIOV (Bpool * bpool_ptr, int index);
+DAT_LMR_CONTEXT  DT_Bpool_GetLMR (Bpool * bpool_ptr, int index);
+DAT_RMR_CONTEXT  DT_Bpool_GetRMR (Bpool * bpool_ptr, int index);
+
+void            DT_Bpool_print (DT_Tdep_Print_Head* phead, Bpool *bpool_ptr);
+
+/* dapl_cnxn.c */
+int             get_ep_connection_state (DT_Tdep_Print_Head* phead, 
+				 	 DAT_EP_HANDLE ep_handle);
+
+/* dapl_client.c */
+DAT_RETURN      DT_cs_Client (Params_t * params_ptr,
+			      char *dapl_name,
+			      char *server_name,
+			      DAT_UINT32 total_threads);
+
+/* dapl_client_info.c */
+void            DT_Client_Info_Endian (Client_Info_t * client_info);
+
+void            DT_Client_Info_Print (DT_Tdep_Print_Head *phead, 
+				      Client_Info_t * client_info);
+
+/* dapl_transaction_stats.c */
+void            DT_init_transaction_stats (Transaction_Stats_t * transaction_stats,
+					 unsigned int nums);
+void            DT_transaction_stats_set_ready (DT_Tdep_Print_Head* phead, 
+					Transaction_Stats_t* transaction_stats);
+
+void            DT_transaction_stats2_set_ready (DT_Tdep_Print_Head* phead, 
+					Transaction_Stats_t* transaction_stats);
+
+bool            DT_transaction_stats_wait_for_all (DT_Tdep_Print_Head* phead,
+					Transaction_Stats_t* transaction_stats);
+
+bool            DT_transaction_stats2_wait_for_all (DT_Tdep_Print_Head* phead,
+					Transaction_Stats_t* transaction_stats);
+
+void            DT_update_transaction_stats (Transaction_Stats_t * transaction_stats,
+					   unsigned int num_ops,
+					   unsigned int time_ms,
+					   unsigned int bytes_send,
+					   unsigned int bytes_recv,
+					   unsigned int bytes_rdma_read,
+					   unsigned int bytes_rdma_write);
+
+void            DT_print_transaction_stats (DT_Tdep_Print_Head* phead, 
+					Transaction_Stats_t* transaction_stats,
+					  unsigned int num_threads,
+					  unsigned int num_EPs);
+
+/* dapl_endian.c */
+void            DT_Endian_Init (void);
+DAT_UINT32      DT_Endian32 (DAT_UINT32 val);
+DAT_UINT64      DT_Endian64 (DAT_UINT64 val);
+DAT_UINT32      DT_EndianMemHandle (DAT_UINT32 val);
+DAT_UINT64      DT_EndianMemAddress (DAT_UINT64 val);
+
+/* dapl_getopt.c */
+void            DT_mygetopt_init (mygetopt_t * opts);
+
+int             DT_mygetopt_r (int argc,
+			       char *const * argv,
+			       const char *ostr,
+			       mygetopt_t * opts);
+
+/* dapl_main.c */
+int             main (int argc, char *argv[]);
+
+int             dapltest (int argc, char *argv[]);
+
+void            Dapltest_Main_Usage (void);
+
+/* dapl_mdep.c */
+void            DT_Mdep_Init (void);
+void            DT_Mdep_End (void);
+bool            DT_Mdep_GetDefaultDeviceName (char *dapl_name);
+void            DT_Mdep_Sleep (int msec);
+void 		DT_Mdep_Schedule (void);
+bool		DT_Mdep_GetCpuStat (DT_CpuStat *sys_stat);
+unsigned long   DT_Mdep_GetTime (void);
+double          DT_Mdep_GetCpuMhz (void);
+unsigned long   DT_Mdep_GetContextSwitchNum (void);
+void           *DT_Mdep_Malloc (size_t l_);
+void            DT_Mdep_Free (void *a_);
+bool            DT_Mdep_LockInit (DT_Mdep_LockType * lock_ptr);
+void            DT_Mdep_LockDestroy (DT_Mdep_LockType * lock_ptr);
+void            DT_Mdep_Lock (DT_Mdep_LockType * lock_ptr);
+void            DT_Mdep_Unlock (DT_Mdep_LockType * lock_ptr);
+void            DT_Mdep_Thread_Init_Attributes (Thread * thread_ptr);
+void            DT_Mdep_Thread_Destroy_Attributes (Thread * thread_ptr);
+bool            DT_Mdep_Thread_Start (Thread * thread_ptr);
+
+void 			DT_Mdep_Thread_Detach (DT_Mdep_ThreadHandleType thread_id);
+DT_Mdep_ThreadHandleType DT_Mdep_Thread_SELF ( void );
+void 			DT_Mdep_Thread_EXIT ( void * thread_handle );
+int				DT_Mdep_wait_object_init ( IN DT_WAIT_OBJECT *wait_obj);
+int 			DT_Mdep_wait_object_wait (
+						    IN	DT_WAIT_OBJECT *wait_obj,
+						    IN  int timeout_val);
+int 			DT_Mdep_wait_object_wakeup ( IN	DT_WAIT_OBJECT *wait_obj);
+int 			DT_Mdep_wait_object_destroy ( IN DT_WAIT_OBJECT *wait_obj);
+
+
+DT_Mdep_Thread_Start_Routine_Return_Type
+		DT_Mdep_Thread_Start_Routine (void *thread_handle);
+
+/* dapl_memlist.c */
+void            DT_MemListInit (Per_Test_Data_t * pt_ptr);
+void           *DT_MemListAlloc (Per_Test_Data_t * pt_ptr,
+						 char *file,
+						 mem_type_e t,
+						 int size);
+void            DT_MemListFree (Per_Test_Data_t * pt_ptr,
+						void *ptr);
+void            DT_PrintMemList (Per_Test_Data_t * pt_ptr);
+
+/* dapl_netaddr.c */
+bool            DT_NetAddrLookupHostAddress (DAT_IA_ADDRESS_PTR to_netaddr,
+					     char *hostname);
+
+DAT_IA_ADDRESS_PTR DT_NetAddrAlloc (Per_Test_Data_t * pt_ptr);
+
+void            DT_NetAddrFree (Per_Test_Data_t * pt_ptr,
+				DAT_IA_ADDRESS_PTR netaddr);
+
+/* dapl_params.c */
+bool            DT_Params_Parse (int argc,
+				char *argv[],
+				Params_t * params_ptr);
+
+/* dapl_performance_cmd.c */
+const char *    DT_PerformanceModeToString (Performance_Mode_Type mode);
+
+bool            DT_Performance_Cmd_Init (Performance_Cmd_t * cmd);
+
+bool            DT_Performance_Cmd_Parse (Performance_Cmd_t * cmd,
+					  int my_argc,
+					  char **my_argv,
+					  mygetopt_t * opts);
+
+void            DT_Performance_Cmd_Print (Performance_Cmd_t * cmd);
+void            DT_Performance_Cmd_PT_Print (DT_Tdep_Print_Head* phead, 
+					     Performance_Cmd_t * cmd);
+
+void            DT_Performance_Cmd_Endian (Performance_Cmd_t * cmd);
+
+/* dapl_performance_client.c */
+DAT_RETURN      DT_Performance_Test_Client ( Params_t	*params_ptr,
+					       Per_Test_Data_t * pt_ptr,
+					       DAT_IA_HANDLE * ia_handle,
+					       DAT_IA_ADDRESS_PTR remote);
+
+bool            DT_Performance_Test_Client_Connect (
+	DT_Tdep_Print_Head *phead,
+	Performance_Test_t * test_ptr);
+
+bool            DT_Performance_Test_Client_Exchange (
+	Params_t	   *params_ptr,
+	DT_Tdep_Print_Head *phead,
+					Performance_Test_t *test_ptr );
+
+/* dapl_performance_server.c */
+void            DT_Performance_Test_Server (void * pt_ptr);
+
+bool            DT_Performance_Test_Server_Connect (
+	DT_Tdep_Print_Head *phead,
+	Performance_Test_t * test_ptr);
+
+bool            DT_Performance_Test_Server_Exchange (
+	DT_Tdep_Print_Head *phead,
+	Performance_Test_t *test_ptr);
+
+/* dapl_performance_util.c */
+bool            DT_Performance_Test_Create (Per_Test_Data_t * pt_ptr,
+					   DAT_IA_HANDLE * ia_handle,
+					   DAT_IA_ADDRESS_PTR remote_ia_addr,
+					   DAT_BOOLEAN is_server,
+					   DAT_BOOLEAN is_remote_little_endian,
+					   Performance_Test_t **perf_test);
+
+void            DT_Performance_Test_Destroy (Per_Test_Data_t	* pt_ptr,
+					    Performance_Test_t *test_ptr,
+					    DAT_BOOLEAN is_server);
+
+bool            DT_performance_post_rdma_op (Performance_Ep_Context_t *ep_context,
+					    DAT_EVD_HANDLE 	reqt_evd_hdl,
+					    Performance_Stats_t *stats);
+
+unsigned int   DT_performance_reap (DT_Tdep_Print_Head* phead, 
+				    DAT_EVD_HANDLE evd_handle,
+				    Performance_Mode_Type mode,
+				    Performance_Stats_t *stats);
+
+unsigned int   DT_performance_wait (DT_Tdep_Print_Head* phead, 
+				    DAT_EVD_HANDLE evd_handle,
+				    Performance_Stats_t *stats);
+
+unsigned int   DT_performance_poll (DT_Tdep_Print_Head* phead, 
+				    DAT_EVD_HANDLE evd_handle,
+				    Performance_Stats_t *stats);
+
+/* dapl_performance_stats.c */
+void            DT_performance_stats_init (Performance_Stats_t * stats);
+
+void            DT_performance_stats_record_post (Performance_Stats_t *stats,
+						 unsigned long ctxt_switch_num,
+						 DT_Mdep_TimeStamp ts);
+
+void            DT_performance_stats_record_reap (Performance_Stats_t *stats,
+						 unsigned long ctxt_switch_num,
+						 DT_Mdep_TimeStamp ts);
+
+void            DT_performance_stats_record_latency (Performance_Stats_t *stats,
+						    DT_Mdep_TimeStamp ts);
+
+void            DT_performance_stats_data_combine (Performance_Stats_Data_t * dest,
+						  Performance_Stats_Data_t * src_a,
+						  Performance_Stats_Data_t * src_b);
+
+void            DT_performance_stats_combine (Performance_Stats_t * dest,
+					     Performance_Stats_t * src_a,
+					     Performance_Stats_t * src_b);
+
+double 		DT_performance_stats_data_print (DT_Tdep_Print_Head* phead,
+						Performance_Stats_Data_t* data,
+						double cpu_mhz);
+
+void            DT_performance_stats_print (Params_t * params_ptr,
+					   DT_Tdep_Print_Head* phead, 
+					   Performance_Stats_t * stats,
+					   Performance_Cmd_t * cmd,
+					   Performance_Test_t * test);
+
+
+/* dapl_server.c */
+void            DT_cs_Server (Params_t * params_ptr);
+
+/* dapl_server_cmd.c */
+void            DT_Server_Cmd_Init (Server_Cmd_t * Server_Cmd);
+
+bool            DT_Server_Cmd_Parse (Server_Cmd_t * Server_Cmd,
+						     int my_argc,
+						     char **my_argv,
+						     mygetopt_t * opts);
+
+void            DT_Server_Cmd_Print (Server_Cmd_t * Server_Cmd);
+void            DT_Server_Cmd_PT_Print (DT_Tdep_Print_Head* phead, 
+					Server_Cmd_t * Server_Cmd);
+
+void            DT_Server_Cmd_Usage (void);
+
+/* dapl_server_info.c */
+void            DT_Server_Info_Endian (Server_Info_t * server_info);
+
+void            DT_Server_Info_Print (DT_Tdep_Print_Head* phead, 
+					Server_Info_t * server_info);
+
+/* dapl_test_data.c */
+Per_Test_Data_t *DT_Alloc_Per_Test_Data (DT_Tdep_Print_Head* phead);
+
+void 		DT_Free_Per_Test_Data (Per_Test_Data_t * pt_ptr);
+
+/* dapl_test_util.c */
+DAT_BOOLEAN     DT_query (Per_Test_Data_t *pt_ptr,
+			     DAT_IA_HANDLE   ia_handle,
+			     DAT_EP_HANDLE   ep_handle);
+
+DAT_BOOLEAN     DT_post_recv_buffer (DT_Tdep_Print_Head* phead, 
+    				       DAT_EP_HANDLE ep_handle,
+					Bpool * bp,
+					int index,
+					int size);
+
+DAT_BOOLEAN     DT_post_send_buffer (DT_Tdep_Print_Head* phead, 
+    				       DAT_EP_HANDLE ep_handle,
+					Bpool * bp,
+					int index,
+					int size);
+
+bool            DT_conn_event_wait (DT_Tdep_Print_Head* phead,  
+    				       DAT_EP_HANDLE ep_handle,
+				       DAT_EVD_HANDLE evd_handle,
+				       DAT_EVENT_NUMBER *event_number);
+
+bool		DT_disco_event_wait ( DT_Tdep_Print_Head* phead, 
+				    DAT_EVD_HANDLE evd_handle,
+				      DAT_EP_HANDLE  *ep_handle );
+
+bool            DT_cr_event_wait (DT_Tdep_Print_Head* phead, 
+				DAT_EVD_HANDLE evd_handle,
+				     DAT_CR_ARRIVAL_EVENT_DATA *cr_stat_p);
+
+bool            DT_dto_event_reap (DT_Tdep_Print_Head* phead, 
+				DAT_EVD_HANDLE evd_handle,
+				      bool poll,
+				      DAT_DTO_COMPLETION_EVENT_DATA *dtop);
+
+bool            DT_dto_event_wait (DT_Tdep_Print_Head* phead, 
+				DAT_EVD_HANDLE evd_handle,
+				      DAT_DTO_COMPLETION_EVENT_DATA *dtop);
+
+bool            DT_dto_event_poll (DT_Tdep_Print_Head* phead, 
+				DAT_EVD_HANDLE evd_handle,
+				      DAT_DTO_COMPLETION_EVENT_DATA *dtop);
+
+bool            DT_rmr_event_wait (DT_Tdep_Print_Head* phead, 
+				DAT_EVD_HANDLE evd_handle,
+				DAT_RMR_BIND_COMPLETION_EVENT_DATA *rmr_ptr);
+
+bool            DT_dto_check ( DT_Tdep_Print_Head* phead, 
+				  DAT_DTO_COMPLETION_EVENT_DATA *dto_p,
+				  DAT_EP_HANDLE   ep_expected,
+				  DAT_COUNT       len_expected,
+				  DAT_DTO_COOKIE  cookie_expected,
+				  char            *message);
+
+bool            DT_rmr_check ( DT_Tdep_Print_Head* phead, 
+				  DAT_RMR_BIND_COMPLETION_EVENT_DATA*rmr_p,
+				  DAT_RMR_HANDLE  rmr_expected,
+				  DAT_PVOID       cookie_expected,
+				  char            *message);
+
+bool            DT_cr_check (DT_Tdep_Print_Head* phead, 
+				DAT_CR_ARRIVAL_EVENT_DATA *cr_stat_p,
+				DAT_PSP_HANDLE psp_handle_expected,
+				DAT_CONN_QUAL  port_expected,
+				DAT_CR_HANDLE *cr_handlep,
+				char          *message);
+
+/* dapl_thread.c */
+void            DT_Thread_Init (Per_Test_Data_t * pt_ptr);
+
+void            DT_Thread_End (Per_Test_Data_t * pt_ptr);
+
+Thread         *DT_Thread_Create (Per_Test_Data_t * pt_ptr,
+				  void (*fn) (void *),
+				  void *param,
+				  unsigned int stacksize);
+
+void            DT_Thread_Destroy (Thread * thread_ptr,
+				    Per_Test_Data_t * pt_ptr);
+
+bool            DT_Thread_Start (Thread * thread_ptr);
+
+/* dapl_quit_cmd.c */
+void            DT_Quit_Cmd_Init (Quit_Cmd_t * cmd);
+
+bool            DT_Quit_Cmd_Parse (Quit_Cmd_t * cmd,
+				   int my_argc,
+				   char **my_argv,
+				   mygetopt_t * opts);
+
+bool            DT_Quit_Cmd_Validate (Quit_Cmd_t * cmd);
+
+void            DT_Quit_Cmd_Endian (Quit_Cmd_t * cmd,
+				    bool to_wire);
+
+void            DT_Quit_Cmd_Print (Quit_Cmd_t * cmd);
+void            DT_Quit_Cmd_PT_Print (DT_Tdep_Print_Head *phead, Quit_Cmd_t * cmd);
+
+void            DT_Quit_Cmd_Usage (void);
+
+/* dapl_transaction_cmd.c */
+void            DT_Transaction_Cmd_Init (Transaction_Cmd_t * cmd);
+
+bool            DT_Transaction_Cmd_Parse (Transaction_Cmd_t * cmd,
+					  int my_argc,
+					  char **my_argv,
+					  mygetopt_t * opts);
+
+void            DT_Transaction_Cmd_Print (Transaction_Cmd_t * cmd);
+void            DT_Transaction_Cmd_PT_Print (DT_Tdep_Print_Head* phead, 
+					    Transaction_Cmd_t * cmd);
+
+void            DT_Transaction_Cmd_Endian (Transaction_Cmd_t * cmd,
+					   bool to_wire);
+/* dapl_transaction_test.c */
+DAT_RETURN      DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr,
+					    DAT_IA_HANDLE ia_handle,
+					    DAT_IA_ADDRESS_PTR remote);
+
+void            DT_Transaction_Test_Server (void *params);
+
+bool            DT_Transaction_Create_Test (Per_Test_Data_t * pt_ptr,
+					    DAT_IA_HANDLE * ia_handle,
+					    DAT_BOOLEAN is_server,
+					    unsigned int port_num,
+					    DAT_BOOLEAN remote_is_little_endian,
+					    DAT_IA_ADDRESS_PTR remote_ia_addr);
+
+void            DT_Transaction_Main (void *param);
+bool            DT_Transaction_Run (DT_Tdep_Print_Head* phead, 
+						 Transaction_Test_t * test_ptr);
+void            DT_Transaction_Validation_Fill (DT_Tdep_Print_Head* phead, 
+						 Transaction_Test_t * test_ptr,
+						unsigned int iteration);
+bool            DT_Transaction_Validation_Check (DT_Tdep_Print_Head* phead, 
+						 Transaction_Test_t * test_ptr,
+						 int iteration);
+void            DT_Print_Transaction_Test (DT_Tdep_Print_Head* phead, 
+					    Transaction_Test_t* test_ptr);
+void            DT_Print_Transaction_Stats (DT_Tdep_Print_Head* phead, 
+					    Transaction_Test_t* test_ptr);
+
+/* dapl_transaction_util.c */
+bool            DT_handle_post_recv_buf (DT_Tdep_Print_Head* phead, 
+					Ep_Context_t * ep_context,
+					      unsigned int num_eps,
+					      int op_indx);
+
+bool            DT_handle_send_op (DT_Tdep_Print_Head* phead, 
+					Ep_Context_t * ep_context,
+					unsigned int num_eps,
+					int op_indx,
+					bool poll);
+
+bool            DT_handle_recv_op (DT_Tdep_Print_Head* phead, 
+					Ep_Context_t * ep_context,
+					unsigned int num_eps,
+					int op_indx,
+					bool poll,
+					bool repost_recv);
+
+bool            DT_handle_rdma_op (DT_Tdep_Print_Head* phead, 
+					Ep_Context_t * ep_context,
+					unsigned int num_eps,
+					DT_Transfer_Type opcode,
+					int op_indx,
+					bool poll);
+
+bool            DT_check_params (Per_Test_Data_t *pt_ptr,
+				 char *module);
+
+void        	DT_Test_Error (void);
+
+/* dapl_util.c */
+const char      *DT_RetToString (DAT_RETURN ret_value);
+
+const char      *DT_TransferTypeToString (DT_Transfer_Type type);
+
+const char      *DT_AsyncErr2Str (DAT_EVENT_NUMBER error_code);
+
+const char      *DT_EventToSTr (DAT_EVENT_NUMBER event_code);
+
+const char      *DT_State2Str (DAT_EP_STATE state_code);
+
+DAT_QOS         DT_ParseQoS (char *arg);
+
+unsigned char   *DT_AlignPtr (void * val, DAT_COUNT align);
+
+DAT_COUNT       DT_RoundSize (DAT_COUNT val, DAT_COUNT align);
+
+/* dapl_limit_cmd.c */
+void	    DT_Limit_Cmd_Init (	Limit_Cmd_t * cmd);
+
+bool	    DT_Limit_Cmd_Parse ( Limit_Cmd_t * cmd,
+					int my_argc,
+					char **my_argv,
+					mygetopt_t * opts);
+
+void	    DT_Limit_Cmd_Usage (void);
+
+/* dapl_limit.c */
+DAT_RETURN  DT_cs_Limit (Params_t *params, Limit_Cmd_t * cmd);
+
+/* dapl_fft_cmd.c */
+void	    DT_FFT_Cmd_Init ( FFT_Cmd_t * cmd);
+
+bool	    DT_FFT_Cmd_Parse ( FFT_Cmd_t * cmd,
+					int my_argc,
+					char **my_argv,
+					mygetopt_t * opts);
+
+void	    DT_FFT_Cmd_Usage (void);
+
+/* dapl_fft_test.c */
+DAT_RETURN  DT_cs_FFT (Params_t *params, FFT_Cmd_t * cmd);
+
+/* dapl_fft_hwconn.c */
+void	    DT_hwconn_test (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case5 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case6 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_hwconn_case7 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+
+/* dapl_fft_endpoint.c */
+void	    DT_endpoint_test (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_endpoint_generic (Params_t *params_ptr, FFT_Cmd_t *cmd,
+				 bool destroy_pz_early);
+int	    DT_endpoint_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_endpoint_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_endpoint_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_endpoint_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_endpoint_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+
+/* dapl_fft_pz.c */
+void	    DT_pz_test (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_pz_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_pz_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_pz_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_pz_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_pz_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_pz_case5 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_pz_case6 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+
+/* dapl_fft_util.c */
+void	    DT_assert_fail (DT_Tdep_Print_Head* phead, 
+			    char *exp, 
+			    char *file, 
+			    char *baseFile, 
+			    int line);
+int	    DT_ia_open (DAT_NAME_PTR dev_name, DAT_IA_HANDLE *ia_handle);
+int	    DT_ep_create (Params_t *params_ptr,
+			  DAT_IA_HANDLE ia_handle, 
+			  DAT_PZ_HANDLE pz_handle,
+			  DAT_EVD_HANDLE *cr_evd,
+			  DAT_EVD_HANDLE *conn_evd, 
+			  DAT_EVD_HANDLE *send_evd,
+			  DAT_EVD_HANDLE *recv_evd, 
+			  DAT_EP_HANDLE *ep_handle);
+void	    DT_fft_init_conn_struct (FFT_Connection_t *conn);
+void	    DT_fft_init_client (Params_t *params_ptr,
+				FFT_Cmd_t *cmd, 
+				FFT_Connection_t *conn);
+int	    DT_fft_destroy_conn_struct (Params_t *params_ptr, FFT_Connection_t *conn);
+void	    DT_fft_init_server (Params_t *params_ptr, FFT_Cmd_t *cmd, 
+				FFT_Connection_t *conn);
+void	    DT_fft_listen (Params_t *params_ptr, FFT_Connection_t *conn);
+int	    DT_fft_connect (Params_t *params_ptr, FFT_Connection_t *conn);
+
+/* dapl_fft_connmgt.c */
+int	    DT_connmgt_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_connmgt_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+void	    DT_connmgt_test (Params_t *params_ptr, FFT_Cmd_t *cmd);
+
+/* dapl_fft_mem.c */
+int	    DT_mem_generic (Params_t *params_ptr, FFT_Cmd_t *cmd, int flag);
+int	    DT_mem_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_mem_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_mem_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_mem_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_mem_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+void	    DT_mem_test (Params_t *params_ptr, FFT_Cmd_t *cmd);
+
+/* dapl_fft_queryinfo.c */
+int	    DT_queryinfo_basic (Params_t *params_ptr, FFT_Cmd_t *cmd,
+				FFT_query_enum object_to_query,
+				DAT_RETURN result_wanted);
+int	    DT_queryinfo_case0 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case1 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case2 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case3 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case4 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case5 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case6 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case7 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case8 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case9 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case10 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case11 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case12 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case13 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case14 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case15 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case16 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+int	    DT_queryinfo_case17 (Params_t *params_ptr, FFT_Cmd_t *cmd);
+void	    DT_queryinfo_test (Params_t *params_ptr, FFT_Cmd_t *cmd);
+
+#endif  /* __DAPL_PROTO_H__ */
diff --git a/test/dapltest/include/dapl_quit_cmd.h b/test/dapltest/include/dapl_quit_cmd.h
new file mode 100644
index 0000000..8aba24e
--- /dev/null
+++ b/test/dapltest/include/dapl_quit_cmd.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_QUIT_CMD_H__
+#define __DAPL_QUIT_CMD_H__
+
+#pragma pack (2)
+typedef struct
+{
+    char        server_name[256];   /* -s */
+    char        device_name[256];   /* -D */
+    DAT_UINT32  debug;		    /* -d */
+    DAT_QOS     ReliabilityLevel;   /* -R */
+} Quit_Cmd_t;
+#pragma pack ()
+
+#endif
diff --git a/test/dapltest/include/dapl_server_cmd.h b/test/dapltest/include/dapl_server_cmd.h
new file mode 100644
index 0000000..244103a
--- /dev/null
+++ b/test/dapltest/include/dapl_server_cmd.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_SERVER_CMD_H__
+#define __DAPL_SERVER_CMD_H__
+
+#pragma pack (2)
+
+typedef struct
+{
+    bool            debug;		/* -d */
+    char            dapl_name[256];	/* -D device name */
+    DAT_QOS         ReliabilityLevel;	/* -R */
+} Server_Cmd_t;
+#pragma pack ()
+
+#endif
diff --git a/test/dapltest/include/dapl_server_info.h b/test/dapltest/include/dapl_server_info.h
new file mode 100644
index 0000000..de038c5
--- /dev/null
+++ b/test/dapltest/include/dapl_server_info.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_SERVER_INFO_H__
+#define __DAPL_SERVER_INFO_H__
+
+#include "dapl_proto.h"
+
+#pragma pack (2)
+
+struct started_server
+{
+    char            devicename[80];
+    struct started_server *next;
+};
+
+typedef struct started_server Started_server_t;
+
+extern Started_server_t *DT_started_server_list;
+
+#define SERVER_PORT_NUMBER ((DAT_CONN_QUAL)0xB0de)
+
+typedef struct
+{
+    DAT_UINT32      dapltest_version;
+    DAT_UINT32      is_little_endian;
+    DAT_UINT32      first_port_number;
+} Server_Info_t;
+#pragma pack ()
+
+#endif
diff --git a/test/dapltest/include/dapl_tdep.h b/test/dapltest/include/dapl_tdep.h
new file mode 100644
index 0000000..ccddce5
--- /dev/null
+++ b/test/dapltest/include/dapl_tdep.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef _DAPL_TDEP_H_
+#define _DAPL_TDEP_H_
+
+#include "dapl_proto.h"
+
+#ifdef __KDAPL__
+typedef DAT_HANDLE      DAT_CNO_HANDLE;
+#endif
+
+/* function prototypes */
+void
+DT_Tdep_Init ( void ) ;
+
+void
+DT_Tdep_End ( void ) ;
+
+DAT_RETURN
+DT_Tdep_Execute_Test ( Params_t *params_ptr ) ;
+
+DAT_RETURN
+DT_Tdep_lmr_create (DAT_IA_HANDLE		ia_handle,
+		    DAT_MEM_TYPE		mem_type,
+		    DAT_REGION_DESCRIPTION	region,
+		    DAT_VLEN			len,
+		    DAT_PZ_HANDLE		pz_handle,
+		    DAT_MEM_PRIV_FLAGS		priv_flag,
+		    DAT_LMR_HANDLE		*lmr_handle_ptr,
+		    DAT_LMR_CONTEXT		*lmr_context_ptr,
+		    DAT_RMR_CONTEXT		*rmr_context_ptr,
+		    DAT_VLEN			*reg_size_ptr,
+		    DAT_VADDR			*reg_addr_ptr);
+
+DAT_RETURN
+DT_Tdep_evd_create (DAT_IA_HANDLE	ia_handle,
+		    DAT_COUNT		evd_min_qlen,
+		    DAT_CNO_HANDLE	cno_handle,
+		    DAT_EVD_FLAGS	evd_flags,
+		    DAT_EVD_HANDLE 	*evd_handle_ptr);
+
+DAT_RETURN
+DT_Tdep_evd_free (DAT_EVD_HANDLE 	evd_handle);
+
+DAT_RETURN
+DT_Tdep_evd_wait (DAT_EVD_HANDLE 	evd_handle,
+		  DAT_TIMEOUT    	timeout,
+		  DAT_EVENT      	*event);
+DAT_RETURN
+DT_Tdep_evd_dequeue (DAT_EVD_HANDLE	evd_handle,
+		     DAT_EVENT		*event);
+
+#endif
diff --git a/test/dapltest/include/dapl_tdep_print.h b/test/dapltest/include/dapl_tdep_print.h
new file mode 100644
index 0000000..0a1a1b0
--- /dev/null
+++ b/test/dapltest/include/dapl_tdep_print.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef _DAPL_TDEP_PRINT_H_
+#define _DAPL_TDEP_PRINT_H_
+
+#define DT_Tdep_PT_Debug(N, _X_) \
+do { \
+      if (DT_dapltest_debug >= (N)) \
+        { \
+          DT_Tdep_PT_Printf _X_; \
+        } \
+} while (0)
+
+#ifdef __KERNEL__
+typedef struct Tdep_Print_Entry_Tag
+{
+    struct Tdep_Print_Entry_Tag *next;
+    char                         buffer[PRINT_MAX];
+} Tdep_Print_Entry;
+
+typedef struct DT_Tdep_Print_Head_Tag
+{
+    int			 	   instance;
+    struct DT_Tdep_Print_Head_Tag *next;
+    Tdep_Print_Entry    	   *head;
+    Tdep_Print_Entry    	   *tail;
+    DT_Mdep_LockType       	   lock;
+    DT_WAIT_OBJECT       	   wait_object;
+} DT_Tdep_Print_Head;
+
+
+void DT_Tdep_PT_Printf (DT_Tdep_Print_Head *phead, const char * fmt, ...);
+
+#else
+
+typedef void * DT_Tdep_Print_Head;
+void DT_Tdep_PT_Printf (DT_Tdep_Print_Head *phead, const char * fmt, ...);
+
+#endif
+#endif
diff --git a/test/dapltest/include/dapl_test_data.h b/test/dapltest/include/dapl_test_data.h
new file mode 100644
index 0000000..4ac0020
--- /dev/null
+++ b/test/dapltest/include/dapl_test_data.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_TEST_DATA_H__
+#define __DAPL_TEST_DATA_H__
+
+#include "dapl_proto.h"
+#include "dapl_bpool.h"
+#include "dapl_client_info.h"
+#include "dapl_transaction_stats.h"
+#include "dapl_memlist.h"
+#include "dapl_params.h"
+#include "dapl_server_info.h"
+
+/* This lock allows the client side to run
+ * in a shell script loop without breaking
+ * connections.  Remove it and due to timing
+ * problems on the server side occasionally
+ * the server will reject connections.
+ */
+extern	 	DT_Mdep_LockType    g_PerfTestLock;
+
+/*
+ * check memory leaking extern int              alloc_count ; extern
+ * DT_Mdep_LockType        Alloc_Count_Lock;
+ */
+
+typedef struct
+{
+    int             	NextPortNumber;
+    int             	num_clients;
+    DT_Mdep_LockType   	num_clients_lock;
+    DAT_IA_HANDLE   	ia_handle;
+    DAT_PZ_HANDLE   	pz_handle;
+    DAT_EVD_HANDLE  	recv_evd_hdl;
+    DAT_EVD_HANDLE  	reqt_evd_hdl;
+    DAT_EVD_HANDLE  	conn_evd_hdl;
+    DAT_EVD_HANDLE  	creq_evd_hdl;
+    DAT_EVD_HANDLE  	async_evd_hdl;
+    DAT_EVD_HANDLE  	rmr_evd_hdl;
+    DAT_EP_HANDLE   	ep_handle;
+    DAT_PSP_HANDLE  	psp_handle;
+    Bpool          	*bpool;
+} Per_Server_Data_t;
+
+typedef struct
+{
+    DT_Mdep_LockType   	MemListLock;
+    MemListEntry_t	*MemListHead;
+
+    DT_Mdep_LockType  	Thread_counter_lock;
+    int             	Thread_counter;
+    Thread         	*thread;
+
+    bool            	local_is_server;
+    Server_Info_t   	Server_Info;
+    Client_Info_t   	Client_Info;
+    Params_t        	Params;
+    DAT_IA_ATTR         ia_attr;
+    DAT_PROVIDER_ATTR   provider_attr;
+    DAT_EP_ATTR		ep_attr;
+    Per_Server_Data_t   *ps_ptr;
+    Transaction_Stats_t Client_Stats;
+
+    /* synchronize the server with the server's spawned test thread.
+     * That test thread uses a PSP that only one test at a time can
+     * use.  If we don't synchronize access between the teardown and
+     * creation of that PSP then the client will fail to connect
+     * randomly, a symptom that the server is not coordinated with
+     * its test threads.  Remove this at your own peril, or if you
+     * really want your test client to experience rejection on a
+     * random but regular basis.
+     */
+    DT_WAIT_OBJECT	synch_wait_object;
+    int             	Countdown_Counter;
+
+} Per_Test_Data_t;
+
+#endif
diff --git a/test/dapltest/include/dapl_transaction_cmd.h b/test/dapltest/include/dapl_transaction_cmd.h
new file mode 100644
index 0000000..afd59c0
--- /dev/null
+++ b/test/dapltest/include/dapl_transaction_cmd.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_TRANSACTION_CMD_H__
+#define __DAPL_TRANSACTION_CMD_H__
+
+#include "dapl_proto.h"
+
+#define MAX_OPS 100
+#define NAME_SZ 256
+
+#pragma pack (2)
+typedef struct
+{
+    DAT_UINT32      server_initiated;
+    DAT_UINT32      transfer_type;
+    DAT_UINT32      num_segs;
+    DAT_UINT32      seg_size;
+    DAT_UINT32      reap_send_on_recv;
+} Transaction_Cmd_Op_t;
+
+typedef struct
+{
+    DAT_UINT32      dapltest_version;
+    DAT_UINT32      client_is_little_endian;
+    char            server_name[NAME_SZ];   /* -s */
+    DAT_UINT32      num_iterations;	/* -i */
+    DAT_UINT32      num_threads;	/* -t */
+    DAT_UINT32      eps_per_thread;	/* -w */
+    DAT_UINT32      use_cno;		/* NOT USED - remove and bump version*/
+    DAT_UINT32      use_rsp;		/* -r */
+    DAT_UINT32      debug;		/* -d */
+    DAT_UINT32      validate;		/* -V */
+    DAT_UINT32      poll;		/* -P */
+    char            dapl_name[NAME_SZ]; /* -D */
+    DAT_QOS         ReliabilityLevel;
+    DAT_UINT32      num_ops;
+    Transaction_Cmd_Op_t op[MAX_OPS];
+} Transaction_Cmd_t;
+#pragma pack ()
+
+#endif
diff --git a/test/dapltest/include/dapl_transaction_stats.h b/test/dapltest/include/dapl_transaction_stats.h
new file mode 100644
index 0000000..3fd3a95
--- /dev/null
+++ b/test/dapltest/include/dapl_transaction_stats.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_TRANSACTION_STATS_H__
+#define __DAPL_TRANSACTION_STATS_H__
+
+#include "dapl_proto.h"
+
+#define whole(num)       ((unsigned int)(num))
+#define hundredths(num)  ((unsigned int)(((num) - (unsigned int)(num)) * 100))
+
+typedef struct
+{
+    DT_Mdep_LockType	lock;
+    unsigned int	wait_count;
+    unsigned int	num_ops;
+    unsigned int	time_ms;
+    unsigned int	bytes_send;
+    unsigned int	bytes_recv;
+    unsigned int	bytes_rdma_read;
+    unsigned int	bytes_rdma_write;
+} Transaction_Stats_t;
+#endif
diff --git a/test/dapltest/include/dapl_transaction_test.h b/test/dapltest/include/dapl_transaction_test.h
new file mode 100644
index 0000000..7401cdf
--- /dev/null
+++ b/test/dapltest/include/dapl_transaction_test.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_TRANSACTION_TEST_H__
+#define __DAPL_TRANSACTION_TEST_H__
+
+#include "dapl_proto.h"
+#include "dapl_common.h"
+#include "dapl_test_data.h"
+#include "dapl_transaction_cmd.h"
+
+typedef struct
+{
+    DAT_BOOLEAN             server_initiated;
+    DT_Transfer_Type        transfer_type;
+    DAT_UINT32              num_segs;
+    DAT_UINT32              seg_size;
+    DAT_BOOLEAN             reap_send_on_recv;
+    Bpool                   *bp;
+
+    /* RDMA info */
+    DAT_RMR_CONTEXT         Rdma_Context;
+    DAT_VADDR               Rdma_Address;
+} Transaction_Test_Op_t;
+
+typedef struct
+{
+    DAT_EP_HANDLE           ep_handle;
+    DAT_EP_ATTR		    ep_attr;
+    DAT_CONN_QUAL           ia_port;
+    Bpool                   *bp;
+    Transaction_Test_Op_t   op[ MAX_OPS ];
+    DAT_RSP_HANDLE          rsp_handle;
+    DAT_PSP_HANDLE          psp_handle;
+    DAT_EVD_HANDLE          recv_evd_hdl;   /* receive	    */
+    DAT_EVD_HANDLE          reqt_evd_hdl;   /* request+rmr  */
+    DAT_EVD_HANDLE          conn_evd_hdl;   /* connect	    */
+    DAT_EVD_HANDLE          creq_evd_hdl;   /* "" request   */
+
+} Ep_Context_t;
+
+typedef struct
+{
+    unsigned int            stat_bytes_send;
+    unsigned int            stat_bytes_recv;
+    unsigned int            stat_bytes_rdma_read;
+    unsigned int            stat_bytes_rdma_write;
+    unsigned int            start_time;
+    unsigned int            end_time;
+} Transaction_Test_Stats_t;
+
+typedef struct
+{
+    /* This group set up by DT_Transaction_Create_Test()   */
+    DAT_BOOLEAN             is_server;
+    DAT_BOOLEAN             remote_is_little_endian;
+    Per_Test_Data_t         *pt_ptr;
+    DAT_IA_HANDLE           ia_handle;
+    Transaction_Cmd_t       *cmd;
+    DAT_IA_ADDRESS_PTR      remote_ia_addr;
+    DAT_CONN_QUAL           base_port;
+    DAT_TIMEOUT             time_out;
+    DAT_COUNT               evd_length;
+    Thread                  *thread;
+
+    /* This group set up by each thread in DT_Transaction_Main() */
+    DAT_PZ_HANDLE           pz_handle;
+    Ep_Context_t            *ep_context;
+
+    /* Statistics set by DT_Transaction_Run() */
+    Transaction_Test_Stats_t 	stats;
+} Transaction_Test_t;
+
+#endif
diff --git a/test/dapltest/include/dapl_version.h b/test/dapltest/include/dapl_version.h
new file mode 100644
index 0000000..2022250
--- /dev/null
+++ b/test/dapltest/include/dapl_version.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_VERSION_H
+#define __DAPL_VERSION_H
+/*
+ * Dapltest version number
+ *
+ * This should be bumped everytime the "cross-the-wire" behavior changes.
+ */
+
+#define DAPLTEST_VERSION 0x00000006
+
+#endif
diff --git a/test/dapltest/mdep/linux/dapl_mdep_user.c b/test/dapltest/mdep/linux/dapl_mdep_user.c
new file mode 100644
index 0000000..d2b45bd
--- /dev/null
+++ b/test/dapltest/mdep/linux/dapl_mdep_user.c
@@ -0,0 +1,546 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_mdep.h"
+#include "dapl_proto.h"
+
+#include <pthread.h>		/* needed for pthread_atfork() */
+#include <sys/time.h>
+#include <stdlib.h>		/* needed for getenv() */
+#include <signal.h>		/* needed for thread setup */
+
+#include <assert.h>
+#include <errno.h>
+#include <semaphore.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>		/* for printf */
+#include <sys/time.h>
+#include <syslog.h>
+#include <netdb.h>		/* for getaddrinfo */
+
+/*
+ * Include files for setting up a network name
+ */
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <ctype.h>
+
+static FILE *Stat_Fp = NULL;
+# define DT_STAT_FILE	"/proc/stat"
+
+#include "dapl_test_data.h"	/* for alloc_count */
+
+/*
+ * Machine dependant initialization
+ */
+
+void DT_Mdep_Init(void)
+{
+	Stat_Fp = fopen(DT_STAT_FILE, "r");
+	if (NULL == Stat_Fp) {
+		perror("fopen of " DT_STAT_FILE " failed");
+		exit(1);
+	}
+}
+
+/*
+ * Machine dependant deinitialization
+ */
+
+void DT_Mdep_End(void)
+{
+	if (0 != fclose(Stat_Fp)) {
+		perror("fclose of " DT_STAT_FILE " failed");
+		exit(1);
+	}
+}
+
+/*
+ * Generate name of IB device
+ */
+
+bool DT_Mdep_GetDefaultDeviceName(char *dapl_name)
+{
+	strcpy(dapl_name, DT_MdepDeviceName);
+	return true;
+}
+
+/*
+ * Sleep specified number of milliseconds
+ */
+
+void DT_Mdep_Sleep(int msec)
+{
+	struct timespec t;
+	t.tv_sec = msec / 1000;	/* Whole seconds */
+	t.tv_nsec = (msec % 1000) * 1000 * 1000;
+	nanosleep(&t, 0);
+}
+
+void DT_Mdep_Schedule(void)
+{
+	/* nothing here */
+}
+
+/*
+ * Get system statistics including uptime and idle time
+ */
+
+bool DT_Mdep_GetCpuStat(DT_CpuStat * cpu_stat)
+{
+
+#define DT_CPU_STAT_STR		"cpu"
+#define DT_CPU_STAT_BUFFER_SIZE	1024
+#define DT_CPU_STAT_DELIMITER	" "
+
+	static char buffer[DT_CPU_STAT_BUFFER_SIZE];
+
+	cpu_stat->user = 0;
+	cpu_stat->system = 0;
+	cpu_stat->idle = 0;
+
+	if (0 != fflush(Stat_Fp)) {
+		perror("fflush of " DT_STAT_FILE " failed");
+		exit(1);
+	}
+
+	for (;;) {
+		if (NULL == fgets(buffer, DT_CPU_STAT_BUFFER_SIZE, Stat_Fp)) {
+			printf(DT_CPU_STAT_STR " not found\n");
+			exit(1);
+		}
+
+		if (!strncmp(buffer, DT_CPU_STAT_STR, strlen(DT_CPU_STAT_STR))) {
+			break;
+		}
+	}
+
+	(void)strtok(buffer, DT_CPU_STAT_DELIMITER);
+	cpu_stat->user = strtoul(strtok(NULL, DT_CPU_STAT_DELIMITER), NULL, 0);
+	cpu_stat->user += strtoul(strtok(NULL, DT_CPU_STAT_DELIMITER), NULL, 0);
+	cpu_stat->system =
+	    strtoul(strtok(NULL, DT_CPU_STAT_DELIMITER), NULL, 0);
+	cpu_stat->idle = strtoul(strtok(NULL, DT_CPU_STAT_DELIMITER), NULL, 0);
+
+	rewind(Stat_Fp);
+
+	return true;
+}
+
+/*
+ * Get current time in milliseconds (relative to some fixed point)
+ */
+unsigned long DT_Mdep_GetTime(void)
+{
+	struct timeval tv;
+	gettimeofday(&tv, NULL);
+	return tv.tv_sec * 1000 + tv.tv_usec / 1000;
+}
+
+#ifdef RDTSC_TIMERS
+double DT_Mdep_GetCpuMhz(void)
+{
+#define DT_TSC_BUFFER_SIZE 	128
+#if defined (__PPC__) || defined (__PPC64__)
+#define DT_TSC_RATE		"timebase"
+#define DT_TSC_BASE		1000000.0
+#else
+#define DT_TSC_RATE 		"cpu MHz"
+#define DT_TSC_BASE		1.0
+#endif
+#define DT_TSC_DELIMITER	":"
+
+	FILE *fp;
+	char buffer[DT_TSC_BUFFER_SIZE];
+	char *mhz_str;
+
+	fp = fopen("/proc/cpuinfo", "r");
+	if (NULL == fp) {
+		perror("fopen of /proc/cpuinfo failed");
+		exit(1);
+	}
+
+	for (;;) {
+		if (NULL == fgets(buffer, DT_TSC_BUFFER_SIZE, fp)) {
+			printf("cpu MHZ not found\n");
+			exit(1);
+		}
+
+		if (!strncmp(buffer, DT_TSC_RATE, strlen(DT_TSC_RATE))) {
+			(void)strtok(buffer, DT_TSC_DELIMITER);
+			mhz_str = strtok(NULL, DT_TSC_DELIMITER);
+
+			break;
+		}
+	}
+
+	if (0 != fclose(fp)) {
+		perror("fclose of /proc/cpuinfo failed");
+		exit(1);
+	}
+
+	return strtod(mhz_str, NULL) / DT_TSC_BASE;
+}
+#else				/* !RDTSC_TIMERS */
+
+double DT_Mdep_GetCpuMhz(void)
+{
+	return 1;
+}
+#endif
+
+unsigned long DT_Mdep_GetContextSwitchNum(void)
+{
+
+#define DT_CTXT_STR		"ctxt"
+#define DT_CTXT_BUFFER_SIZE	1024
+#define DT_CTXT_DELIMITER	" "
+
+	static char buffer[DT_CTXT_BUFFER_SIZE];
+	char *ctxt_str;
+
+	if (0 != fflush(Stat_Fp)) {
+		perror("fflush of " DT_STAT_FILE " failed");
+		exit(1);
+	}
+
+	for (;;) {
+		if (NULL == fgets(buffer, DT_CTXT_BUFFER_SIZE, Stat_Fp)) {
+			printf(DT_CTXT_STR " not found\n");
+			exit(1);
+		}
+
+		if (!strncmp(buffer, DT_CTXT_STR, strlen(DT_CTXT_STR))) {
+			(void)strtok(buffer, DT_CTXT_DELIMITER);
+			ctxt_str = strtok(NULL, DT_CTXT_DELIMITER);
+
+			break;
+		}
+	}
+
+	rewind(Stat_Fp);
+
+	return strtoul(ctxt_str, NULL, 0);
+}
+
+/*
+ * Memory allocate and free routines for control blocks (objects) - regular
+ * memory, always zeroed.
+ */
+void *DT_Mdep_Malloc(size_t l_)
+{
+	void *rval;
+
+	/*
+	 * check memory leaking DT_Mdep_Lock(&Alloc_Count_Lock); alloc_count++;
+	 * DT_Mdep_Unlock(&Alloc_Count_Lock);
+	 */
+
+	rval = malloc(l_);
+
+	if (rval) {
+		memset(rval, 0, l_);
+	}
+	return (rval);
+}
+
+void DT_Mdep_Free(void *a_)
+{
+	/*
+	 * check memory leaking DT_Mdep_Lock(&Alloc_Count_Lock); alloc_count--;
+	 * DT_Mdep_Unlock(&Alloc_Count_Lock);
+	 */
+
+	free(a_);
+}
+
+/*
+ * Lock support
+ *
+ * Lock object constructor
+ */
+bool DT_Mdep_LockInit(DT_Mdep_LockType * lock_ptr)
+{
+	return pthread_mutex_init(lock_ptr, 0) ? false : true;
+}
+
+/*
+ * Lock object destructor
+ */
+void DT_Mdep_LockDestroy(DT_Mdep_LockType * lock_ptr)
+{
+	pthread_mutex_destroy(lock_ptr);
+}
+
+/*
+ * Lock
+ */
+void DT_Mdep_Lock(DT_Mdep_LockType * lock_ptr)
+{
+	pthread_mutex_lock(lock_ptr);
+}
+
+/*
+ * unlock
+ */
+void DT_Mdep_Unlock(DT_Mdep_LockType * lock_ptr)
+{
+	pthread_mutex_unlock(lock_ptr);
+}
+
+/*
+ * Init Thread Attributes
+ */
+void DT_Mdep_Thread_Init_Attributes(Thread * thread_ptr)
+{
+	pthread_attr_init(&thread_ptr->attr);
+	pthread_attr_setstacksize(&thread_ptr->attr, thread_ptr->stacksize);
+	/* Create thread in detached state to free resources on termination;
+	 * this precludes doing a pthread_join, but we don't do it
+	 */
+	pthread_attr_setdetachstate(&thread_ptr->attr, PTHREAD_CREATE_DETACHED);
+}
+
+/*
+ * Destroy Thread Attributes
+ */
+void DT_Mdep_Thread_Destroy_Attributes(Thread * thread_ptr)
+{
+	pthread_attr_destroy(&thread_ptr->attr);
+}
+
+/*
+ * Start the thread
+ */
+bool DT_Mdep_Thread_Start(Thread * thread_ptr)
+{
+	return pthread_create(&thread_ptr->thread_handle,
+			      &thread_ptr->attr,
+			      DT_Mdep_Thread_Start_Routine, thread_ptr) == 0;
+}
+
+/*
+ * Thread execution entry point function
+ */
+DT_Mdep_Thread_Start_Routine_Return_Type
+DT_Mdep_Thread_Start_Routine(void *thread_handle)
+{
+	Thread *thread_ptr;
+	thread_ptr = (Thread *) thread_handle;
+
+	thread_ptr->function(thread_ptr->param);
+	return 0;
+}
+
+/*
+ * Thread detach routine.  Allows the pthreads
+ * interface to clean up resources properly at
+ * thread's end.
+ */
+void DT_Mdep_Thread_Detach(DT_Mdep_ThreadHandleType thread_id)
+{				/* AMM */
+	pthread_detach(thread_id);
+}
+
+/*
+ *  Allows a thread to get its own ID so it
+ *  can pass it to routines wanting to act
+ *  upon themselves.
+ */
+
+DT_Mdep_ThreadHandleType DT_Mdep_Thread_SELF(void)
+{				/* AMM */
+	return (pthread_self());
+}
+
+/*
+ *  Allow a thread to exit and cleanup resources.
+ */
+
+void DT_Mdep_Thread_EXIT(void *thread_handle)
+{				/* AMM */
+	pthread_exit(thread_handle);
+}
+
+/*
+ * DT_Mdep_wait_object_init
+ *
+ * Initialize a wait object
+ *
+ * Input:
+ *	wait_obj
+ *
+ * Returns:
+ *	0 if successful
+ *	-1 if unsuccessful
+ */
+int DT_Mdep_wait_object_init(IN DT_WAIT_OBJECT * wait_obj)
+{
+
+	wait_obj->signaled = DAT_FALSE;
+	if (0 != pthread_cond_init(&wait_obj->cv, NULL)) {
+		return (-1);
+	}
+
+	/* Always returns 0.  */
+	pthread_mutex_init(&wait_obj->lock, NULL);
+	return 0;
+}
+
+/* Wait on the supplied wait object, up to the specified time_out.
+ * A timeout of DAT_TIMEOUT_INFINITE will wait indefinitely.
+ * Timeout should be specified in micro seconds.
+ *
+ * Functional returns:
+ *	0 -- another thread invoked dapl_os_wait object_wakeup
+ * 	-1 -- someone else is already waiting in this wait
+ * 	object.
+ *			     only one waiter is allowed at a time.
+ *	-1 -- another thread invoked dapl_os_wait_object_destroy
+ *	-1 -- the specified time limit was reached.
+ */
+
+int DT_Mdep_wait_object_wait(IN DT_WAIT_OBJECT * wait_obj, IN int timeout_val)
+{
+	int dat_status;
+	int pthread_status;
+	struct timespec future;
+
+	dat_status = 0;
+	pthread_status = 0;
+
+	if (timeout_val != DAT_TIMEOUT_INFINITE) {
+		struct timeval now;
+		struct timezone tz;
+		unsigned int microsecs;
+
+		gettimeofday(&now, &tz);
+		microsecs = now.tv_usec + (timeout_val % 1000000);
+		if (microsecs > 1000000) {
+			now.tv_sec = now.tv_sec + timeout_val / 1000000 + 1;
+			now.tv_usec = microsecs - 1000000;
+		} else {
+			now.tv_sec = now.tv_sec + timeout_val / 1000000;
+			now.tv_usec = microsecs;
+		}
+
+		/* Convert timeval to timespec */
+		future.tv_sec = now.tv_sec;
+		future.tv_nsec = now.tv_usec * 1000;
+
+		pthread_mutex_lock(&wait_obj->lock);
+		while (wait_obj->signaled == DAT_FALSE && pthread_status == 0) {
+			pthread_status =
+			    pthread_cond_timedwait(&wait_obj->cv,
+						   &wait_obj->lock, &future);
+
+			/*
+			 * No need to reset &future if we go around the loop;
+			 * It's an absolute time.
+			 */
+		}
+		/* Reset the signaled status if we were woken up.  */
+		if (pthread_status == 0) {
+			wait_obj->signaled = false;
+		}
+		pthread_mutex_unlock(&wait_obj->lock);
+	} else {
+		pthread_mutex_lock(&wait_obj->lock);
+		while (wait_obj->signaled == DAT_FALSE && pthread_status == 0) {
+			pthread_status =
+			    pthread_cond_wait(&wait_obj->cv, &wait_obj->lock);
+		}
+		/* Reset the signaled status if we were woken up.  */
+		if (pthread_status == 0) {
+			wait_obj->signaled = false;
+		}
+		pthread_mutex_unlock(&wait_obj->lock);
+	}
+
+	if (ETIMEDOUT == pthread_status) {
+		return (-1);
+	} else if (0 != pthread_status) {
+		return (-1);
+	}
+
+	return 0;
+}
+
+/*
+ * DT_Mdep_wait_object_wakeup
+ *
+ * Wakeup a thread waiting on a wait object
+ *
+ * Input:
+ *      wait_obj
+ *
+ * Returns:
+ *	0 if successful
+ *	-1 if not successful
+ */
+int DT_Mdep_wait_object_wakeup(DT_WAIT_OBJECT * wait_obj)
+{
+	pthread_mutex_lock(&wait_obj->lock);
+	wait_obj->signaled = true;
+	pthread_mutex_unlock(&wait_obj->lock);
+	if (0 != pthread_cond_signal(&wait_obj->cv)) {
+		return (-1);
+	}
+
+	return 0;
+}
+
+/*
+ * DT_Mdep_wait_object_destroy
+ *
+ * Destroy a wait object
+ *
+ * Input:
+ *      wait_obj
+ *
+ * Returns:
+ *	0 if successful
+ *	-1 if not successful
+ */
+int DT_Mdep_wait_object_destroy(IN DT_WAIT_OBJECT * wait_obj)
+{
+	if (0 != pthread_cond_destroy(&wait_obj->cv)) {
+		return (-1);
+	}
+	if (0 != pthread_mutex_destroy(&wait_obj->lock)) {
+		return (-1);
+	}
+
+	return 0;
+}
diff --git a/test/dapltest/mdep/linux/dapl_mdep_user.h b/test/dapltest/mdep/linux/dapl_mdep_user.h
new file mode 100755
index 0000000..c39d3d6
--- /dev/null
+++ b/test/dapltest/mdep/linux/dapl_mdep_user.h
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#ifndef __DAPL_MDEP_USER_H__
+#define __DAPL_MDEP_USER_H__
+
+/* include files */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/times.h>
+#include <sys/time.h>
+
+/* inet_ntoa */
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+/* Default Device Name */
+#define DT_MdepDeviceName    "ofa-v2-ib0"
+
+/* Boolean */
+typedef int     bool;
+
+#define true (1)
+#define false (0)
+
+#ifndef __BASE_FILE__
+#define __BASE_FILE__ __FILE__
+#endif
+
+#ifndef _INLINE_
+#define _INLINE_  __inline__
+#endif
+
+/*
+ * Locks
+ */
+
+typedef pthread_mutex_t DT_Mdep_LockType;
+
+/* Wait object used for inter thread communication */
+
+typedef struct
+{
+    bool		signaled;
+    pthread_cond_t	cv;
+    pthread_mutex_t	lock;
+} DT_WAIT_OBJECT;
+
+/*
+ * Thread types
+ */
+typedef pthread_t   DT_Mdep_ThreadHandleType;
+typedef void      (*DT_Mdep_ThreadFunction) (void *param);
+typedef void *      DT_Mdep_Thread_Start_Routine_Return_Type;
+#define DT_MDEP_DEFAULT_STACK_SIZE 65536
+
+typedef struct
+{
+    void			(*function) (void *);
+    void			*param;
+    DT_Mdep_ThreadHandleType	thread_handle;
+    unsigned int    		stacksize;
+    pthread_attr_t		attr;	    /* Thread attributes */
+} Thread;
+
+/*
+ * System information
+ *
+ */
+
+typedef struct
+{
+    unsigned long int		system;
+    unsigned long int		user;
+    unsigned long int		idle;
+} DT_CpuStat;
+
+/*
+ * Timing
+ */
+#ifdef RDTSC_TIMERS
+typedef unsigned long long int 		DT_Mdep_TimeStamp;
+
+static _INLINE_ DT_Mdep_TimeStamp
+DT_Mdep_GetTimeStamp ( void )
+{
+#if defined(__GNUC__) && defined(__i386__)
+    DT_Mdep_TimeStamp x;
+    __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
+    return x;
+#else
+#ifdef __ia64__
+    unsigned long ret;
+    __asm__ __volatile__ ("mov %0=ar.itc" : "=r"(ret));
+    return ret;
+#else
+#if defined(__PPC__) || defined(__PPC64__)
+    unsigned int tbl, tbu0, tbu1;
+    do {
+         __asm__ __volatile__ ("mftbu %0" : "=r"(tbu0));
+         __asm__ __volatile__ ("mftb %0" : "=r"(tbl));
+         __asm__ __volatile__ ("mftbu %0" : "=r"(tbu1));
+    } while (tbu0 != tbu1);
+    return (((unsigned long long)tbu0) << 32) | tbl;
+#else
+#if defined(__x86_64__)
+      unsigned int __a,__d; 
+      asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); 
+      return ((unsigned long)__a) | (((unsigned long)__d)<<32);
+#else
+#error "Linux CPU architecture - unimplemented"
+#endif
+#endif
+#endif
+#endif
+}
+#else /* !RDTSC_TIMERS */
+/* 
+ * Get timestamp, microseconds, (relative to some fixed point)
+ */
+typedef double DT_Mdep_TimeStamp;
+
+static _INLINE_ DT_Mdep_TimeStamp
+DT_Mdep_GetTimeStamp ( void )
+{
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+    return (tv.tv_sec * 1000000 + tv.tv_usec);
+}
+#endif
+
+
+/*
+ * Define long format types to be used in *printf format strings.  We
+ * use the C string constant concatenation ability to define 64 bit
+ * formats, which unfortunatly are non standard in the C compiler
+ * world. E.g. %llx for gcc, %I64x for Windows
+ */
+
+#if defined(__x86_64__) || defined(__ia64__)
+#define F64d   "%ld"
+#define F64u   "%lu"
+#define F64x   "%lx"
+#define F64X   "%lX"
+#else
+#define F64d   "%lld"
+#define F64u   "%llu"
+#define F64x   "%llx"
+#define F64X   "%llX"
+#endif
+/*
+ * Define notion of a LONG LONG 0
+ */
+#define LZERO 0ULL
+
+/* Mdep function defines */
+#define DT_Mdep_Debug(N, _X_) \
+do { \
+      if (DT_dapltest_debug >= (N)) \
+        { \
+          DT_Mdep_printf _X_; \
+        } \
+} while (0)
+#define DT_Mdep_printf printf
+
+#define DT_Mdep_flush() fflush(NULL)
+
+#endif
diff --git a/test/dapltest/test/dapl_bpool.c b/test/dapltest/test/dapl_bpool.c
new file mode 100644
index 0000000..e06f2fc
--- /dev/null
+++ b/test/dapltest/test/dapl_bpool.c
@@ -0,0 +1,359 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/* flag to prevent usage of Memory Windows as they are not supported in mthca */
+static DAT_BOOLEAN enable_memory_windows = DAT_FALSE;
+
+/*****************************************************************************/
+/*
+ * Allocate buffer pool (data buffers)
+ *
+ *  Caller wants to allocate <num_seg> buffers of <seg_size> bytes,
+ *  with each buffer aligned as requested.  The caller is free to
+ *  use the buffers separately, or as one contiguous segment, so
+ *  we allocate IOV entries enough to support either usage.
+ */
+Bpool *DT_BpoolAlloc(Per_Test_Data_t * pt_ptr,
+		     DT_Tdep_Print_Head * phead,
+		     DAT_IA_HANDLE ia_handle,
+		     DAT_PZ_HANDLE pz_handle,
+		     DAT_EP_HANDLE ep_handle,
+		     DAT_EVD_HANDLE rmr_evd_handle,
+		     DAT_COUNT seg_size,
+		     DAT_COUNT num_segs,
+		     DAT_COUNT alignment,
+		     DAT_BOOLEAN enable_rdma_write,
+		     DAT_BOOLEAN enable_rdma_read)
+{
+	char *module = "DT_BpoolAlloc";
+	unsigned char *alloc_ptr = 0;
+	Bpool *bpool_ptr = 0;
+	DAT_COUNT alloc_size;
+	DAT_REGION_DESCRIPTION region;
+	DAT_RETURN ret;
+
+	/* We'll hand out aligned buffers, compensate here */
+	seg_size = DT_RoundSize(seg_size, alignment);
+	alloc_size = seg_size * num_segs + alignment;
+
+	alloc_ptr = (unsigned char *)DT_MemListAlloc(pt_ptr, "bpool", BUFF,
+						     alloc_size);
+	if (!alloc_ptr) {
+		DT_Tdep_PT_Printf(phead, "No Memory to create bpool buffer!\n");
+		goto err;
+	}
+
+	bpool_ptr =
+	    (Bpool *) DT_MemListAlloc(pt_ptr, "bpool", BPOOL, sizeof(Bpool)
+				      + num_segs * sizeof(DAT_LMR_TRIPLET));
+	if (!bpool_ptr) {
+		DT_Tdep_PT_Printf(phead, "No Memory to create Bpool!\n");
+		goto err;
+	}
+
+	bpool_ptr->alloc_ptr = alloc_ptr;
+	bpool_ptr->alloc_size = alloc_size;
+	bpool_ptr->pz_handle = pz_handle;
+	bpool_ptr->num_segs = num_segs;
+	bpool_ptr->ep_handle = ep_handle;
+	bpool_ptr->buffer_size = seg_size * num_segs;
+	bpool_ptr->buffer_start = DT_AlignPtr(alloc_ptr, alignment);
+	bpool_ptr->tripl_start = (DAT_LMR_TRIPLET *) (bpool_ptr + 1);
+	bpool_ptr->seg_size = seg_size;
+	bpool_ptr->enable_rdma_write = enable_rdma_write;
+	bpool_ptr->enable_rdma_read = enable_rdma_read;
+	bpool_ptr->rmr_evd_handle = rmr_evd_handle;
+
+	DT_Tdep_PT_Debug(3,
+			 (phead,
+			  "lmr_create    [%p, " F64x "]\n",
+			  bpool_ptr->buffer_start, bpool_ptr->buffer_size));
+
+	memset(&region, 0, sizeof(region));
+	region.for_va = bpool_ptr->buffer_start;
+	ret = DT_Tdep_lmr_create(ia_handle,
+				 DAT_MEM_TYPE_VIRTUAL,
+				 region,
+				 bpool_ptr->buffer_size,
+				 pz_handle,
+				 DAT_MEM_PRIV_ALL_FLAG,
+				 &bpool_ptr->lmr_handle,
+				 &bpool_ptr->lmr_context,
+				 &bpool_ptr->rmr_context,
+				 &bpool_ptr->reg_size, &bpool_ptr->reg_addr);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "%s: dat_lmr_create failed %s\n",
+				  module, DT_RetToString(ret));
+		goto err;
+	}
+	/* verify that the outputs are reasonable */
+	if (((uintptr_t) bpool_ptr->reg_addr >
+	     (uintptr_t) bpool_ptr->buffer_start)
+	    || (bpool_ptr->reg_size <
+		bpool_ptr->buffer_size + ((uintptr_t) bpool_ptr->buffer_start -
+					  (uintptr_t) bpool_ptr->reg_addr))) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_lmr_create bogus" "in: 0x%p, " F64x
+				  " out 0x" F64x ", " F64x "\n", module,
+				  bpool_ptr->buffer_start,
+				  bpool_ptr->buffer_size, bpool_ptr->reg_addr,
+				  bpool_ptr->reg_size);
+		goto err;
+	}
+
+	DT_Tdep_PT_Debug(3, (phead,
+			     "lmr_create OK [0x" F64x ", " F64x ", lctx=%x]\n",
+			     bpool_ptr->reg_addr,
+			     bpool_ptr->reg_size, bpool_ptr->lmr_context));
+
+	/* Enable RDMA if requested */
+	if (enable_memory_windows && (enable_rdma_write || enable_rdma_read)) {
+		DAT_LMR_TRIPLET iov;
+		DAT_RMR_COOKIE cookie;
+		DAT_MEM_PRIV_FLAGS mflags;
+		DAT_RMR_BIND_COMPLETION_EVENT_DATA rmr_stat;
+
+		/* create the RMR */
+		ret = dat_rmr_create(pz_handle, &bpool_ptr->rmr_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_rmr_create failed %s\n",
+					  module, DT_RetToString(ret));
+			goto err;
+		}
+
+		/* bind the RMR */
+		iov.virtual_address = bpool_ptr->reg_addr;
+		iov.segment_length = bpool_ptr->reg_size;
+		iov.lmr_context = bpool_ptr->lmr_context;
+		cookie.as_64 = (DAT_UINT64) 0UL;
+		cookie.as_ptr = (DAT_PVOID) (uintptr_t) bpool_ptr->reg_addr;
+		mflags = (enable_rdma_write
+			  && enable_rdma_read ? DAT_MEM_PRIV_ALL_FLAG
+			  : (enable_rdma_write ? DAT_MEM_PRIV_WRITE_FLAG
+			     : (enable_rdma_read ? DAT_MEM_PRIV_READ_FLAG :
+				0)));
+
+		DT_Tdep_PT_Debug(3, (phead, "rmr_bind [" F64x ", " F64x "]\n",
+				     bpool_ptr->reg_addr, bpool_ptr->reg_size));
+
+		ret = dat_rmr_bind(bpool_ptr->rmr_handle,
+				   bpool_ptr->lmr_handle,
+				   &iov,
+				   mflags,
+				   DAT_VA_TYPE_VA,
+				   bpool_ptr->ep_handle,
+				   cookie,
+				   DAT_COMPLETION_DEFAULT_FLAG,
+				   &bpool_ptr->rmr_context);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead, "%s: dat_rmr_bind failed %s\n",
+					  module, DT_RetToString(ret));
+			goto err;
+		}
+
+		DT_Tdep_PT_Debug(3, (phead, "rmr_bind-wait\n"));
+
+		/* await the bind result */
+		if (!DT_rmr_event_wait(phead,
+				       bpool_ptr->rmr_evd_handle,
+				       &rmr_stat) ||
+		    !DT_rmr_check(phead,
+				  &rmr_stat,
+				  bpool_ptr->rmr_handle,
+				  (DAT_PVOID) (uintptr_t) bpool_ptr->reg_addr,
+				  "Bpool")) {
+			goto err;
+		}
+
+		DT_Tdep_PT_Debug(3,
+				 (phead, "rmr_bound [OK Rctx=%x]\n",
+				  bpool_ptr->rmr_context));
+	}
+
+	/*
+	 * Finally!  Return the newly created Bpool.
+	 */
+	return (bpool_ptr);
+
+	/* *********************************
+	 * Whoops - clean up and return NULL
+	 */
+      err:
+	if (bpool_ptr) {
+		if (bpool_ptr->rmr_handle) {
+			ret = dat_rmr_free(bpool_ptr->rmr_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_rmr_free failed %s\n",
+						  module, DT_RetToString(ret));
+			}
+		}
+		if (bpool_ptr->lmr_handle) {
+			ret = dat_lmr_free(bpool_ptr->lmr_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_lmr_free failed %s\n",
+						  module, DT_RetToString(ret));
+			}
+		}
+		DT_MemListFree(pt_ptr, bpool_ptr);
+	}
+	if (alloc_ptr) {
+		DT_MemListFree(pt_ptr, alloc_ptr);
+	}
+
+	return (0);
+}
+
+/*****************************************************************************/
+bool
+DT_Bpool_Destroy(Per_Test_Data_t * pt_ptr,
+		 DT_Tdep_Print_Head * phead, Bpool * bpool_ptr)
+{
+	char *module = "DT_Bpool_Destroy";
+	bool rval = true;
+
+	if (bpool_ptr) {
+		if (bpool_ptr->alloc_ptr) {
+			if (bpool_ptr->rmr_handle) {
+				DAT_LMR_TRIPLET iov;
+				DAT_RMR_COOKIE cookie;
+				DAT_RETURN ret;
+
+				iov.virtual_address = bpool_ptr->reg_addr;
+				iov.segment_length = 0;	/* un-bind */
+				iov.lmr_context = bpool_ptr->lmr_context;
+				cookie.as_64 = (DAT_UINT64) 0UL;
+				cookie.as_ptr =
+				    (DAT_PVOID) (uintptr_t) bpool_ptr->reg_addr;
+
+				/*
+				 * Do not attempt to unbind here. The remote node
+				 * is going through the same logic and may disconnect
+				 * before an unbind completes. Any bind/unbind
+				 * operation requires a CONNECTED QP to complete,
+				 * a disconnect will cause problems. Unbind is
+				 * a simple optimization to allow rebinding of
+				 * an RMR, doing an rmr_free will pull the plug
+				 * and cleanup properly.
+				 */
+				ret = dat_rmr_free(bpool_ptr->rmr_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_rmr_free failed %s\n",
+							  module,
+							  DT_RetToString(ret));
+					rval = false;
+				}
+			}
+
+			if (bpool_ptr->lmr_handle) {
+				DAT_RETURN ret =
+				    dat_lmr_free(bpool_ptr->lmr_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_lmr_free failed %s\n",
+							  module,
+							  DT_RetToString(ret));
+					rval = false;
+				}
+			}
+			DT_MemListFree(pt_ptr, bpool_ptr->alloc_ptr);
+		}
+		DT_MemListFree(pt_ptr, bpool_ptr);
+	}
+
+	return (rval);
+}
+
+/*****************************************************************************/
+unsigned char *DT_Bpool_GetBuffer(Bpool * bpool_ptr, int index)
+{
+	return (bpool_ptr->buffer_start + index * bpool_ptr->seg_size);
+}
+
+/*****************************************************************************/
+DAT_COUNT DT_Bpool_GetBuffSize(Bpool * bpool_ptr, int index)
+{
+	return (bpool_ptr->seg_size);
+}
+
+/*****************************************************************************/
+DAT_LMR_TRIPLET *DT_Bpool_GetIOV(Bpool * bpool_ptr, int index)
+{
+	return (bpool_ptr->tripl_start + index);
+}
+
+/*****************************************************************************/
+DAT_LMR_CONTEXT DT_Bpool_GetLMR(Bpool * bpool_ptr, int index)
+{
+	return (bpool_ptr->lmr_context);
+}
+
+/*****************************************************************************/
+DAT_RMR_CONTEXT DT_Bpool_GetRMR(Bpool * bpool_ptr, int index)
+{
+	return (bpool_ptr->rmr_context);
+}
+
+/*****************************************************************************/
+void DT_Bpool_print(DT_Tdep_Print_Head * phead, Bpool * bpool_ptr)
+{
+	DT_Tdep_PT_Printf(phead, "BPOOL                %p\n", bpool_ptr);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL alloc_ptr      %p\n", bpool_ptr->alloc_ptr);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL alloc_size     %x\n",
+			  (int)bpool_ptr->alloc_size);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL pz_handle      %p\n", bpool_ptr->pz_handle);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL num_segs       %x\n",
+			  (int)bpool_ptr->num_segs);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL seg_size       %x\n",
+			  (int)bpool_ptr->seg_size);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL tripl_start    %p\n", bpool_ptr->tripl_start);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL buffer_start   %p\n", bpool_ptr->buffer_start);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL buffer_size    %x\n",
+			  (int)bpool_ptr->buffer_size);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL rdma_write     %x\n",
+			  (int)bpool_ptr->enable_rdma_write);
+	DT_Tdep_PT_Printf(phead,
+			  "BPOOL rdmaread       %x\n",
+			  (int)bpool_ptr->enable_rdma_read);
+}
diff --git a/test/dapltest/test/dapl_client.c b/test/dapltest/test/dapl_client.c
new file mode 100644
index 0000000..91ebd7d
--- /dev/null
+++ b/test/dapltest/test/dapl_client.c
@@ -0,0 +1,559 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#if defined(DFLT_QLEN)
+#undef DFLT_QLEN
+#endif
+
+#define DFLT_QLEN      8	/* default event queue length */
+#define MAX_CONN_RETRY 8
+
+/*
+ * Client control routine Connect to the server, send the command across.
+ * Then start the client-side of the test - creating threads as needed
+ */
+DAT_RETURN
+DT_cs_Client(Params_t * params_ptr,
+	     char *dapl_name, char *server_name, DAT_UINT32 total_threads)
+{
+	Per_Test_Data_t *pt_ptr = NULL;
+	DAT_IA_HANDLE ia_handle = DAT_HANDLE_NULL;
+	DAT_PZ_HANDLE pz_handle = DAT_HANDLE_NULL;
+	DAT_EVD_HANDLE recv_evd_hdl = DAT_HANDLE_NULL;
+	DAT_EVD_HANDLE reqt_evd_hdl = DAT_HANDLE_NULL;
+	DAT_EVD_HANDLE conn_evd_hdl = DAT_HANDLE_NULL;
+	DAT_EVD_HANDLE async_evd_hdl = DAT_HANDLE_NULL;
+	DAT_EP_HANDLE ep_handle = DAT_HANDLE_NULL;
+	Server_Info_t *sinfo = NULL;
+	Transaction_Cmd_t *Transaction_Cmd = NULL;
+	Quit_Cmd_t *Quit_Cmd = NULL;
+	Performance_Cmd_t *Performance_Cmd = NULL;
+	Bpool *bpool = NULL;
+	DAT_IA_ADDRESS_PTR server_netaddr = NULL;
+	char *module = "DT_cs_Client";
+	unsigned int did_connect = 0;
+	unsigned int retry_cnt = 0;
+	DAT_DTO_COOKIE dto_cookie;
+
+	DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+	DAT_EVENT_NUMBER event_num;
+	unsigned char *buffp;
+	DAT_RETURN ret, rc;
+	DT_Tdep_Print_Head *phead;
+
+	phead = params_ptr->phead;
+
+	dto_cookie.as_64 = LZERO;
+
+	DT_Tdep_PT_Printf(phead, "%s: Starting Test ... \n", module);
+	DT_Mdep_Schedule();
+	/* Set up the  Per_Test_Data */
+	pt_ptr = DT_Alloc_Per_Test_Data(phead);
+	if (!pt_ptr) {
+		DT_Tdep_PT_Printf(phead, "%s: no memory for Per_Test_Data\n",
+				  module);
+		return DAT_INSUFFICIENT_RESOURCES;
+	}
+	DT_MemListInit(pt_ptr);	/* init MemlistLock and memListHead */
+	DT_Thread_Init(pt_ptr);	/* init ThreadLock and threadcount */
+	pt_ptr->local_is_server = false;
+	pt_ptr->Client_Info.dapltest_version = DAPLTEST_VERSION;
+	pt_ptr->Client_Info.is_little_endian = DT_local_is_little_endian;
+	pt_ptr->Client_Info.test_type = params_ptr->test_type;
+	pt_ptr->Client_Info.total_threads = total_threads;
+	memcpy((void *)(uintptr_t) & pt_ptr->Params,
+	       (const void *)params_ptr, sizeof(Params_t));
+
+	/* Allocate and fill in the Server's address */
+	server_netaddr = &params_ptr->server_netaddr;
+
+	/* Open the IA */
+	ret = dat_ia_open(dapl_name, DFLT_QLEN, &async_evd_hdl, &ia_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: Could not open %s (%s)\n",
+				  module, dapl_name, DT_RetToString(ret));
+		ia_handle = DAT_HANDLE_NULL;
+		goto client_exit;
+	}
+	DT_Tdep_PT_Debug(1, (phead, "%s: IA %s opened\n", module, dapl_name));
+
+	/* Create a PZ */
+	ret = dat_pz_create(ia_handle, &pz_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_pz_create error: %s\n",
+				  module, DT_RetToString(ret));
+		pz_handle = DAT_HANDLE_NULL;
+		goto client_exit;
+	}
+
+	/* Create 3 events - recv, request, connect */
+
+	ret = DT_Tdep_evd_create(ia_handle,
+				 DFLT_QLEN,
+				 NULL, DAT_EVD_DTO_FLAG, &recv_evd_hdl);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_evd_create (recv) failed %s\n",
+				  module, DT_RetToString(ret));
+		recv_evd_hdl = DAT_HANDLE_NULL;
+		goto client_exit;
+	}
+	ret = DT_Tdep_evd_create(ia_handle,
+				 DFLT_QLEN,
+				 NULL,
+				 DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG,
+				 &reqt_evd_hdl);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_evd_create (send) failed %s\n",
+				  module, DT_RetToString(ret));
+		reqt_evd_hdl = DAT_HANDLE_NULL;
+		goto client_exit;
+	}
+	ret = DT_Tdep_evd_create(ia_handle,
+				 DFLT_QLEN,
+				 NULL, DAT_EVD_CONNECTION_FLAG, &conn_evd_hdl);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_evd_create (conn) failed %s\n",
+				  module, DT_RetToString(ret));
+		conn_evd_hdl = DAT_HANDLE_NULL;
+		goto client_exit;
+	}
+
+	/* Create an EP */
+	ret = dat_ep_create(ia_handle,	/* IA       */
+			    pz_handle,	/* PZ       */
+			    recv_evd_hdl,	/* recv     */
+			    reqt_evd_hdl,	/* request  */
+			    conn_evd_hdl,	/* connect  */
+			    (DAT_EP_ATTR *) NULL, &ep_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_ep_create error: %s\n",
+				  module, DT_RetToString(ret));
+		ep_handle = DAT_HANDLE_NULL;
+		goto client_exit;
+	}
+	DT_Tdep_PT_Debug(1, (phead, "%s: EP created\n", module));
+
+	/*
+	 * Gather whatever info we want about defaults,
+	 * and check that we can handle the requested parameters.
+	 */
+	if (!DT_query(pt_ptr, ia_handle, ep_handle) ||
+	    !DT_check_params(pt_ptr, module)) {
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		goto client_exit;
+	}
+
+	bpool = DT_BpoolAlloc(pt_ptr, phead, ia_handle, pz_handle, ep_handle, DAT_HANDLE_NULL,	/* no RMR */
+			      DT_RoundSize(sizeof(Transaction_Cmd_t), 8192), 3,	/* num_buffers */
+			      DAT_OPTIMAL_ALIGNMENT, false, false);
+	if (bpool == 0) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: no memory for command buffer pool.\n",
+				  module);
+		ret =
+		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
+		goto client_exit;
+	}
+
+	DT_Tdep_PT_Debug(3, (phead,
+			     "RecvSrvInfo 0  %p\n",
+			     (DAT_PVOID) DT_Bpool_GetBuffer(bpool, 0)));
+	DT_Tdep_PT_Debug(3, (phead,
+			     "SndCliInfo 1  %p\n",
+			     (DAT_PVOID) DT_Bpool_GetBuffer(bpool, 1)));
+	DT_Tdep_PT_Debug(3, (phead,
+			     "SndCommand 2  %p\n",
+			     (DAT_PVOID) DT_Bpool_GetBuffer(bpool, 2)));
+
+	/* Post recv buffer for Server_Info (1st buffer in pool) */
+	DT_Tdep_PT_Debug(1, (phead, "%s: Posting 1 recv buffer\n", module));
+      retry_repost:
+	if (!DT_post_recv_buffer(phead,
+				 ep_handle,
+				 bpool, 0, DT_Bpool_GetBuffSize(bpool, 0))) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: cannot post Server_Info recv buffer.\n",
+				  module);
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		goto client_exit;
+	}
+
+	DT_Tdep_PT_Debug(1, (phead, "%s: Connect Endpoint\n", module));
+      retry:
+	ret = dat_ep_connect(ep_handle, server_netaddr, SERVER_PORT_NUMBER, DAT_TIMEOUT_INFINITE, 0, (DAT_PVOID) 0,	/* no private data */
+			     params_ptr->ReliabilityLevel,
+			     DAT_CONNECT_DEFAULT_FLAG);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: Cannot connect Endpoint %s\n",
+				  module, DT_RetToString(ret));
+		goto client_exit;
+	}
+
+	DT_Tdep_PT_Debug(1, (phead, "%s: Await connection ...\n", module));
+	if (!DT_conn_event_wait(phead, ep_handle, conn_evd_hdl, &event_num)) {
+		if (event_num == DAT_CONNECTION_EVENT_PEER_REJECTED) {
+			DAT_EVENT event;
+			DAT_COUNT drained = 0;
+
+			DT_Mdep_Sleep(1000);
+			DT_Tdep_PT_Printf(phead,
+					  "%s: retrying connection...\n",
+					  module);
+			retry_cnt++;
+			/*
+			 * See if any buffers were flushed as a result of
+			 * the REJECT; clean them up and repost if so
+			 */
+			dat_ep_reset(ep_handle);
+			do {
+				rc = DT_Tdep_evd_dequeue(recv_evd_hdl, &event);
+				drained++;
+			} while (DAT_GET_TYPE(rc) != DAT_QUEUE_EMPTY);
+
+			if (drained > 1 && retry_cnt < MAX_CONN_RETRY) {
+				DT_Tdep_PT_Printf(phead, "Reposting!!! %d\n",
+						  drained);
+				goto retry_repost;
+			} else if (retry_cnt < MAX_CONN_RETRY) {
+				goto retry;
+			}
+		}
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		DT_Tdep_PT_Printf(phead, "%s: bad connection event\n", module);
+		goto client_exit;
+	}
+
+	did_connect++;
+	if (DT_dapltest_debug) {
+		DT_Tdep_PT_Debug(1, (phead, "%s: Connected!\n", module));
+		get_ep_connection_state(phead, ep_handle);
+	}
+#ifdef CM_BUSTED
+    /*****  XXX Chill out a bit to give the kludged CM a chance ...
+     *****/ DT_Mdep_Sleep(1000);
+#endif
+
+	/* Send Client_Info (using 2nd buffer in the pool) */
+	DT_Tdep_PT_Debug(1, (phead, "%s: Sending Client_Info\n", module));
+	buffp = DT_Bpool_GetBuffer(bpool, 1);
+	memcpy((void *)buffp,
+	       (const void *)&pt_ptr->Client_Info, sizeof(Client_Info_t));
+	DT_Client_Info_Endian((Client_Info_t *) buffp);
+	if (!DT_post_send_buffer(phead,
+				 ep_handle,
+				 bpool, 1, DT_Bpool_GetBuffSize(bpool, 1))) {
+		DT_Tdep_PT_Printf(phead, "%s: cannot send Client_Info\n",
+				  module);
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		goto client_exit;
+	}
+	/* reap the send and verify it */
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) (uintptr_t) DT_Bpool_GetBuffer(bpool, 1);
+	DT_Tdep_PT_Debug(1,
+			 (phead, "%s: Sent Client_Info - awaiting completion\n",
+			  module));
+	if (!DT_dto_event_wait(phead, reqt_evd_hdl, &dto_stat)
+	    || !DT_dto_check(phead, &dto_stat, ep_handle,
+			     DT_Bpool_GetBuffSize(bpool, 1), dto_cookie,
+			     "Client_Info_Send")) {
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		goto client_exit;
+	}
+
+	/* Set up the Command (using 3rd buffer in pool) */
+	DT_Tdep_PT_Debug(1, (phead, "%s: Sending Command\n", module));
+	buffp = DT_Bpool_GetBuffer(bpool, 2);
+	switch (pt_ptr->Client_Info.test_type) {
+	case TRANSACTION_TEST:
+		{
+			Transaction_Cmd = &pt_ptr->Params.u.Transaction_Cmd;
+			memcpy((void *)buffp,
+			       (const void *)Transaction_Cmd,
+			       sizeof(Transaction_Cmd_t));
+			DT_Transaction_Cmd_Endian((Transaction_Cmd_t *) buffp,
+						  true);
+			break;
+		}
+
+	case QUIT_TEST:
+		{
+			Quit_Cmd = &pt_ptr->Params.u.Quit_Cmd;
+			memcpy((void *)buffp,
+			       (const void *)Quit_Cmd, sizeof(Quit_Cmd_t));
+			DT_Quit_Cmd_Endian((Quit_Cmd_t *) buffp, true);
+			break;
+		}
+
+	case PERFORMANCE_TEST:
+		{
+			Performance_Cmd = &pt_ptr->Params.u.Performance_Cmd;
+			memcpy((void *)buffp,
+			       (const void *)Performance_Cmd,
+			       sizeof(Performance_Cmd_t));
+			DT_Performance_Cmd_Endian((Performance_Cmd_t *) buffp);
+			break;
+		}
+	default:
+		{
+			DT_Tdep_PT_Printf(phead, "Unknown Test Type\n");
+			ret = DAT_INVALID_PARAMETER;
+			goto client_exit;
+		}
+	}
+
+	/* Send the Command buffer */
+	if (!DT_post_send_buffer(phead,
+				 ep_handle,
+				 bpool, 2, DT_Bpool_GetBuffSize(bpool, 2))) {
+		DT_Tdep_PT_Printf(phead, "%s: cannot send Command\n", module);
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		goto client_exit;
+	}
+	/* reap the send and verify it */
+	dto_cookie.as_64 = LZERO;
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) (uintptr_t) DT_Bpool_GetBuffer(bpool, 2);
+	DT_Tdep_PT_Debug(1,
+			 (phead, "%s: Sent Command - awaiting completion\n",
+			  module));
+	if (!DT_dto_event_wait(phead, reqt_evd_hdl, &dto_stat)
+	    || !DT_dto_check(phead, &dto_stat, ep_handle,
+			     DT_Bpool_GetBuffSize(bpool, 2), dto_cookie,
+			     "Client_Cmd_Send")) {
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		goto client_exit;
+	}
+
+    /************************************************************************/
+	dto_cookie.as_64 = LZERO;
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) (uintptr_t) DT_Bpool_GetBuffer(bpool, 0);
+	DT_Tdep_PT_Debug(1, (phead, "%s: Waiting for Server_Info\n", module));
+	if (!DT_dto_event_wait(phead, recv_evd_hdl, &dto_stat) ||
+	    !DT_dto_check(phead,
+			  &dto_stat,
+			  ep_handle,
+			  DT_Bpool_GetBuffSize(bpool, 0),
+			  dto_cookie, "Server_Info_Recv")) {
+		ret = DAT_INSUFFICIENT_RESOURCES;
+		goto client_exit;
+	}
+
+	DT_Tdep_PT_Debug(1, (phead, "%s: Server_Info Received\n", module));
+	sinfo = (Server_Info_t *) DT_Bpool_GetBuffer(bpool, 0);
+	DT_Server_Info_Endian(sinfo);
+	memcpy((void *)(uintptr_t) & pt_ptr->Server_Info,
+	       (const void *)sinfo, sizeof(Server_Info_t));
+
+	/* Perform obligatory version check */
+	if (pt_ptr->Server_Info.dapltest_version != DAPLTEST_VERSION) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: DAPLTEST VERSION MISMATCH: Server %d, Client %d\n",
+				  module,
+				  pt_ptr->Server_Info.dapltest_version,
+				  DAPLTEST_VERSION);
+		ret = DAT_MODEL_NOT_SUPPORTED;
+		goto client_exit;
+	}
+	DT_Tdep_PT_Debug(1, (phead, "%s: Version OK!\n", module));
+
+	/* Dump out what we know, if requested */
+	if (DT_dapltest_debug) {
+		DT_Server_Info_Print(phead, &pt_ptr->Server_Info);
+		DT_Client_Info_Print(phead, &pt_ptr->Client_Info);
+	}
+
+	/* Onward to running the actual test requested */
+	switch (pt_ptr->Client_Info.test_type) {
+	case TRANSACTION_TEST:
+		{
+			if (Transaction_Cmd->debug) {
+				DT_Transaction_Cmd_PT_Print(phead,
+							    Transaction_Cmd);
+			}
+			ret = DT_Transaction_Test_Client(pt_ptr,
+							 ia_handle,
+							 server_netaddr);
+			break;
+		}
+
+	case QUIT_TEST:
+		{
+			DT_Quit_Cmd_PT_Print(phead, Quit_Cmd);
+			ret = DAT_SUCCESS;
+			break;
+		}
+
+	case PERFORMANCE_TEST:
+		{
+			if (Performance_Cmd->debug) {
+				DT_Performance_Cmd_PT_Print(phead,
+							    Performance_Cmd);
+			}
+
+			ret = DT_Performance_Test_Client(params_ptr,
+							 pt_ptr,
+							 ia_handle,
+							 server_netaddr);
+			break;
+		}
+	}
+
+    /*********************************************************************
+     * Done - clean up and go home
+     * ret == function DAT_RETURN return code
+     */
+      client_exit:
+	DT_Tdep_PT_Debug(1, (phead, "%s: Cleaning Up ...\n", module));
+
+	/* Disconnect the EP */
+	if (ep_handle) {
+		/*
+		 * graceful attempt might fail because we got here due to
+		 * some error above, so we may as well try harder.
+		 */
+		rc = dat_ep_disconnect(ep_handle, DAT_CLOSE_ABRUPT_FLAG);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_ep_disconnect (abrupt) error: %s\n",
+					  module, DT_RetToString(rc));
+		} else if (did_connect &&
+			   !DT_disco_event_wait(phead, conn_evd_hdl, NULL)) {
+			DT_Tdep_PT_Printf(phead, "%s: bad disconnect event\n",
+					  module);
+		}
+	}
+
+	/* Free the bpool (if any) */
+	DT_Bpool_Destroy(pt_ptr, phead, bpool);
+
+	/* Free the EP */
+	if (ep_handle) {
+		DAT_EVENT event;
+		/*
+		 * Drain off outstanding DTOs that may have been
+		 * generated by racing disconnects
+		 */
+		do {
+			rc = DT_Tdep_evd_dequeue(recv_evd_hdl, &event);
+		} while (rc == DAT_SUCCESS);
+
+		rc = dat_ep_free(ep_handle);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_ep_free error: %s\n",
+					  module, DT_RetToString(rc));
+			/* keep going */
+		}
+	}
+
+	/* Free the 3 EVDs */
+	if (conn_evd_hdl) {
+		rc = DT_Tdep_evd_free(conn_evd_hdl);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_evd_free (conn) error: %s\n",
+					  module, DT_RetToString(rc));
+			/* keep going */
+		}
+	}
+	if (reqt_evd_hdl) {
+		rc = DT_Tdep_evd_free(reqt_evd_hdl);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_evd_free (reqt) error: %s\n",
+					  module, DT_RetToString(rc));
+			/* keep going */
+		}
+	}
+	if (recv_evd_hdl) {
+		rc = DT_Tdep_evd_free(recv_evd_hdl);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_evd_free (recv) error: %s\n",
+					  module, DT_RetToString(rc));
+			/* keep going */
+		}
+	}
+
+	/* Free the PZ */
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_pz_free error: %s\n",
+					  module, DT_RetToString(rc));
+			/* keep going */
+		}
+	}
+
+	/* Close the IA */
+	if (ia_handle) {
+		/* dat_ia_close cleans up async evd handle, too */
+		rc = dat_ia_close(ia_handle, DAT_CLOSE_GRACEFUL_FLAG);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_ia_close (graceful) error: %s\n",
+					  module, DT_RetToString(rc));
+			rc = dat_ia_close(ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+			if (rc != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_ia_close (abrupt) error: %s\n",
+						  module, DT_RetToString(rc));
+			}
+			/* keep going */
+		} else {
+			DT_Tdep_PT_Debug(1,
+					 (phead, "%s: IA %s closed\n", module,
+					  dapl_name));
+		}
+	}
+
+	/* Free the Per_Test_Data */
+	DT_Mdep_LockDestroy(&pt_ptr->Thread_counter_lock);
+	DT_PrintMemList(pt_ptr);	/* check if we return all space allocated  */
+	DT_Mdep_LockDestroy(&pt_ptr->MemListLock);
+	DT_Free_Per_Test_Data(pt_ptr);
+
+	DT_Tdep_PT_Printf(phead,
+			  "%s: ========== End of Work -- Client Exiting\n",
+			  module);
+	return ret;
+}
diff --git a/test/dapltest/test/dapl_client_info.c b/test/dapltest/test/dapl_client_info.c
new file mode 100644
index 0000000..f060bbc
--- /dev/null
+++ b/test/dapltest/test/dapl_client_info.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_Client_Info_Endian(Client_Info_t * client_info)
+{
+	client_info->dapltest_version =
+	    DT_Endian32(client_info->dapltest_version);
+	client_info->is_little_endian =
+	    DT_Endian32(client_info->is_little_endian);
+	client_info->test_type = DT_Endian32(client_info->test_type);
+	client_info->total_threads = DT_Endian32(client_info->total_threads);
+}
+
+void
+DT_Client_Info_Print(DT_Tdep_Print_Head * phead, Client_Info_t * client_info)
+{
+	DT_Tdep_PT_Printf(phead, "-------------------------------------\n");
+	DT_Tdep_PT_Printf(phead,
+			  "Client_Info.dapltest_version   : %d\n",
+			  client_info->dapltest_version);
+	DT_Tdep_PT_Printf(phead,
+			  "Client_Info.is_little_endian   : %d\n",
+			  client_info->is_little_endian);
+	DT_Tdep_PT_Printf(phead,
+			  "Client_Info.test_type          : %d\n",
+			  client_info->test_type);
+}
diff --git a/test/dapltest/test/dapl_cnxn.c b/test/dapltest/test/dapl_cnxn.c
new file mode 100644
index 0000000..36d538c
--- /dev/null
+++ b/test/dapltest/test/dapl_cnxn.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/****************************************************************************/
+int get_ep_connection_state(DT_Tdep_Print_Head * phead, DAT_EP_HANDLE ep_handle)
+{
+	DAT_EP_STATE ep_state;
+	DAT_BOOLEAN in_dto_idle;
+	DAT_BOOLEAN out_dto_idle;
+	DAT_RETURN ret;
+	char *recv_status = "Idle";
+	char *req_status = "Idle";
+
+	ret = dat_ep_get_status(ep_handle, &ep_state, &in_dto_idle,
+				&out_dto_idle);
+	if (ret != 0) {
+		DT_Tdep_PT_Printf(phead,
+				  "DAT_ERROR: Can't get Connection State %s\n",
+				  DT_RetToString(ret));
+	} else {
+		if (in_dto_idle == 0) {
+			recv_status = "Active";
+		}
+		if (out_dto_idle == 0) {
+			req_status = "Active";
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "DAT_STATE: %s\n", DT_State2Str(ep_state));
+		DT_Tdep_PT_Printf(phead,
+				  "DAT_STATE: Inbound DTO Status: %s \n",
+				  recv_status);
+		DT_Tdep_PT_Printf(phead,
+				  "DAT_STATE: Outbound DTO Status: %s\n",
+				  req_status);
+	}
+
+	return 0;
+}
diff --git a/test/dapltest/test/dapl_execute.c b/test/dapltest/test/dapl_execute.c
new file mode 100644
index 0000000..c117b2a
--- /dev/null
+++ b/test/dapltest/test/dapl_execute.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#include "dapl_transaction_cmd.h"
+#include "dapl_performance_cmd.h"
+#include "dapl_quit_cmd.h"
+#include "dapl_limit_cmd.h"
+
+DAT_RETURN DT_Execute_Test(Params_t * params_ptr)
+{
+	DAT_RETURN rc = DAT_SUCCESS;
+	Transaction_Cmd_t *Transaction_Cmd;
+	Quit_Cmd_t *Quit_Cmd;
+	Limit_Cmd_t *Limit_Cmd;
+	Performance_Cmd_t *Performance_Cmd;
+	FFT_Cmd_t *FFT_Cmd;
+
+	/* re init global data - for kdapltest, we are now in the kernel */
+	DT_local_is_little_endian = params_ptr->local_is_little_endian;
+	DT_dapltest_debug = params_ptr->debug;
+
+	switch (params_ptr->test_type) {
+	case SERVER_TEST:
+		{
+			DT_cs_Server(params_ptr);
+			break;
+		}
+	case TRANSACTION_TEST:
+		{
+			Transaction_Cmd = &params_ptr->u.Transaction_Cmd;
+			rc = DT_cs_Client(params_ptr,
+					  Transaction_Cmd->dapl_name,
+					  Transaction_Cmd->server_name,
+					  Transaction_Cmd->num_threads *
+					  Transaction_Cmd->eps_per_thread);
+			break;
+		}
+	case QUIT_TEST:
+		{
+			Quit_Cmd = &params_ptr->u.Quit_Cmd;
+			(void)DT_cs_Client(params_ptr,
+					   Quit_Cmd->device_name,
+					   Quit_Cmd->server_name, 0);
+			break;
+		}
+	case LIMIT_TEST:
+		{
+			Limit_Cmd = &params_ptr->u.Limit_Cmd;
+			rc = DT_cs_Limit(params_ptr, Limit_Cmd);
+			break;
+		}
+	case PERFORMANCE_TEST:
+		{
+			Performance_Cmd = &params_ptr->u.Performance_Cmd;
+			rc = DT_cs_Client(params_ptr,
+					  Performance_Cmd->dapl_name,
+					  Performance_Cmd->server_name, 1);
+			break;
+		}
+
+	case FFT_TEST:
+		{
+			FFT_Cmd = &params_ptr->u.FFT_Cmd;
+			rc = DT_cs_FFT(params_ptr, FFT_Cmd);
+			break;
+		}
+	}
+	return rc;
+}
diff --git a/test/dapltest/test/dapl_fft_connmgt.c b/test/dapltest/test/dapl_fft_connmgt.c
new file mode 100644
index 0000000..c1c9e60
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_connmgt.c
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+int DT_connmgt_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	FFT_Connection_t conn;
+	int res = 1;
+	DAT_RETURN rc = 0;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Ensure time in dat_evd_wait works correctly\n");
+
+	DT_fft_init_server(params_ptr, cmd, &conn);
+	DT_assert(phead, NULL != conn.ia_handle);
+	rc = DT_Tdep_evd_wait(conn.cr_evd, 10000, &conn.event);
+	DT_assert_dat(phead, DAT_GET_TYPE(rc) == DAT_TIMEOUT_EXPIRED);
+
+      cleanup:
+	rc = DT_fft_destroy_conn_struct(params_ptr, &conn);
+	DT_assert_clean(phead, rc == DAT_SUCCESS);
+
+	return res;
+}
+
+int DT_connmgt_case1(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	FFT_Connection_t conn;
+	int res = 1;
+	DAT_RETURN rc;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Attempt to use timeout of 0 in dat_evd_wait\n");
+
+	DT_fft_init_server(params_ptr, cmd, &conn);
+	DT_assert(phead, NULL != conn.ia_handle);
+
+	rc = DT_Tdep_evd_wait(conn.cr_evd, 0, &conn.event);
+	DT_assert_dat(phead, DAT_GET_TYPE(rc) == DAT_TIMEOUT_EXPIRED);
+
+      cleanup:
+	rc = DT_fft_destroy_conn_struct(params_ptr, &conn);
+	DT_assert_clean(phead, rc == DAT_SUCCESS);
+	return res;
+
+}
+
+void DT_connmgt_test(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	int i;
+	int res;
+	DT_Tdep_Print_Head *phead;
+	FFT_Testfunc_t cases_func[] = {
+		{DT_connmgt_case0},
+		{DT_connmgt_case1},
+	};
+	phead = params_ptr->phead;
+	for (i = 0; i < cmd->size; i++) {
+		if (cmd->cases_flag[i]) {
+			if (cmd->cases_flag[i]) {
+
+				DT_Tdep_PT_Printf(phead, "\
+		    *********************************************************************\n");
+				DT_Tdep_PT_Printf(phead, "\
+		    Function feature: Connect Management (Server side)     case: %d\n", i);
+				res = cases_func[i].fun(params_ptr, cmd);
+				if (res == 1) {
+					DT_Tdep_PT_Printf(phead,
+							  "Result: PASS\n");
+				} else if (res == 0) {
+					DT_Tdep_PT_Printf(phead,
+							  "Result: FAIL\n");
+				} else if (res == -1) {
+					DT_Tdep_PT_Printf(phead,
+							  "Result: use other test tool\n");
+				} else if (res == -2) {
+					DT_Tdep_PT_Printf(phead,
+							  "Result: not support or next stage to develop\n");
+				}
+
+				DT_Tdep_PT_Printf(phead, "\
+		    *********************************************************************\n");
+			}
+		}
+	}
+}
diff --git a/test/dapltest/test/dapl_fft_endpoint.c b/test/dapltest/test/dapl_fft_endpoint.c
new file mode 100644
index 0000000..81e2c98
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_endpoint.c
@@ -0,0 +1,264 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define CQENTRYCOUNT 100
+#define BUFFSIZE 1024
+#define DEFAULT_QUEUE_LEN 10
+
+int DT_endpoint_generic(Params_t * params_ptr,
+			FFT_Cmd_t * cmd, bool destroy_pz_early)
+{
+	char *dev_name;
+	DAT_IA_HANDLE ia_handle;
+	DAT_PZ_HANDLE pz_handle;
+	DAT_EP_HANDLE ep_handle;
+	DAT_EVD_HANDLE evd_handle;
+	DAT_EVD_HANDLE conn_evd_handle;
+	DAT_EVD_HANDLE send_evd_handle;
+	DAT_EVD_HANDLE recv_evd_handle;
+	DAT_RETURN rc, wanted;
+	int res;
+	DT_Tdep_Print_Head *phead;
+
+	res = 1;
+	ia_handle = NULL;
+	pz_handle = NULL;
+	ep_handle = NULL;
+	evd_handle = NULL;
+	conn_evd_handle = NULL;
+	send_evd_handle = NULL;
+	recv_evd_handle = NULL;
+	dev_name = cmd->device_name;
+	evd_handle = DAT_HANDLE_NULL;
+	phead = params_ptr->phead;
+
+	rc = dat_ia_open((const DAT_NAME_PTR)dev_name,
+			 DEFAULT_QUEUE_LEN, &evd_handle, &ia_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = dat_pz_create(ia_handle, &pz_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	if (destroy_pz_early) {
+		if (pz_handle) {
+			rc = dat_pz_free(pz_handle);
+			DT_assert_dat(phead, rc == DAT_SUCCESS);
+		}
+	}
+
+	rc = DT_Tdep_evd_create(ia_handle, DEFAULT_QUEUE_LEN, NULL,
+				DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG,
+				&send_evd_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = DT_Tdep_evd_create(ia_handle, DEFAULT_QUEUE_LEN, NULL,
+				DAT_EVD_DTO_FLAG, &recv_evd_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = DT_Tdep_evd_create(ia_handle, DEFAULT_QUEUE_LEN, NULL,
+				DAT_EVD_CONNECTION_FLAG, &conn_evd_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = dat_ep_create(ia_handle, pz_handle, recv_evd_handle,
+			   send_evd_handle, conn_evd_handle, NULL, &ep_handle);
+	if (destroy_pz_early) {
+		wanted = DAT_INVALID_HANDLE;
+	} else {
+		wanted = DAT_SUCCESS;
+	}
+	DT_assert_dat(phead, DAT_GET_TYPE(rc) == wanted);
+
+      cleanup:
+	if (ep_handle) {
+		rc = dat_ep_free(ep_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (send_evd_handle) {
+		rc = DT_Tdep_evd_free(send_evd_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (recv_evd_handle) {
+		rc = DT_Tdep_evd_free(recv_evd_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (conn_evd_handle) {
+		rc = DT_Tdep_evd_free(conn_evd_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (!destroy_pz_early && pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (ia_handle) {
+		rc = dat_ia_close(ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	return res;
+}
+
+int DT_endpoint_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Test if we can normally create endpoint and destory it.\n");
+	DT_Tdep_PT_Printf(phead, "\
+	The endpoint is not associated with a CQ\n");
+	return DT_endpoint_generic(params_ptr, cmd, false);	/* destroy pz early */
+}
+
+int DT_endpoint_case1(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: try to create endpoint with pz already destroyed\n");
+	return DT_endpoint_generic(params_ptr, cmd, true);	/* destroy pz early */
+}
+
+int DT_endpoint_case2(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	char *dev_name;
+	DAT_IA_HANDLE ia_handle;
+	DAT_EP_HANDLE ep_handle;
+	DAT_EVD_HANDLE send_evd, conn_evd, recv_evd, cr_evd;
+	DAT_PZ_HANDLE pz_handle;
+	DAT_EVENT event;
+	Bpool *bpool;
+	int res;
+	DAT_RETURN rc;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: try to destroy ep with descriptor still in working queue\n");
+	res = 1;
+	bpool = 0;
+	pz_handle = 0;
+	ia_handle = 0;
+	ep_handle = 0;
+	send_evd = 0;
+	conn_evd = 0;
+	recv_evd = 0;
+	cr_evd = 0;
+	dev_name = cmd->device_name;
+
+	rc = DT_ia_open(dev_name, &ia_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+	rc = dat_pz_create(ia_handle, &pz_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+	rc = DT_ep_create(params_ptr,
+			  ia_handle,
+			  pz_handle,
+			  &cr_evd, &conn_evd, &send_evd, &recv_evd, &ep_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+	bpool =
+	    DT_BpoolAlloc(0, phead, ia_handle, pz_handle, NULL, NULL, 4096, 1,
+			  DAT_OPTIMAL_ALIGNMENT, false, false);
+	DT_assert(phead, bpool != 0);
+	DT_assert(phead, DT_post_recv_buffer(phead,
+					     ep_handle,
+					     bpool, 0, 4096) == true);
+	if (ep_handle) {
+		rc = dat_ep_free(ep_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+	}
+
+	/*
+	 * Remove all DTOs. The disconnect above may have
+	 * flushed all posted operations, so this is just a
+	 * clean up.
+	 */
+	do {
+		rc = DT_Tdep_evd_dequeue(recv_evd, &event);
+	} while (rc == DAT_SUCCESS);
+      cleanup:
+	if (bpool) {
+		rc = DT_Bpool_Destroy(0, phead, bpool);
+		DT_assert_clean(phead, rc != false);
+	}
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (ia_handle) {
+		rc = dat_ia_close(ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	return res;
+
+}
+
+/*-------------------------------------------------------------*/
+void DT_endpoint_test(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	int i;
+	int res;
+	DT_Tdep_Print_Head *phead;
+	FFT_Testfunc_t cases_func[] = {
+		{DT_endpoint_case0},
+		{DT_endpoint_case1},
+		{DT_endpoint_case2},
+	};
+
+	phead = params_ptr->phead;
+	for (i = 0; i < cmd->size; i++) {
+		if (cmd->cases_flag[i]) {
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+			DT_Tdep_PT_Printf(phead, "\
+		Function feature: EndPoint management           case: %d\n", i);
+			res = cases_func[i].fun(params_ptr, cmd);
+			if (res == 1) {
+				DT_Tdep_PT_Printf(phead, "Result: PASS\n");
+			} else if (res == 0) {
+				DT_Tdep_PT_Printf(phead, "Result: FAIL\n");
+			} else if (res == -1) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: use other test tool\n");
+			} else if (res == -2) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: not support or next stage to develop\n");
+			}
+
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+		}
+	}
+	return;
+}
diff --git a/test/dapltest/test/dapl_fft_hwconn.c b/test/dapltest/test/dapl_fft_hwconn.c
new file mode 100644
index 0000000..ccde733
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_hwconn.c
@@ -0,0 +1,217 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/*--------------------------------------------------------*/
+int DT_hwconn_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	char *dev_name;
+	DAT_IA_HANDLE nic_handle;
+	DAT_EVD_HANDLE evd_handle;
+	DAT_RETURN rc;
+	int res = 1;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Test if we can normally Open NIC and then close it\n");
+
+	dev_name = cmd->device_name;
+	nic_handle = 0;
+	evd_handle = DAT_HANDLE_NULL;
+
+	rc = dat_ia_open((const DAT_NAME_PTR)dev_name, 10, &evd_handle,
+			 &nic_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = dat_ia_close(nic_handle, DAT_CLOSE_ABRUPT_FLAG);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+      cleanup:
+
+	return res;
+}
+
+/*--------------------------------------------------------*/
+int DT_hwconn_case1(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DAT_IA_HANDLE nic_handle;
+	DAT_RETURN rc;
+	DAT_EVD_HANDLE evd_handle;
+	char dev_name[100];
+	int i;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead,
+			  "Description: try to open NIC with incorrect device name\n");
+	DT_Tdep_PT_Printf(phead,
+			  " (just num, one letter, multiple letter, num_letter\n");
+	DT_Tdep_PT_Printf(phead,
+			  "letter_num). You alse can do this test manually\n");
+	DT_Tdep_PT_Printf(phead,
+			  "dapltest -T F -D <device_name> -f hwconn <case>\n");
+
+	for (i = 0; i < 5; i++) {
+		if (i == 0) {
+			sprintf(dev_name, "%s", "40");	/* just number */
+		} else if (i == 1) {
+			sprintf(dev_name, "%s", "x");	/* just letter */
+		} else if (i == 2) {
+			sprintf(dev_name, "%s", "xsdf");	/* multiple letter */
+		} else if (i == 3) {
+			sprintf(dev_name, "%s", "x34");	/* letter_number */
+		} else if (i == 4) {
+			sprintf(dev_name, "%s", "34df");	/* number_letter */
+		}
+
+		evd_handle = DAT_HANDLE_NULL;
+		rc = dat_ia_open((const DAT_NAME_PTR)dev_name, 10, &evd_handle,
+				 &nic_handle);
+		if (DAT_GET_TYPE(rc) != DAT_PROVIDER_NOT_FOUND) {
+			const char *major_msg, *minor_msg;
+
+			DT_Tdep_PT_Printf(phead, " \
+		fff not get expected result when open NIC with device name: %s\n", dev_name);
+			dat_strerror(rc, &major_msg, &minor_msg);
+			DT_Tdep_PT_Printf(phead, "ERROR: %s (%s)\n", major_msg,
+					  minor_msg);
+
+			if (rc == DAT_SUCCESS) {
+				rc = dat_ia_close(nic_handle,
+						  DAT_CLOSE_ABRUPT_FLAG);
+				DT_assert_clean(phead, rc == DAT_SUCCESS);
+			}
+			return 0;
+		}
+	}
+	return 1;
+}
+
+/*--------------------------------------------------------*/
+int DT_hwconn_case2(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DAT_IA_HANDLE nic_handle;
+	DAT_RETURN rc;
+	int res = 1;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Try to close nic with Nic handle is null (NIC not open)\n");
+	nic_handle = 0;
+	rc = dat_ia_close(nic_handle, DAT_CLOSE_ABRUPT_FLAG);
+	DT_assert_dat(phead, DAT_GET_TYPE(rc) == DAT_INVALID_HANDLE);
+
+      cleanup:
+	return res;
+}
+
+/*--------------------------------------------------------*/
+int DT_hwconn_case3(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	FFT_Connection_t conn;
+	DAT_RETURN rc;
+	int res;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Test if we can close NIC when the created \n");
+	DT_Tdep_PT_Printf(phead, "endpoint has not been destroyed.\n");
+	DT_Tdep_PT_Printf(phead,
+			  "The problem for this case is that once the hca is closed, \n");
+	DT_Tdep_PT_Printf(phead,
+			  "there is no way to destroy the endpoint's resources\n");
+	DT_Tdep_PT_Printf(phead,
+			  "thus the test leaks a small amount of memory\n");
+
+	res = 1;
+
+	DT_fft_init_client(params_ptr, cmd, &conn);
+
+	/* try to close nic when vi have not destroyed */
+	if (conn.ia_handle) {
+		rc = dat_ia_close(conn.ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		if (rc != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Warning: dat_ia_close fails %s, reboot for cleanup\n",
+					  DT_RetToString(rc));
+			return 0;
+		}
+	} else {
+		res = 0;
+	}
+	/* if nic is closed, it is impossible to destory vi and ptag */
+	//DT_fft_destroy_conn_struct(&conn);
+	return res;
+
+}
+
+/*-------------------------------------------------------------*/
+void DT_hwconn_test(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	int i;
+	int res;
+	DT_Tdep_Print_Head *phead;
+
+	FFT_Testfunc_t cases_func[] = {
+		{DT_hwconn_case0},
+		{DT_hwconn_case1},
+		{DT_hwconn_case2},
+		{DT_hwconn_case3},
+	};
+
+	phead = params_ptr->phead;
+	for (i = 0; i < cmd->size; i++) {
+		if (cmd->cases_flag[i]) {
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+			DT_Tdep_PT_Printf(phead, "\
+		Function feature: Hardware connection        case: %d\n", i);
+			res = cases_func[i].fun(params_ptr, cmd);
+			if (res == 1) {
+				DT_Tdep_PT_Printf(phead, "Result: PASS\n");
+			} else if (res == 0) {
+				DT_Tdep_PT_Printf(phead, "Result: FAIL\n");
+			} else if (res == -1) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: use other test tool\n");
+			} else if (res == -2) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: next stage to develop\n");
+			}
+
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+		}
+	}
+	return;
+}
diff --git a/test/dapltest/test/dapl_fft_mem.c b/test/dapltest/test/dapl_fft_mem.c
new file mode 100644
index 0000000..4a89d4e
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_mem.c
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define CQENTRYCOUNT 100
+#define BUFFSIZE 1024
+
+/*--------------------------------------------------------*/
+int DT_mem_generic(Params_t * params_ptr, FFT_Cmd_t * cmd, int flag)
+{
+	DAT_RETURN rc, expect;
+	FFT_Connection_t conn;
+	DAT_REGION_DESCRIPTION region;
+	DAT_VLEN reg_size;
+	DAT_LMR_HANDLE lmr_handle;
+	DAT_LMR_CONTEXT lmr_context;
+	DAT_VADDR reg_addr;
+	unsigned char *alloc_ptr;
+	int res;
+	DAT_VLEN buffer_size;
+	DAT_IA_HANDLE ia_handle;
+	DAT_PZ_HANDLE pz_handle;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	rc = 0;
+	expect = 0;
+	res = 1;
+	lmr_handle = 0;
+	lmr_context = 0;
+	reg_addr = 0;
+	alloc_ptr = 0;
+	ia_handle = 0;
+	pz_handle = 0;
+
+	DT_fft_init_client(params_ptr, cmd, &conn);
+	DT_assert(phead, NULL != conn.ia_handle);
+
+	if (flag == 2) {
+		buffer_size = 0;
+		alloc_ptr = 0;
+	} else {
+		buffer_size = BUFFSIZE * sizeof(unsigned char);
+		alloc_ptr =
+		    (unsigned char *)DT_Mdep_Malloc((size_t) buffer_size);
+		DT_assert(phead, alloc_ptr);
+	}
+
+	memset(&region, 0, sizeof(region));
+	region.for_va = alloc_ptr;
+
+	ia_handle = conn.ia_handle;
+
+	if (flag != 3) {
+		pz_handle = conn.pz_handle;
+	}
+
+	if (flag != 4) {
+		DT_Tdep_PT_Printf(phead, "Registering memory\n");
+		rc = DT_Tdep_lmr_create(ia_handle, DAT_MEM_TYPE_VIRTUAL, region, buffer_size, conn.pz_handle, DAT_MEM_PRIV_ALL_FLAG, &lmr_handle, &lmr_context, NULL,	/* FIXME */
+					&reg_size, &reg_addr);
+		if (flag == 2) {
+			expect = DAT_LENGTH_ERROR;
+		} else {
+			expect = DAT_SUCCESS;
+		}
+		DT_assert_dat(phead, DAT_GET_TYPE(rc) == expect);
+	}
+	if (flag == 1) {
+		if (lmr_handle) {
+			rc = dat_lmr_free(lmr_handle);
+			DT_assert_dat(phead, rc == DAT_SUCCESS);
+		}
+		lmr_handle = 0;
+
+		rc = DT_Tdep_lmr_create(conn.ia_handle, DAT_MEM_TYPE_VIRTUAL, region, buffer_size, conn.pz_handle, DAT_MEM_PRIV_ALL_FLAG, &lmr_handle, &lmr_context, NULL,	/* FIXME */
+					&reg_size, &reg_addr);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+	}
+
+      cleanup:
+	if (lmr_handle) {
+		rc = dat_lmr_free(lmr_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (alloc_ptr) {
+		DT_Mdep_Free(alloc_ptr);
+	}
+	rc = DT_fft_destroy_conn_struct(params_ptr, &conn);
+	DT_assert_clean(phead, rc == DAT_SUCCESS);
+
+	return res;
+
+}
+
+int DT_mem_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Test if we can register typical size of memory\n");
+	DT_Tdep_PT_Printf(phead, "\
+	then deregister it.\n");
+	return DT_mem_generic(params_ptr, cmd, 0);
+}
+
+/*--------------------------------------------------------*/
+int DT_mem_case1(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Test if we can register typical size of memory\n");
+	DT_Tdep_PT_Printf(phead, "\
+	deregister, then register it again.\n");
+	return DT_mem_generic(params_ptr, cmd, 1);
+}
+
+/*--------------------------------------------------------*/
+int DT_mem_case2(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Try to register memory with memory size 0\n");
+	return DT_mem_generic(params_ptr, cmd, 2);
+}
+
+/*--------------------------------------------------------*/
+int DT_mem_case3(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Try to register memory with null pz\n");
+	return DT_mem_generic(params_ptr, cmd, 3);
+}
+
+/*--------------------------------------------------------*/
+int DT_mem_case4(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Try to deregister memory with null lmr_handle\n");
+	return DT_mem_generic(params_ptr, cmd, 4);
+}
+
+/*-------------------------------------------------------------*/
+void DT_mem_test(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	int i;
+	int res;
+	DT_Tdep_Print_Head *phead;
+
+	FFT_Testfunc_t cases_func[] = {
+		{DT_mem_case0},
+		{DT_mem_case1},
+		{DT_mem_case2},
+		{DT_mem_case3},
+		{DT_mem_case4},
+	};
+
+	phead = params_ptr->phead;
+	for (i = 0; i < cmd->size; i++) {
+		if (cmd->cases_flag[i]) {
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+			DT_Tdep_PT_Printf(phead, "\
+		Function feature: Memory register/deregister       case: %d\n", i);
+			res = cases_func[i].fun(params_ptr, cmd);
+			if (res == 1) {
+				DT_Tdep_PT_Printf(phead, "Result: PASS\n");
+			} else if (res == 0) {
+				DT_Tdep_PT_Printf(phead, "Result: FAIL\n");
+			} else if (res == -1) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: use other test tool\n");
+			} else if (res == -2) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: not support or next stage to develop\n");
+			}
+
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+		}
+	}
+	return;
+}
diff --git a/test/dapltest/test/dapl_fft_pz.c b/test/dapltest/test/dapl_fft_pz.c
new file mode 100644
index 0000000..77f818b
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_pz.c
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define CQENTRYCOUNT 100
+#define BUFFSIZE 1024
+
+/*--------------------------------------------------------*/
+int DT_pz_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	char *dev_name;
+	DAT_IA_HANDLE ia_handle;
+	DAT_PZ_HANDLE pz_handle;
+	DAT_EVD_HANDLE evd_handle;
+	DAT_RETURN rc;
+	int res;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead, "\
+	Description: Test if we can normally create pz and destroy it.\n");
+
+	res = 1;
+	ia_handle = 0;
+	pz_handle = 0;
+	evd_handle = DAT_HANDLE_NULL;
+	dev_name = cmd->device_name;
+
+	rc = DT_ia_open(dev_name, &ia_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+	rc = dat_pz_create(ia_handle, &pz_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+      cleanup:
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+	}
+	if (ia_handle) {
+		rc = dat_ia_close(ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+	}
+	return res;
+}
+
+/*--------------------------------------------------------*/
+int DT_pz_case1(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	char *dev_name;
+	DAT_IA_HANDLE ia_handle;
+	DAT_PZ_HANDLE pz_handle;
+	DAT_EP_HANDLE ep_handle;
+	DAT_EVD_HANDLE conn_evd, send_evd, recv_evd, cr_evd;
+	DAT_RETURN rc;
+	int res;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead, "\
+	Description: try to destroy pz with vi still associated with it\n");
+
+	res = 1;
+	ia_handle = 0;
+	pz_handle = 0;
+	ep_handle = 0;
+	conn_evd = 0;
+	send_evd = 0;
+	recv_evd = 0;
+	cr_evd = 0;
+	dev_name = cmd->device_name;
+
+	rc = DT_ia_open(dev_name, &ia_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = dat_pz_create(ia_handle, &pz_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = DT_ep_create(params_ptr,
+			  ia_handle,
+			  pz_handle,
+			  &cr_evd, &conn_evd, &send_evd, &recv_evd, &ep_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_dat(phead, DAT_GET_TYPE(rc) == DAT_INVALID_STATE);
+	}
+
+      cleanup:
+	/* corrrect order */
+	if (ep_handle) {
+		rc = dat_ep_free(ep_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn_evd) {
+		rc = DT_Tdep_evd_free(conn_evd);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (send_evd) {
+		rc = DT_Tdep_evd_free(send_evd);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (recv_evd) {
+		rc = DT_Tdep_evd_free(recv_evd);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (ia_handle) {
+		rc = dat_ia_close(ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	return res;
+}
+
+/*--------------------------------------------------------*/
+int DT_pz_case2(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	char *dev_name;
+	DAT_IA_HANDLE ia_handle;
+	DAT_PZ_HANDLE pz_handle;
+	Bpool *bpool;
+	DAT_RETURN rc;
+	int res;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	DT_Tdep_PT_Printf(phead, "\
+	Description: try to destroy pz with registered memory still\n");
+	DT_Tdep_PT_Printf(phead, "\
+	associated with it\n");
+
+	res = 1;
+	ia_handle = 0;
+	pz_handle = 0;
+	bpool = 0;
+	dev_name = cmd->device_name;
+
+	rc = DT_ia_open(dev_name, &ia_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	rc = dat_pz_create(ia_handle, &pz_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* allocate and register bpool */
+	bpool = DT_BpoolAlloc(0, phead, ia_handle, pz_handle, NULL,
+			      NULL, BUFFSIZE, 1, DAT_OPTIMAL_ALIGNMENT,
+			      false, false);
+	DT_assert(phead, bpool != 0);
+
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_dat(phead, DAT_GET_TYPE(rc) == DAT_INVALID_STATE);
+	}
+
+      cleanup:
+
+	/* deregister and free bpool */
+	if (DT_Bpool_Destroy(0, phead, bpool) == false) {
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: Destroy bpool fails, reboot for cleanup\n");
+		return 0;
+	}
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (ia_handle) {
+		rc = dat_ia_close(ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	return res;
+}
+
+/*-------------------------------------------------------------*/
+void DT_pz_test(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	int i;
+	int res;
+	DT_Tdep_Print_Head *phead;
+
+	FFT_Testfunc_t cases_func[] = {
+		{DT_pz_case0},
+		{DT_pz_case1},
+		{DT_pz_case2},
+	};
+
+	phead = params_ptr->phead;
+	for (i = 0; i < cmd->size; i++) {
+		if (cmd->cases_flag[i]) {
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+			DT_Tdep_PT_Printf(phead, "\
+		Function feature: Protection Zone management         case: %d\n", i);
+			res = cases_func[i].fun(params_ptr, cmd);
+			if (res == 1) {
+				DT_Tdep_PT_Printf(phead, "Result: PASS\n");
+			} else if (res == 0) {
+				DT_Tdep_PT_Printf(phead, "Result: FAIL\n");
+			} else if (res == -1) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: use other test tool\n");
+			} else if (res == -2) {
+				DT_Tdep_PT_Printf(phead,
+						  "Result: not support or next stage to develop\n");
+			}
+
+			DT_Tdep_PT_Printf(phead, "\
+		*********************************************************************\n");
+		}
+	}
+	return;
+}
diff --git a/test/dapltest/test/dapl_fft_queryinfo.c b/test/dapltest/test/dapl_fft_queryinfo.c
new file mode 100644
index 0000000..5bbee36
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_queryinfo.c
@@ -0,0 +1,596 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define CQENTRYCOUNT 100
+#define BUFFSIZE 1024
+#define DEFAULT_QUEUE_LEN 10
+
+#if defined(WIN32)
+static DAT_OS_WAIT_PROXY_AGENT NULLPROXY = {
+	(DAT_PVOID) NULL, (DAT_AGENT_FUNC) NULL
+};
+#endif
+
+int DT_queryinfo_basic(Params_t * params_ptr,
+		       FFT_Cmd_t * cmd,
+		       FFT_query_enum object_to_query, DAT_RETURN result_wanted)
+{
+	char *dev_name;
+	DAT_IA_HANDLE ia_handle;
+	DAT_IA_ATTR ia_attributes;
+	DAT_PROVIDER_ATTR provider_attributes;
+	DAT_EVD_HANDLE evd_handle;
+	DAT_EVD_HANDLE conn_evd_handle;
+	DAT_EVD_HANDLE cr_evd_handle;
+	DAT_EVD_HANDLE send_evd_handle;
+	DAT_EVD_HANDLE recv_evd_handle;
+	DAT_EP_HANDLE ep_handle;
+	DAT_EP_PARAM ep_param;
+	DAT_CNO_HANDLE cno_handle;
+#ifndef __KDAPLTEST__
+	DAT_CNO_PARAM cno_param;
+#endif
+	DAT_EVD_PARAM evd_param;
+	DAT_PSP_HANDLE psp_handle;
+	DAT_PSP_PARAM psp_param;
+	DAT_RSP_HANDLE rsp_handle;
+	DAT_RSP_PARAM rsp_param;
+	DAT_PZ_HANDLE pz_handle;
+	DAT_PZ_PARAM pz_param;
+	DAT_LMR_HANDLE lmr_handle;
+	DAT_LMR_PARAM lmr_param;
+	DAT_LMR_CONTEXT lmr_context;
+	DAT_RMR_HANDLE rmr_handle;
+	DAT_RMR_PARAM rmr_param;
+	DAT_REGION_DESCRIPTION region;
+	DAT_VLEN reg_size;
+	DAT_VADDR reg_addr;
+	DAT_VLEN buffer_size;
+	unsigned char *alloc_ptr;
+	DT_Tdep_Print_Head *phead;
+
+	DAT_RETURN rc;
+	int res = 1;
+	buffer_size = BUFFSIZE * sizeof(unsigned char);
+	phead = params_ptr->phead;
+	reg_addr = 0;
+	alloc_ptr = 0;
+
+	ia_handle = NULL;
+	pz_handle = NULL;
+	ep_handle = NULL;
+	lmr_handle = NULL;
+	rmr_handle = NULL;
+	pz_handle = NULL;
+	psp_handle = NULL;
+	rsp_handle = NULL;
+	cno_handle = NULL;
+	evd_handle = DAT_HANDLE_NULL;
+	conn_evd_handle = DAT_HANDLE_NULL;
+	cr_evd_handle = DAT_HANDLE_NULL;
+	recv_evd_handle = DAT_HANDLE_NULL;
+	send_evd_handle = DAT_HANDLE_NULL;
+	dev_name = cmd->device_name;
+
+	/* All functions require an ia_handle to be created */
+	rc = dat_ia_open((const DAT_NAME_PTR)dev_name,
+			 DEFAULT_QUEUE_LEN, &evd_handle, &ia_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* These functions require a pz_handle to be created */
+	if ((object_to_query == QUERY_EVD) ||
+	    (object_to_query == QUERY_RMR) ||
+	    (object_to_query == QUERY_LMR) ||
+	    (object_to_query == QUERY_EP) ||
+	    (object_to_query == QUERY_RSP) || (object_to_query == QUERY_PZ)) {
+		rc = dat_pz_create(ia_handle, &pz_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+	}
+
+	/* These functions require a ep_handle to be created */
+	if ((object_to_query == QUERY_EP) || (object_to_query == QUERY_RSP)) {
+		rc = DT_Tdep_evd_create(ia_handle,
+					DEFAULT_QUEUE_LEN,
+					cno_handle,
+					DAT_EVD_DTO_FLAG |
+					DAT_EVD_RMR_BIND_FLAG,
+					&send_evd_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+		rc = DT_Tdep_evd_create(ia_handle,
+					DEFAULT_QUEUE_LEN,
+					cno_handle,
+					DAT_EVD_DTO_FLAG, &recv_evd_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+		rc = DT_Tdep_evd_create(ia_handle,
+					DEFAULT_QUEUE_LEN,
+					cno_handle,
+					DAT_EVD_CONNECTION_FLAG,
+					&conn_evd_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+		rc = dat_ep_create(ia_handle,
+				   pz_handle,
+				   recv_evd_handle,
+				   send_evd_handle,
+				   conn_evd_handle, NULL, &ep_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+	}
+
+	/* These functions require a CR EVD to be created.  */
+	if ((object_to_query == QUERY_PSP) || (object_to_query == QUERY_RSP)) {
+		rc = DT_Tdep_evd_create(ia_handle,
+					DEFAULT_QUEUE_LEN,
+					cno_handle,
+					DAT_EVD_CR_FLAG, &cr_evd_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+	}
+
+	/* Test dat_ia_query function */
+	if (object_to_query == QUERY_IA) {
+		if (result_wanted == DAT_SUCCESS) {
+			rc = dat_ia_query(ia_handle,
+					  &evd_handle,
+					  DAT_IA_ALL,
+					  &ia_attributes,
+					  DAT_PROVIDER_FIELD_ALL,
+					  &provider_attributes);
+		} else if (result_wanted == DAT_INVALID_PARAMETER) {
+			/*
+			 * The only way to get an invalid parameter is to
+			 * NULL out ia_attr and for the DAT_IA_ATTR_MASK to
+			 * have values
+			 */
+			rc = dat_ia_query(ia_handle,
+					  &evd_handle,
+					  DAT_IA_ALL,
+					  NULL,
+					  DAT_PROVIDER_FIELD_ALL,
+					  &provider_attributes);
+		} else if (result_wanted == DAT_INVALID_HANDLE) {
+			rc = dat_ia_query(evd_handle,
+					  &evd_handle,
+					  DAT_IA_ALL,
+					  &ia_attributes,
+					  DAT_PROVIDER_FIELD_ALL,
+					  &provider_attributes);
+		}
+	}
+
+	/* Test dat_cno_query function */
+	else if (object_to_query == QUERY_CNO) {
+
+#ifndef __KDAPLTEST__
+#if defined(WIN32)
+		rc = dat_cno_create(ia_handle, NULLPROXY, &cno_handle);
+#else
+		rc = dat_cno_create(ia_handle,
+				    DAT_OS_WAIT_PROXY_AGENT_NULL, &cno_handle);
+#endif
+
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+		if (result_wanted == DAT_SUCCESS) {
+			rc = dat_cno_query(cno_handle,
+					   DAT_CNO_FIELD_ALL, &cno_param);
+		} else if (result_wanted == DAT_INVALID_PARAMETER) {
+			rc = dat_cno_query(cno_handle, DAT_CNO_FIELD_ALL, NULL);
+		} else if (result_wanted == DAT_INVALID_HANDLE) {
+			rc = dat_cno_query(ia_handle,
+					   DAT_CNO_FIELD_ALL, &cno_param);
+		}
+#endif
+	}
+	/* Test dat_evd_query function */
+	else if (object_to_query == QUERY_EVD) {
+		if (result_wanted == DAT_SUCCESS) {
+			rc = dat_evd_query(evd_handle,
+					   DAT_EVD_FIELD_ALL, &evd_param);
+		} else if (result_wanted == DAT_INVALID_PARAMETER) {
+			rc = dat_evd_query(evd_handle, DAT_EVD_FIELD_ALL, NULL);
+		} else if (result_wanted == DAT_INVALID_HANDLE) {
+			rc = dat_evd_query(ia_handle,
+					   DAT_EVD_FIELD_ALL, &evd_param);
+		}
+	}
+
+	/* Test dat_psp_query function */
+	else if (object_to_query == QUERY_PSP) {
+		rc = dat_psp_create(ia_handle,
+				    SERVER_PORT_NUMBER,
+				    cr_evd_handle,
+				    DAT_PSP_PROVIDER_FLAG, &psp_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+		if (result_wanted == DAT_SUCCESS) {
+			rc = dat_psp_query(psp_handle,
+					   DAT_PSP_FIELD_ALL, &psp_param);
+		} else if (result_wanted == DAT_INVALID_PARAMETER) {
+			rc = dat_psp_query(psp_handle, DAT_PSP_FIELD_ALL, NULL);
+		} else if (result_wanted == DAT_INVALID_HANDLE) {
+			rc = dat_psp_query(evd_handle,
+					   DAT_PSP_FIELD_ALL, &psp_param);
+		}
+	}
+
+	/* Test dat_rsp_query function */
+	else if (object_to_query == QUERY_RSP) {
+		rc = dat_rsp_create(ia_handle,
+				    SERVER_PORT_NUMBER,
+				    ep_handle, cr_evd_handle, &rsp_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+		rc = dat_rsp_query(rsp_handle, DAT_RSP_FIELD_ALL, &rsp_param);
+	}
+
+	/* Test dat_cr_query function */
+	else if (object_to_query == QUERY_CR) {
+		/* This query is tested in the conmgt test */
+		res = -1;
+	}
+
+	/* Test dat_ep_query function */
+	else if (object_to_query == QUERY_EP) {
+		rc = dat_ep_query(ep_handle, DAT_EP_FIELD_ALL, &ep_param);
+	}
+
+	/* Test dat_pz_query function */
+	else if (object_to_query == QUERY_PZ) {
+		rc = dat_pz_query(pz_handle, DAT_PZ_FIELD_ALL, &pz_param);
+	}
+
+	/* Test dat_lmr_query function */
+	else if (object_to_query == QUERY_LMR) {
+		alloc_ptr =
+		    (unsigned char *)DT_Mdep_Malloc((size_t) buffer_size);
+		DT_assert(phead, alloc_ptr);
+		memset(&region, 0, sizeof(region));
+		region.for_va = alloc_ptr;
+		rc = DT_Tdep_lmr_create(ia_handle, DAT_MEM_TYPE_VIRTUAL, region, buffer_size, pz_handle, DAT_MEM_PRIV_ALL_FLAG, &lmr_handle, &lmr_context, NULL,	/* FIXME */
+					&reg_size, &reg_addr);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+		rc = dat_lmr_query(lmr_handle, DAT_LMR_FIELD_ALL, &lmr_param);
+	}
+
+	/* Test dat_rmr_query function */
+	else if (object_to_query == QUERY_RMR) {
+		rc = dat_rmr_create(pz_handle, &rmr_handle);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+		/* We don't bind the RMR to anything, so don't ask for the
+		 * LMR_TRIPLET flag
+		 */
+		rc = dat_rmr_query(rmr_handle,
+				   DAT_RMR_FIELD_ALL -
+				   DAT_RMR_FIELD_LMR_TRIPLET, &rmr_param);
+	}
+
+	DT_assert_dat(phead, DAT_GET_TYPE(rc) == result_wanted);
+
+      cleanup:
+	if (rsp_handle) {
+		rc = dat_rsp_free(rsp_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (ep_handle) {
+		rc = dat_ep_free(ep_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (send_evd_handle) {
+		rc = DT_Tdep_evd_free(send_evd_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (recv_evd_handle) {
+		rc = DT_Tdep_evd_free(recv_evd_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (conn_evd_handle) {
+		rc = DT_Tdep_evd_free(conn_evd_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (lmr_handle) {
+		rc = dat_lmr_free(lmr_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (rmr_handle) {
+		rc = dat_rmr_free(rmr_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+#ifndef __KDAPLTEST__
+	if (cno_handle) {
+		rc = dat_cno_free(cno_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+#endif
+	if (psp_handle) {
+		rc = dat_psp_free(psp_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (cr_evd_handle) {
+		rc = DT_Tdep_evd_free(cr_evd_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (pz_handle) {
+		rc = dat_pz_free(pz_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	if (ia_handle) {
+		rc = dat_ia_close(ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+
+	return res;
+}
+
+int DT_queryinfo_case0(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify IA Querying information is successful using\nDAT_IA_QUERY.\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_IA, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case1(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify CNO Querying information is successful using\nDAT_CNO_QUERY.\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_CNO, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case2(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify EVD Querying information is successful using\nDAT_EVD_QUERY.\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_EVD, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case3(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify PSP Querying information is successful using\nDAT_PSP_QUERY.\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_PSP, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case4(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify RSP Querying information is successful using\nDAT_RSP_QUERY.\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_RSP, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case5(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify CR Querying information is successful using\nDAT_CR_QUERY.\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_CR, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case6(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify EP Querying information is successful using\nDAT_EP_QUERY.\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_EP, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case7(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify PZ Querying information is successful using\n");
+	DT_Tdep_PT_Printf(phead, "DAT_PZ_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_PZ, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case8(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify LMR Querying information is successful using\n");
+	DT_Tdep_PT_Printf(phead, "DAT_LMR_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_LMR, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case9(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify RMR Querying information is successful using\n");
+	DT_Tdep_PT_Printf(phead, "DAT_RMR_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_RMR, DAT_SUCCESS);
+}
+
+int DT_queryinfo_case10(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify IA Querying fails with DAT_INVALID_PARAMETER when\n");
+	DT_Tdep_PT_Printf(phead, "passing a bad parameter to DAT_IA_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_IA,
+				  DAT_INVALID_PARAMETER);
+}
+
+int DT_queryinfo_case11(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify IA Querying fails with DAT_INVALID_HANDLE when\n");
+	DT_Tdep_PT_Printf(phead, "passing an invalid handle to DAT_IA_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_IA,
+				  DAT_INVALID_HANDLE);
+}
+
+int DT_queryinfo_case12(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify CNO Querying fails with DAT_INVALID_PARAMETER when\n");
+	DT_Tdep_PT_Printf(phead, "passing a bad parameter to DAT_CNO_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_CNO,
+				  DAT_INVALID_PARAMETER);
+}
+
+int DT_queryinfo_case13(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify CNO Querying fails with DAT_INVALID_HANDLE when\n");
+	DT_Tdep_PT_Printf(phead,
+			  "passing an invalid handle to DAT_CNO_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_CNO,
+				  DAT_INVALID_HANDLE);
+}
+
+int DT_queryinfo_case14(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify EVD Querying fails with DAT_INVALID_PARAMETER when\n");
+	DT_Tdep_PT_Printf(phead, "passing a bad parameter to DAT_EVD_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_EVD,
+				  DAT_INVALID_PARAMETER);
+}
+
+int DT_queryinfo_case15(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify EVD Querying fails with DAT_INVALID_HANDLE when\n");
+	DT_Tdep_PT_Printf(phead,
+			  "passing an invalid handle to DAT_EVD_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_EVD,
+				  DAT_INVALID_HANDLE);
+}
+
+int DT_queryinfo_case16(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify PSP Querying fails with DAT_INVALID_PARAMETER when\n");
+	DT_Tdep_PT_Printf(phead, "passing a bad parameter to DAT_PSP_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_PSP,
+				  DAT_INVALID_PARAMETER);
+}
+
+int DT_queryinfo_case17(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+	DT_Tdep_PT_Printf(phead,
+			  "Description: Verify PSP Querying fails with DAT_INVALID_HANDLE when\n");
+	DT_Tdep_PT_Printf(phead,
+			  "passing an invalid handle to DAT_PSP_QUERY\n");
+	return DT_queryinfo_basic(params_ptr, cmd, QUERY_PSP,
+				  DAT_INVALID_HANDLE);
+}
+
+/*-------------------------------------------------------------*/
+void DT_queryinfo_test(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	int i;
+	int res;
+	DT_Tdep_Print_Head *phead;
+	FFT_Testfunc_t cases_func[] = {
+		{DT_queryinfo_case0},
+		{DT_queryinfo_case1},
+		{DT_queryinfo_case2},
+		{DT_queryinfo_case3},
+		{DT_queryinfo_case4},
+		{DT_queryinfo_case5},
+		{DT_queryinfo_case6},
+		{DT_queryinfo_case7},
+		{DT_queryinfo_case8},
+		{DT_queryinfo_case9},
+		{DT_queryinfo_case10},
+		{DT_queryinfo_case11},
+#ifndef __KDAPLTEST__
+		{DT_queryinfo_case12},
+		{DT_queryinfo_case13},
+#endif
+		{DT_queryinfo_case14},
+		{DT_queryinfo_case15},
+		{DT_queryinfo_case16},
+		{DT_queryinfo_case17},
+	};
+
+	phead = params_ptr->phead;
+	for (i = 0; i < cmd->size; i++) {
+		if (cmd->cases_flag[i]) {
+			DT_Tdep_PT_Printf(phead,
+					  "*********************************************************************\n");
+			DT_Tdep_PT_Printf(phead,
+					  "Function feature: Queryinfo                                  case: %d\n",
+					  i);
+			res = cases_func[i].fun(params_ptr, cmd);
+			if (res == 1) {
+				DT_Tdep_PT_Printf(phead, "Result: PASS\n");
+			} else if (res == 0) {
+				DT_Tdep_PT_Printf(phead, "Result: FAIL\n");
+			} else if (res == -1) {
+				DT_Tdep_PT_Printf(phead, "Result: UNSUPP\n");
+			}
+
+			DT_Tdep_PT_Printf(phead,
+					  "*********************************************************************\n");
+		}
+	}
+	return;
+}
diff --git a/test/dapltest/test/dapl_fft_test.c b/test/dapltest/test/dapl_fft_test.c
new file mode 100644
index 0000000..1ef1a87
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_test.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+DAT_RETURN DT_cs_FFT(Params_t * params_ptr, FFT_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	DAT_RETURN rc = DAT_SUCCESS;
+
+	phead = params_ptr->phead;
+
+	switch (cmd->fft_type) {
+	case HWCONN:
+		{
+			DT_hwconn_test(params_ptr, cmd);
+			break;
+		}
+	case ENDPOINT:
+		{
+			DT_endpoint_test(params_ptr, cmd);
+			break;
+		}
+	case PTAGMGT:
+		{
+			DT_pz_test(params_ptr, cmd);
+			break;
+		}
+	case MEMMGT:
+		{
+			DT_mem_test(params_ptr, cmd);
+			break;
+		}
+	case CONNMGT:
+		{
+			DT_connmgt_test(params_ptr, cmd);
+			break;
+		}
+	case QUERYINFO:
+		{
+			DT_queryinfo_test(params_ptr, cmd);
+			break;
+		}
+#if 0				// not yet implemented
+	case CONNMGT_CLIENT:
+	case NS:
+	case ERRHAND:
+	case UNSUPP:
+	case STRESS:
+	case STRESS_CLIENT:
+	case CQMGT:
+		{
+			DT_Tdep_PT_Printf(phead, "Not Yet Implemented\n");
+			break;
+		}
+#endif
+	default:
+		{
+			DT_Tdep_PT_Printf(phead, "don't know this test\n");
+			rc = DAT_INVALID_PARAMETER;
+			break;
+		}
+	}
+	return rc;
+}
diff --git a/test/dapltest/test/dapl_fft_util.c b/test/dapltest/test/dapl_fft_util.c
new file mode 100644
index 0000000..eeb3299
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_util.c
@@ -0,0 +1,360 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define DEFAULT_QUEUE_LEN 10
+
+/* function that is called when an assertion fails, printing out the line
+ * that failed vi DT_Tdep_PT_Printf
+ */
+void DT_assert_fail(DT_Tdep_Print_Head * phead, char *exp, char *file,
+		    char *baseFile, int line)
+{
+	if (!strcmp(file, baseFile)) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s failed in file %s, line %d\n",
+				  exp, file, line);
+	} else {
+		DT_Tdep_PT_Printf(phead,
+				  "%s failed in file %s (included from %s), line %d\n",
+				  exp, file, baseFile, line);
+	}
+}
+
+/* helper function to open an IA */
+int DT_ia_open(DAT_NAME_PTR dev_name, DAT_IA_HANDLE * ia_handle)
+{
+	DAT_EVD_HANDLE evd_handle;
+	evd_handle = DAT_HANDLE_NULL;
+	return dat_ia_open(dev_name, DEFAULT_QUEUE_LEN, &evd_handle, ia_handle);
+}
+
+/* helper function to create an endpoint and its associated EVDs */
+int DT_ep_create(Params_t * params_ptr,
+		 DAT_IA_HANDLE ia_handle,
+		 DAT_PZ_HANDLE pz_handle,
+		 DAT_EVD_HANDLE * cr_evd,
+		 DAT_EVD_HANDLE * conn_evd,
+		 DAT_EVD_HANDLE * send_evd,
+		 DAT_EVD_HANDLE * recv_evd, DAT_EP_HANDLE * ep_handle)
+{
+	DAT_RETURN status;
+	DT_Tdep_Print_Head *phead;
+	*conn_evd = 0;
+	*send_evd = 0;
+	*recv_evd = 0;
+	*cr_evd = 0;
+	phead = params_ptr->phead;
+
+	status =
+	    DT_Tdep_evd_create(ia_handle, DEFAULT_QUEUE_LEN, DAT_HANDLE_NULL,
+			       DAT_EVD_CR_FLAG, cr_evd);
+	if (status != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "dat_evd_create failed %s\n",
+				  DT_RetToString(status));
+		return status;
+	}
+
+	status =
+	    DT_Tdep_evd_create(ia_handle, DEFAULT_QUEUE_LEN, DAT_HANDLE_NULL,
+			       DAT_EVD_CONNECTION_FLAG, conn_evd);
+	if (status != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "dat_evd_create failed %s\n",
+				  DT_RetToString(status));
+		return status;
+	}
+
+	status =
+	    DT_Tdep_evd_create(ia_handle, DEFAULT_QUEUE_LEN, DAT_HANDLE_NULL,
+			       DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG,
+			       send_evd);
+	if (status != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "dat_evd_create failed %s\n",
+				  DT_RetToString(status));
+		return status;
+	}
+
+	status =
+	    DT_Tdep_evd_create(ia_handle, DEFAULT_QUEUE_LEN, DAT_HANDLE_NULL,
+			       DAT_EVD_DTO_FLAG, recv_evd);
+	if (status != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "dat_evd_create failed %s\n",
+				  DT_RetToString(status));
+		return status;
+	}
+
+	status = dat_ep_create(ia_handle, pz_handle, *recv_evd,
+			       *send_evd, *conn_evd, NULL, ep_handle);
+	if (status != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "dat_ep_create failed %s\n",
+				  DT_RetToString(status));
+	}
+	return status;
+}
+
+/* function that initializes the connection struct */
+void DT_fft_init_conn_struct(FFT_Connection_t * conn)
+{
+	conn->ia_handle = 0;
+	conn->pz_handle = 0;
+	conn->psp_handle = 0;
+	conn->ep_handle = 0;
+	conn->cr_evd = 0;
+	conn->send_evd = 0;
+	conn->conn_evd = 0;
+	conn->recv_evd = 0;
+	conn->cr_handle = 0;
+	conn->remote_netaddr = 0;
+	conn->bpool = 0;
+	conn->pt_ptr = 0;
+	conn->connected = false;
+}
+
+/* helper function that simplifies many dat calls for the initiialization of a
+ * dat "client"
+ */
+void DT_fft_init_client(Params_t * params_ptr, FFT_Cmd_t * cmd,
+			FFT_Connection_t * conn)
+{
+	int res;
+	DAT_RETURN rc = 0;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	/* initialize the struct's members */
+	DT_fft_init_conn_struct(conn);
+
+	/* open the IA */
+	rc = DT_ia_open(cmd->device_name, &conn->ia_handle);
+	if (rc != DAT_SUCCESS) {
+		/* make sure the handle has an invalid value */
+		conn->ia_handle = NULL;
+	}
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* create a PZ */
+	rc = dat_pz_create(conn->ia_handle, &conn->pz_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* create an EP and its EVDs */
+	rc = DT_ep_create(params_ptr,
+			  conn->ia_handle,
+			  conn->pz_handle,
+			  &conn->cr_evd,
+			  &conn->conn_evd,
+			  &conn->send_evd, &conn->recv_evd, &conn->ep_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* if a server name is given, allocate memory for a net address and set it
+	 * up appropriately
+	 */
+	if (cmd->server_name && strlen(cmd->server_name)) {
+		conn->remote_netaddr = &params_ptr->server_netaddr;
+	}
+      cleanup:
+	return;
+}
+
+/* helper function to break down a client or server created with one of the
+ * init helper functions
+ */
+int DT_fft_destroy_conn_struct(Params_t * params_ptr, FFT_Connection_t * conn)
+{
+	DAT_RETURN rc = DAT_SUCCESS;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	if (conn->ep_handle) {
+		if (conn->connected) {
+			rc = dat_ep_disconnect(conn->ep_handle,
+					       DAT_CLOSE_DEFAULT);
+			DT_assert_clean(phead, rc == DAT_SUCCESS);
+
+			if (!DT_disco_event_wait(phead, conn->cr_evd, NULL))
+			{
+				DT_Tdep_PT_Printf(phead,
+						  "DT_fft_destroy_conn_struct: bad disconnect event\n");
+			}
+		}
+		rc = dat_ep_free(conn->ep_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn->bpool) {
+		DT_Bpool_Destroy(0, phead, conn->bpool);
+	}
+	if (conn->psp_handle) {
+		rc = dat_psp_free(conn->psp_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn->cr_evd) {
+		rc = DT_Tdep_evd_free(conn->cr_evd);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn->conn_evd) {
+		rc = DT_Tdep_evd_free(conn->conn_evd);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn->send_evd) {
+		rc = DT_Tdep_evd_free(conn->send_evd);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn->recv_evd) {
+		rc = DT_Tdep_evd_free(conn->recv_evd);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn->pt_ptr) {
+		DT_Free_Per_Test_Data(conn->pt_ptr);
+	}
+	if (conn->pz_handle) {
+		rc = dat_pz_free(conn->pz_handle);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	if (conn->ia_handle) {
+		rc = dat_ia_close(conn->ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+		DT_assert_clean(phead, rc == DAT_SUCCESS);
+	}
+	return rc;
+}
+
+/* helper function to init a dat "server" */
+void DT_fft_init_server(Params_t * params_ptr, FFT_Cmd_t * cmd,
+			FFT_Connection_t * conn)
+{
+	int res;
+	DAT_RETURN rc = 0;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	/* init the connection struct's members */
+	DT_fft_init_conn_struct(conn);
+
+	/* open the IA */
+	rc = DT_ia_open(cmd->device_name, &conn->ia_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* create a PZ */
+	rc = dat_pz_create(conn->ia_handle, &conn->pz_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* create an EP and its EVDs */
+	rc = DT_ep_create(params_ptr,
+			  conn->ia_handle,
+			  conn->pz_handle,
+			  &conn->cr_evd,
+			  &conn->conn_evd,
+			  &conn->send_evd, &conn->recv_evd, &conn->ep_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* create a PSP */
+	rc = dat_psp_create(conn->ia_handle, SERVER_PORT_NUMBER, conn->cr_evd,
+			    DAT_PSP_CONSUMER_FLAG, &conn->psp_handle);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* allocate memory for buffers */
+	conn->bpool =
+	    DT_BpoolAlloc(0, phead, conn->ia_handle, conn->pz_handle, NULL,
+			  NULL, 8192, 2, DAT_OPTIMAL_ALIGNMENT, false, false);
+	DT_assert(phead, conn->bpool);
+      cleanup:
+	return;
+}
+
+/* helper function that allows a server to listen for a connection */
+void DT_fft_listen(Params_t * params_ptr, FFT_Connection_t * conn)
+{
+	int res;
+	DAT_RETURN rc = 0;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	/* wait on a CR event via the CR EVD */
+	DT_assert_dat(phead,
+		      DT_cr_event_wait(phead, conn->cr_evd, &conn->cr_stat)
+		      && DT_cr_check(phead, &conn->cr_stat, conn->psp_handle,
+				     SERVER_PORT_NUMBER, &conn->cr_handle,
+				     "DT_fft_listen"));
+
+	/* accept the connection */
+	rc = dat_cr_accept(conn->cr_handle, conn->ep_handle, 0, (DAT_PVOID) 0);
+	DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+	/* wait on a conn event via the conn EVD */
+	DT_assert(phead,
+		  DT_conn_event_wait(phead,
+				     conn->ep_handle,
+				     conn->conn_evd, &conn->event_num) == true);
+	conn->connected = true;
+      cleanup:
+	return;
+}
+
+/* helper function that allows a client to connect to a server */
+int DT_fft_connect(Params_t * params_ptr, FFT_Connection_t * conn)
+{
+	int wait_count;
+	int res;
+	DAT_RETURN rc = 0;
+	DT_Tdep_Print_Head *phead;
+	phead = params_ptr->phead;
+
+	/* try 10 times to connect */
+	for (wait_count = 0; wait_count < 10; wait_count++) {
+		DT_Tdep_PT_Printf(phead, "Connection to server, attempt #%d\n",
+				  wait_count + 1);
+
+		/* attempt to connect, timeout = 10 secs */
+		rc = dat_ep_connect(conn->ep_handle, conn->remote_netaddr,
+				    SERVER_PORT_NUMBER, 10 * 1000000, 0,
+				    (DAT_PVOID) 0, DAT_QOS_BEST_EFFORT,
+				    DAT_CONNECT_DEFAULT_FLAG);
+		DT_assert_dat(phead, rc == DAT_SUCCESS);
+
+		/* wait on conn event */
+		DT_assert(phead,
+			  DT_conn_event_wait(phead,
+					     conn->ep_handle,
+					     conn->conn_evd,
+					     &conn->event_num) == true);
+
+		/* make sure we weren't rejected by the peer */
+		if (conn->event_num == DAT_CONNECTION_EVENT_PEER_REJECTED) {
+			DT_Mdep_Sleep(1000);
+			DT_Tdep_PT_Printf(phead,
+					  "Connection rejected by peer; retrying\n");
+		}
+	}
+      cleanup:
+	if (conn->event_num == DAT_CONNECTION_EVENT_ESTABLISHED) {
+		conn->connected = true;
+	}
+	/* returns true if connected, false otherwise */
+	return (conn->connected);
+}
diff --git a/test/dapltest/test/dapl_limit.c b/test/dapltest/test/dapl_limit.c
new file mode 100644
index 0000000..6b299fa
--- /dev/null
+++ b/test/dapltest/test/dapl_limit.c
@@ -0,0 +1,1536 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/*
+ * Increase the size of an array of handles
+ */
+
+static bool more_handles(DT_Tdep_Print_Head * phead, DAT_HANDLE ** old_ptrptr,	/* pointer to current pointer   */
+			 unsigned int *old_count,	/* number  pointed to           */
+			 unsigned int size)
+{				/* size of one datum              */
+	unsigned int count = *old_count;
+	DAT_HANDLE *old_handles = *old_ptrptr;
+	DAT_HANDLE *handle_tmp = DT_Mdep_Malloc(count * 2 * size);
+
+	if (!handle_tmp) {
+		DT_Tdep_PT_Printf(phead,
+				  "Out of memory for more DAT_HANDLEs\n");
+		return (false);
+	}
+
+	memcpy(handle_tmp, old_handles, count * size);
+	DT_Mdep_Free(old_handles);
+	*old_ptrptr = handle_tmp;
+	*old_count = count * 2;
+	return (true);
+}
+
+/*
+ * Limit test workhorse.
+ *
+ *  This test creates the sequence of DAT objects needed to move
+ *  data back and forth, attempting to find the limits supported
+ *  for the DAT object indicated by 'depth'.  For example, if
+ *  depth == LIM_LMR, the test will create a set of {IA,PZ,CNO,EVD,EP}
+ *  before trying to exhaust LMR creation using the {IA,PZ,CNO,EVD,EP} set.
+ *
+ *  The 'cmd->width' parameter can be used to control how may of these
+ *  parallel DAT object sets we create before stopping to beat upon
+ *  the constructor for the object indicated by 'depth', providing for
+ *  increased (or at least different) stress on the DAPL.
+ */
+static bool
+limit_test(DT_Tdep_Print_Head * phead, Limit_Cmd_t * cmd, Limit_Index depth)
+{
+	DAT_EVD_HANDLE conn_handle;
+	typedef struct obj_set {
+		DAT_IA_HANDLE ia_handle;
+		DAT_EVD_HANDLE ia_async_handle;
+		DAT_PZ_HANDLE pz_handle;
+		DAT_CNO_HANDLE cno_handle;
+		DAT_EVD_HANDLE evd_handle;
+		DAT_EP_HANDLE ep_handle;
+		DAT_LMR_HANDLE lmr_handle;
+		char *lmr_buffer;
+		DAT_LMR_CONTEXT lmr_context;
+		DAT_RMR_HANDLE rmr_handle;
+		DAT_RMR_CONTEXT rmr_context;
+	} Obj_Set;
+
+	Obj_Set *hdl_sets = (Obj_Set *) NULL;
+	bool retval = false;
+	char *module = "LimitTest";
+
+#if defined (WIN32)
+	/*
+	 * The Windows compiler will not deal with complex definitions
+	 * in macros, so create a variable here.
+	 */
+#if defined (DAT_OS_WAIT_PROXY_AGENT_NULL)
+#undef DAT_OS_WAIT_PROXY_AGENT_NULL
+#endif
+	DAT_OS_WAIT_PROXY_AGENT DAT_OS_WAIT_PROXY_AGENT_NULL = { NULL, NULL };
+#endif
+
+	DAT_RETURN ret;
+
+#ifdef DFLT_QLEN
+#undef DFLT_QLEN
+#endif
+
+#   define DFLT_QLEN	  10	/* a small event queue size     */
+#   define START_COUNT	1024	/* initial # handles            */
+#   define DFLT_BUFFSZ	4096	/* default size for buffer      */
+#   define CONN_QUAL0	0xAffab1e
+
+	/* Allocate 'width' Obj_Sets */
+	if (depth && !(hdl_sets = DT_Mdep_Malloc(sizeof(Obj_Set) * cmd->width))) {
+		DT_Tdep_PT_Printf(phead, "%s: No memory for handle array!\n",
+				  module);
+		goto clean_up_now;
+	}
+
+	/* -----------
+	 * IA handling
+	 */
+	if (depth > LIM_IA) {
+		/*
+		 * The abuse is not for us this time, just prep Obj_Set.
+		 */
+		unsigned int w;
+
+		DT_Tdep_PT_Debug(1, (phead,
+				     "%s: dat_ia_open X %d\n",
+				     module, cmd->width));
+		for (w = 0; w < cmd->width; w++) {
+			/* Specify that we want to get back an async EVD.  */
+			hdl_sets[w].ia_async_handle = DAT_HANDLE_NULL;
+			ret = dat_ia_open(cmd->device_name,
+					  DFLT_QLEN,
+					  &hdl_sets[w].ia_async_handle,
+					  &hdl_sets[w].ia_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_ia_open (%s) #%d fails: %s\n",
+						  module, cmd->device_name,
+						  w + 1, DT_RetToString(ret));
+				/* handle contents undefined on failure */
+				hdl_sets[w].ia_async_handle = DAT_HANDLE_NULL;
+				hdl_sets[w].ia_handle = DAT_HANDLE_NULL;
+				goto clean_up_now;
+			}
+		}
+	} else if (depth == LIM_IA) {
+		/*
+		 * See how many IAs we can create
+		 */
+		typedef struct _ia {
+			DAT_IA_HANDLE ia_handle;
+			DAT_EVD_HANDLE ia_async_handle;
+		} OneOpen;
+		unsigned int count = START_COUNT;
+		OneOpen *hdlptr = (OneOpen *)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+
+		/* IA Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1,
+					 (phead, "%s: Exhausting dat_ia_open\n",
+					  module));
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count, sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: IAs opened: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+				/* Specify that we want to get back an async EVD.  */
+				hdlptr[w].ia_async_handle = DAT_HANDLE_NULL;
+				ret = dat_ia_open(cmd->device_name,
+						  DFLT_QLEN,
+						  &hdlptr[w].ia_async_handle,
+						  &hdlptr[w].ia_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ia_open (%s) #%d fails: %s\n",
+							  module,
+							  cmd->device_name,
+							  w + 1,
+							  DT_RetToString(ret));
+					retval = true;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: IAs opened: %d\n", module,
+					  w);
+			retval = true;
+
+			/* IA Cleanup loop */
+			for (tmp = 0; tmp < w; tmp++) {
+				DT_Mdep_Schedule();
+				ret = dat_ia_close(hdlptr[tmp].ia_handle,
+						   DAT_CLOSE_GRACEFUL_FLAG);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ia_close (graceful) fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+					ret =
+					    dat_ia_close(hdlptr[tmp].ia_handle,
+							 DAT_CLOSE_ABRUPT_FLAG);
+					if (ret != DAT_SUCCESS) {
+						DT_Tdep_PT_Printf(phead,
+								  "%s: dat_ia_close (abrupt) fails: %s\n",
+								  module,
+								  DT_RetToString
+								  (ret));
+					}
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+
+	/* End IA handling */
+	/* -----------
+	 * PZ handling
+	 */
+	if (depth > LIM_PZ) {
+		/*
+		 * The abuse is not for us this time, just prep Obj_Set.
+		 */
+		unsigned int w;
+
+		DT_Tdep_PT_Debug(1, (phead,
+				     "%s: dat_pz_create X %d\n",
+				     module, cmd->width));
+		for (w = 0; w < cmd->width; w++) {
+			ret = dat_pz_create(hdl_sets[w].ia_handle,
+					    &hdl_sets[w].pz_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_pz_create #%d fails: %s\n",
+						  module, w + 1,
+						  DT_RetToString(ret));
+				/* handle contents undefined on failure */
+				hdl_sets[w].pz_handle = DAT_HANDLE_NULL;
+				goto clean_up_now;
+			}
+		}
+	} else if (depth == LIM_PZ) {
+		/*
+		 * See how many PZs we can create
+		 */
+		unsigned int count = START_COUNT;
+		DAT_PZ_HANDLE *hdlptr = (DAT_PZ_HANDLE *)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+
+		/* PZ Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1, (phead,
+					     "%s: Exhausting dat_pz_create\n",
+					     module));
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count, sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: PZs created: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+				ret =
+				    dat_pz_create(hdl_sets[w % cmd->width].
+						  ia_handle, &hdlptr[w]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_pz_create #%d fails: %s\n",
+							  module, w + 1,
+							  DT_RetToString(ret));
+					retval = true;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: PZs created: %d\n",
+					  module, w);
+			retval = true;
+
+			/* PZ Cleanup loop */
+			for (tmp = 0; tmp < w; tmp++) {
+				DT_Mdep_Schedule();
+				ret = dat_pz_free(hdlptr[tmp]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_pz_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+	/* End PZ handling */
+#ifndef __KDAPLTEST__
+	/* -----------
+	 * CNO handling
+	 */
+
+	if (depth > LIM_CNO) {
+		/*
+		 * The abuse is not for us this time, just prep Obj_Set.
+		 */
+		unsigned int w;
+
+		DT_Tdep_PT_Debug(1, (phead,
+				     "%s: dat_cno_create X %d\n",
+				     module, cmd->width));
+		for (w = 0; w < cmd->width; w++) {
+			ret = dat_cno_create(hdl_sets[w].ia_handle,
+					     DAT_OS_WAIT_PROXY_AGENT_NULL,
+					     &hdl_sets[w].cno_handle);
+			if (DAT_GET_TYPE(ret) == DAT_NOT_IMPLEMENTED) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_cno_create unimplemented\n",
+						  module);
+				hdl_sets[w].cno_handle = DAT_HANDLE_NULL;
+				/* ignore this error */
+				break;
+			} else if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_cno_create #%d fails: %s\n",
+						  module, w + 1,
+						  DT_RetToString(ret));
+				/* handle contents undefined on failure */
+				hdl_sets[w].cno_handle = DAT_HANDLE_NULL;
+				goto clean_up_now;
+			}
+		}
+	} else if (depth == LIM_CNO) {
+		/*
+		 * See how many CNOs we can create
+		 */
+		unsigned int count = START_COUNT;
+		DAT_CNO_HANDLE *hdlptr = (DAT_CNO_HANDLE *)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+
+		/* CNO Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1, (phead,
+					     "%s: Exhausting dat_cno_create\n",
+					     module));
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count, sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: CNOs created: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+				ret =
+				    dat_cno_create(hdl_sets[w % cmd->width].
+						   ia_handle,
+						   DAT_OS_WAIT_PROXY_AGENT_NULL,
+						   &hdlptr[w]);
+				if (DAT_GET_TYPE(ret) == DAT_NOT_IMPLEMENTED) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_cno_create unimplemented\n",
+							  module);
+					retval = true;
+					break;
+				} else if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_cno_create #%d fails: %s\n",
+							  module, w + 1,
+							  DT_RetToString(ret));
+					retval = true;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: CNOs created: %d\n",
+					  module, w);
+			retval = true;
+
+			/* CNO Cleanup loop */
+			for (tmp = 0; tmp < w; tmp++) {
+				DT_Mdep_Schedule();
+				ret = dat_cno_free(hdlptr[tmp]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_cno_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}			/* End CNO handling */
+#endif				/*  __KDAPLTEST__ */
+
+	/* -----------
+	 * EVD handling
+	 */
+	if (depth > LIM_EVD) {
+		/*
+		 * The abuse is not for us this time, just prep Obj_Set.
+		 */
+		unsigned int w = 0;
+		DAT_EVD_FLAGS flags = (DAT_EVD_DTO_FLAG
+				       /* | DAT_EVD_SOFTWARE_FLAG */
+				       | DAT_EVD_CR_FLAG | DAT_EVD_RMR_BIND_FLAG);	/* not ASYNC */
+
+		DT_Tdep_PT_Debug(1, (phead,
+				     "%s: dat_evd_create X %d\n",
+				     module, cmd->width));
+		/*
+		 * First create a connection EVD to be used for EP creation
+		 */
+
+		ret = DT_Tdep_evd_create(hdl_sets[0].ia_handle,
+					 DFLT_QLEN,
+					 NULL,
+					 DAT_EVD_CONNECTION_FLAG, &conn_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: conn dat_evd_create #%d fails: %s\n",
+					  module, w + 1, DT_RetToString(ret));
+			/* handle contents undefined on failure */
+			conn_handle = DAT_HANDLE_NULL;
+			goto clean_up_now;
+		}
+		for (w = 0; w < cmd->width; w++) {
+			ret = DT_Tdep_evd_create(hdl_sets[w].ia_handle,
+						 DFLT_QLEN,
+						 hdl_sets[w].cno_handle,
+						 flags,
+						 &hdl_sets[w].evd_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_evd_create #%d fails: %s\n",
+						  module, w + 1,
+						  DT_RetToString(ret));
+				/* handle contents undefined on failure */
+				hdl_sets[w].evd_handle = DAT_HANDLE_NULL;
+				goto clean_up_now;
+			}
+		}
+	} else if (depth == LIM_EVD) {
+		/*
+		 * See how many EVDs we can create
+		 */
+		unsigned int count = START_COUNT;
+		DAT_EVD_HANDLE *hdlptr = (DAT_EVD_HANDLE *)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+		DAT_EVD_FLAGS flags = (DAT_EVD_DTO_FLAG
+				       | DAT_EVD_RMR_BIND_FLAG
+				       | DAT_EVD_CR_FLAG);
+
+		/* EVD Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1, (phead,
+					     "%s: Exhausting dat_evd_create\n",
+					     module));
+			/*
+			 * First create a connection EVD to be used for EP creation
+			 */
+			ret = DT_Tdep_evd_create(hdl_sets[0].ia_handle,
+						 DFLT_QLEN,
+						 NULL,
+						 DAT_EVD_CONNECTION_FLAG,
+						 &conn_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: conn dat_evd_create #%d fails: %s\n",
+						  module, w + 1,
+						  DT_RetToString(ret));
+				/* handle contents undefined on failure */
+				conn_handle = DAT_HANDLE_NULL;
+			}
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count, sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: EVDs created: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+				ret =
+				    DT_Tdep_evd_create(hdl_sets[w % cmd->width].
+						       ia_handle, DFLT_QLEN,
+						       hdl_sets[w %
+								cmd->width].
+						       cno_handle, flags,
+						       &hdlptr[w]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_evd_create #%d fails: %s\n",
+							  module, w + 1,
+							  DT_RetToString(ret));
+					retval = true;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: EVDs created: %d\n",
+					  module, w);
+			retval = true;
+
+			/* EVD Cleanup loop */
+			if (conn_handle != DAT_HANDLE_NULL) {
+				ret = DT_Tdep_evd_free(conn_handle);
+				conn_handle = DAT_HANDLE_NULL;
+			}
+			for (tmp = 0; tmp < w; tmp++) {
+				DT_Mdep_Schedule();
+				ret = DT_Tdep_evd_free(hdlptr[tmp]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_evd_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+
+	/* End EVD handling */
+	/* -----------
+	 * EP handling
+	 */
+	if (depth > LIM_EP) {
+		/*
+		 * The abuse is not for us this time, just prep Obj_Set.
+		 */
+		unsigned int w;
+
+		DT_Tdep_PT_Debug(1, (phead,
+				     "%s: dat_ep_create X %d\n",
+				     module, cmd->width));
+		for (w = 0; w < cmd->width; w++) {
+			ret = dat_ep_create(hdl_sets[w].ia_handle, hdl_sets[w].pz_handle, hdl_sets[w].evd_handle,	/* recv     */
+					    hdl_sets[w].evd_handle,	/* request  */
+					    conn_handle,	/* connect  */
+					    (DAT_EP_ATTR *) NULL,
+					    &hdl_sets[w].ep_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_ep_create #%d fails: %s\n",
+						  module, w + 1,
+						  DT_RetToString(ret));
+				/* handle contents undefined on failure */
+				hdl_sets[w].ep_handle = DAT_HANDLE_NULL;
+				goto clean_up_now;
+			}
+		}
+	} else if (depth == LIM_EP) {
+		/*
+		 * See how many EPs we can create
+		 */
+		unsigned int count = START_COUNT;
+		DAT_EP_HANDLE *hdlptr = (DAT_EP_HANDLE *)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+
+		/* EP Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "%s: Exhausting dat_ep_create\n",
+					  module));
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count, sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: EPs created: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+				ret = dat_ep_create(hdl_sets[w % cmd->width].ia_handle, hdl_sets[w % cmd->width].pz_handle, hdl_sets[w % cmd->width].evd_handle, hdl_sets[w % cmd->width].evd_handle, conn_handle,	/* connect  */
+						    (DAT_EP_ATTR *) NULL,
+						    &hdlptr[w]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ep_create #%d fails: %s\n",
+							  module, w + 1,
+							  DT_RetToString(ret));
+					retval = true;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: EPs created: %d\n",
+					  module, w);
+			retval = true;
+
+			/* EP Cleanup loop */
+			for (tmp = 0; tmp < w; tmp++) {
+				DT_Mdep_Schedule();
+				ret = dat_ep_free(hdlptr[tmp]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ep_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+
+	/* End EP handling */
+	/* -----------
+	 * RSP handling
+	 *
+	 * if (depth > LIM_RSP) {
+	 *         Since RSPs are not part of the Obj_Set,
+	 *         there's nothing to do.
+	 * } else ...
+	 */
+	if (depth == LIM_RSP) {
+		/*
+		 * See how many RSPs we can create
+		 */
+		unsigned int count = START_COUNT;
+		DAT_RSP_HANDLE *hdlptr = (DAT_RSP_HANDLE *)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+		DAT_EP_HANDLE *epptr = (DAT_EP_HANDLE *)
+		    DT_Mdep_Malloc(count * sizeof(*epptr));
+
+		/* RSP Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "%s: Exhausting dat_rsp_create\n",
+					  module));
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count) {
+					unsigned int count1 = count;
+					unsigned int count2 = count;
+
+					if (!more_handles
+					    (phead, (DAT_HANDLE **) & hdlptr,
+					     &count1, sizeof(*hdlptr))) {
+						DT_Tdep_PT_Printf(phead,
+								  "%s: RSPs created: %d\n",
+								  module, w);
+						retval = true;
+						break;
+					}
+					if (!more_handles
+					    (phead, (DAT_HANDLE **) & epptr,
+					     &count2, sizeof(*epptr))) {
+						DT_Tdep_PT_Printf(phead,
+								  "%s: RSPs created: %d\n",
+								  module, w);
+						retval = true;
+						break;
+					}
+
+					if (count1 != count2) {
+						DT_Tdep_PT_Printf(phead,
+								  "%s: Mismatch in allocation of handle arrays at point %d\n",
+								  module, w);
+						retval = true;
+						break;
+					}
+
+					count = count1;
+				}
+
+				/*
+				 * Each RSP needs a unique EP, so create one first
+				 */
+				ret =
+				    dat_ep_create(hdl_sets[w % cmd->width].
+						  ia_handle,
+						  hdl_sets[w %
+							   cmd->width].
+						  pz_handle,
+						  hdl_sets[w %
+							   cmd->width].
+						  evd_handle,
+						  hdl_sets[w %
+							   cmd->width].
+						  evd_handle, conn_handle,
+						  (DAT_EP_ATTR *) NULL,
+						  &epptr[w]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ep_create #%d fails: %s testing RSPs\n",
+							  module, w + 1,
+							  DT_RetToString(ret));
+					retval = true;
+					break;
+				}
+
+				ret =
+				    dat_rsp_create(hdl_sets[w % cmd->width].
+						   ia_handle, CONN_QUAL0 + w,
+						   epptr[w],
+						   hdl_sets[w %
+							    cmd->width].
+						   evd_handle, &hdlptr[w]);
+				if (DAT_GET_TYPE(ret) == DAT_NOT_IMPLEMENTED) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_rsp_create unimplemented\n",
+							  module);
+					/* ignore this error */
+					retval = true;
+					break;
+				} else if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_rsp_create #%d fails: %s\n",
+							  module, w + 1,
+							  DT_RetToString(ret));
+					/* Cleanup the EP; no-one else will.  */
+					ret = dat_ep_free(epptr[w]);
+					if (ret != DAT_SUCCESS) {
+						DT_Tdep_PT_Printf(phead,
+								  "%s: dat_ep_free (internal cleanup @ #%d) fails: %s\n",
+								  module, w + 1,
+								  DT_RetToString
+								  (ret));
+					}
+					retval = true;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: RSPs created: %d\n",
+					  module, w);
+			retval = true;
+
+			/* RSP Cleanup loop */
+			for (tmp = 0; tmp < w; tmp++) {
+				DT_Mdep_Schedule();
+				ret = dat_rsp_free(hdlptr[tmp]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_rsp_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+				/* Free EPs */
+				ret = dat_ep_free(epptr[tmp]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ep_free fails: %s for RSPs\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+
+	/* End RSP handling */
+	/* -----------
+	 * PSP handling
+	 *
+	 * if (depth > LIM_PSP) {
+	 *         Since PSPs are not part of the Obj_Set,
+	 *         there's nothing to do.
+	 * } else ...
+	 */
+	if (depth == LIM_PSP) {
+		/*
+		 * See how many PSPs we can create
+		 */
+		unsigned int count = START_COUNT;
+		DAT_PSP_HANDLE *hdlptr = (DAT_PSP_HANDLE *)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+
+		/* PSP Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "%s: Exhausting dat_psp_create\n",
+					  module));
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count, sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: PSPs created: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+				ret =
+				    dat_psp_create(hdl_sets[w % cmd->width].
+						   ia_handle, CONN_QUAL0 + w,
+						   hdl_sets[w %
+							    cmd->width].
+						   evd_handle,
+						   DAT_PSP_CONSUMER_FLAG,
+						   &hdlptr[w]);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_psp_create #%d fails: %s\n",
+							  module, w + 1,
+							  DT_RetToString(ret));
+					retval = true;
+					hdlptr[w] = DAT_HANDLE_NULL;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: PSPs created: %d\n",
+					  module, w);
+			retval = true;
+
+			/* PSP Cleanup loop */
+			for (tmp = 0; tmp < w; tmp++) {
+				DT_Mdep_Schedule();
+				ret = dat_psp_free(hdlptr[tmp]);
+				if (DAT_GET_TYPE(ret) == DAT_NOT_IMPLEMENTED) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_psp_free unimplemented\n"
+							  "\tNB: Expect EVD+IA cleanup errors!\n",
+							  module);
+					break;
+				} else if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_psp_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+
+	/* End PSP handling */
+	/* -----------
+	 * LMR handling
+	 */
+	if (depth > LIM_LMR) {
+		/*
+		 * The abuse is not for us this time, just prep Obj_Set.
+		 */
+		unsigned int w;
+
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: dat_lmr_create X %d\n", module,
+				  cmd->width));
+		for (w = 0; w < cmd->width; w++) {
+			DAT_REGION_DESCRIPTION region;
+			DAT_VLEN reg_size;
+			DAT_VADDR reg_addr;
+
+			hdl_sets[w].lmr_buffer = DT_Mdep_Malloc(DFLT_BUFFSZ);
+			if (!hdl_sets[w].lmr_buffer) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: no memory for LMR buffers\n",
+						  module);
+				goto clean_up_now;
+			}
+			memset(&region, 0, sizeof(region));
+			region.for_va = hdl_sets[w].lmr_buffer;
+
+			ret = DT_Tdep_lmr_create(hdl_sets[w].ia_handle, DAT_MEM_TYPE_VIRTUAL, region, DFLT_BUFFSZ, hdl_sets[w].pz_handle, DAT_MEM_PRIV_ALL_FLAG, &hdl_sets[w].lmr_handle, &hdl_sets[w].lmr_context, NULL,	/* FIXME */
+						 &reg_size, &reg_addr);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_lmr_create #%d fails: %s\n",
+						  module, w + 1,
+						  DT_RetToString(ret));
+				/* handle contents undefined on failure */
+				hdl_sets[w].lmr_handle = DAT_HANDLE_NULL;
+				goto clean_up_now;
+			}
+			if ((uintptr_t) reg_addr >
+			    (uintptr_t) hdl_sets[w].lmr_buffer
+			    || (reg_size <
+				DFLT_BUFFSZ + ((uintptr_t) reg_addr -
+					       (uintptr_t) hdl_sets[w].
+					       lmr_buffer))) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_lmr_create bogus outputs "
+						  "in: 0x%p, %x out 0x%llx, %llx\n",
+						  module,
+						  hdl_sets[w].lmr_buffer,
+						  DFLT_BUFFSZ, reg_addr,
+						  reg_size);
+				goto clean_up_now;
+			}
+		}
+	} else if (depth == LIM_LMR) {
+		/*
+		 * See how many LMRs we can create
+		 */
+		unsigned int count = START_COUNT;
+		Bpool **hdlptr = (Bpool **)
+		    DT_Mdep_Malloc(count * sizeof(*hdlptr));
+
+		/* LMR Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int tmp;
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "%s: Exhausting dat_lmr_create\n",
+					  module));
+			for (w = 0; w < cmd->maximum; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count, sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: no memory for LMR handles\n",
+							  module);
+					DT_Tdep_PT_Printf(phead,
+							  "%s: LMRs created: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+				/*
+				 * Let BpoolAlloc do the hard work; this means that
+				 * we're testing unique memory registrations rather
+				 * than repeatedly binding the same buffer set.
+				 */
+				hdlptr[w] = DT_BpoolAlloc((Per_Test_Data_t *) 0,
+							  phead,
+							  hdl_sets[w %
+								   cmd->width].
+							  ia_handle,
+							  hdl_sets[w %
+								   cmd->width].
+							  pz_handle,
+							  hdl_sets[w %
+								   cmd->width].
+							  ep_handle,
+							  hdl_sets[w %
+								   cmd->width].
+							  evd_handle,
+							  DFLT_BUFFSZ, 1,
+							  DAT_OPTIMAL_ALIGNMENT,
+							  false, false);
+				if (!hdlptr[w]) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: LMRs created: %d\n",
+							  module, w);
+					retval = true;
+					break;
+				}
+			}
+
+			DT_Tdep_PT_Printf(phead, "%s: LMRs created: %d\n",
+					  module, w);
+			retval = true;
+
+			/* LMR Cleanup loop */
+			for (tmp = 0; tmp <= w; tmp++) {
+				DT_Mdep_Schedule();
+				if (hdlptr[tmp]) {
+					/* ignore rval - DT_Bpool_Destroy will complain */
+					(void)
+					    DT_Bpool_Destroy((Per_Test_Data_t *)
+							     0, phead,
+							     hdlptr[tmp]);
+				}
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+
+	/* End LMR handling */
+	/* -----------
+	 * Posted receive buffer handling
+	 */
+	if (depth == LIM_RPOST) {
+		/*
+		 * See how many receive buffers we can post (to each EP).
+		 * We are posting the same buffer 'cnt' times, deliberately,
+		 * but that should be OK.
+		 */
+		unsigned int count = START_COUNT;
+		DAT_LMR_TRIPLET *hdlptr = (DAT_LMR_TRIPLET *)
+		    DT_Mdep_Malloc(count * cmd->width * sizeof(*hdlptr));
+
+		/* Recv-Post Exhaustion test loop */
+		if (hdlptr) {
+			unsigned int w = 0;
+			unsigned int i = 0;
+			unsigned int done = 0;
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "%s: Exhausting posting of recv buffers\n",
+					  module));
+			for (w = 0; w < cmd->maximum && !done; w++) {
+				DT_Mdep_Schedule();
+				if (w == count
+				    && !more_handles(phead,
+						     (DAT_HANDLE **) & hdlptr,
+						     &count,
+						     cmd->width *
+						     sizeof(*hdlptr))) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: no memory for IOVs \n",
+							  module);
+					DT_Tdep_PT_Printf(phead,
+							  "%s: recv buffers posted per EP: %d\n"
+							  "\t\t (total posted: %d)\n",
+							  module, w,
+							  w * cmd->width);
+					done = retval = true;
+					break;
+				}
+				for (i = 0; i < cmd->width; i++) {
+					DAT_LMR_TRIPLET *iovp =
+					    &hdlptr[w * cmd->width + i];
+					DAT_DTO_COOKIE cookie;
+
+					iovp->virtual_address =
+					    (DAT_VADDR) (uintptr_t)
+					    hdl_sets[i].lmr_buffer;
+					iovp->segment_length = DFLT_BUFFSZ;
+					iovp->lmr_context =
+					    hdl_sets[i].lmr_context;
+					cookie.as_64 = (DAT_UINT64) 0UL;
+					cookie.as_ptr =
+					    (DAT_PVOID) hdl_sets[i].lmr_buffer;
+
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ep_post_recv #%d\n",
+							  module,
+							  w * cmd->width + i +
+							  1);
+					ret =
+					    dat_ep_post_recv(hdl_sets[i].
+							     ep_handle, 1, iovp,
+							     cookie,
+							     DAT_COMPLETION_DEFAULT_FLAG);
+					if (ret != DAT_SUCCESS) {
+						DT_Tdep_PT_Printf(phead,
+								  "%s: dat_ep_post_recv fails: %s\n",
+								  module,
+								  DT_RetToString
+								  (ret));
+						DT_Tdep_PT_Printf(phead,
+								  "%s: recv buffers posted per EP: %d\n"
+								  "\t\t (total posted: %d)\n",
+								  module, w,
+								  w *
+								  cmd->width +
+								  i);
+						done = retval = true;
+						break;
+					}
+				}	/* end for each EP wide */
+			}	/* end forever (!done) loop */
+
+			retval = true;
+			DT_Tdep_PT_Printf(phead,
+					  "%s: recv buffers posted per EP: %d\n"
+					  "\t\t (total posted: %d)\n", module,
+					  w, w * cmd->width);
+
+			/* Rpost Cleanup loop */
+			for (i = 0; i < cmd->width; i++) {
+				DAT_EVENT event;
+
+				/*
+				 * Disconnecting an unconnected EP should complete
+				 * outstanding recv DTOs in error, and otherwise
+				 * be a no-op.
+				 */
+				ret = dat_ep_reset(hdl_sets[i].ep_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ep_disconnect (abrupt) fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				} else {
+					/*
+					 * Remove all DTOs. The disconnect above should have
+					 * flushed all posted operations, so this is just a
+					 * clean up.
+					 */
+					do {
+						ret =
+						    DT_Tdep_evd_dequeue(hdl_sets
+									[i].
+									evd_handle,
+									&event);
+					} while (ret == DAT_SUCCESS);
+				}
+
+			}
+			DT_Mdep_Free(hdlptr);
+		}
+	}
+
+	/* end depth == LIM_RPOST */
+	/* -----------
+	 * Test maximum size of LMR allowed
+	 */
+	if (depth == LIM_SIZE_LMR) {
+		DAT_COUNT last_size = 0;
+		DAT_COUNT test_size = DFLT_BUFFSZ;
+		Bpool *test_bpool;
+		for (;;) {
+			DT_Mdep_Schedule();
+			test_bpool = DT_BpoolAlloc((Per_Test_Data_t *) 0,
+						   phead,
+						   hdl_sets[0].ia_handle,
+						   hdl_sets[0].pz_handle,
+						   hdl_sets[0].ep_handle,
+						   hdl_sets[0].evd_handle,
+						   test_size,
+						   1,
+						   DAT_OPTIMAL_ALIGNMENT,
+						   false, false);
+
+			if (!test_bpool) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: Largest LMR was 0x%x bytes\n"
+						  "\t (failed attempting 0x%x bytes)\n",
+						  module, last_size, test_size);
+				retval = true;
+				break;
+			} else
+			    if (!DT_Bpool_Destroy
+				((Per_Test_Data_t *) 0, phead, test_bpool)) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: Largest LMR was 0x%x bytes\n",
+						  module, test_size);
+				retval = true;
+				break;
+			}
+
+			last_size = test_size;
+			test_size <<= 1;
+			if (test_size < last_size) {
+				/* could conceivably wrap on 32-bit architectures */
+				DT_Tdep_PT_Printf(phead,
+						  "%s: LMR of 0x%x bytes OK - %s\n",
+						  module, last_size,
+						  "stopping now.");
+				retval = true;
+				break;
+			}
+		}		/* end forever loop */
+	}
+	/* end depth == LIM_SIZE_LMR */
+	DT_Tdep_PT_Debug(1, (phead, "%s: Limit Testing Completed - %s\n",
+			     module, retval ? "Successfully" : "with errors"));
+
+	/* ----------------------------------------------------------
+	 * Clean up and go home
+	 */
+      clean_up_now:
+
+	DT_Tdep_PT_Debug(1, (phead, "%s: Cleaning up ...\n", module));
+	if (depth > LIM_LMR) {
+		unsigned int w;
+
+		for (w = 0; w < cmd->width; w++) {
+			if (hdl_sets[w].lmr_handle) {
+				ret = dat_lmr_free(hdl_sets[w].lmr_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_lmr_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+			if ((void *)hdl_sets[w].lmr_buffer) {
+				DT_Mdep_Free((void *)hdl_sets[w].lmr_buffer);
+			}
+		}
+	}
+
+	/* end LIM_LMR cleanup */
+	/*
+	 * if (depth == LIM_PSP) {
+	 *         Since PSPs are not part of the Obj_Set,
+	 *         there's no cleanup to do.
+	 * }
+	 *
+	 * if (depth == LIM_RSP) {
+	 *         Since RSPs are not part of the Obj_Set,
+	 *         there'no cleanup nothing to do.
+	 * }
+	 */
+	if (depth > LIM_EP) {
+		unsigned int w;
+
+		for (w = 0; w < cmd->width; w++) {
+			if (hdl_sets[w].ep_handle) {
+				ret = dat_ep_free(hdl_sets[w].ep_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ep_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+		}
+	}
+	/* end LIM_EP cleanup */
+	if (depth > LIM_EVD) {
+		unsigned int w;
+
+		if (conn_handle != DAT_HANDLE_NULL) {
+			ret = DT_Tdep_evd_free(conn_handle);
+			conn_handle = DAT_HANDLE_NULL;
+		}
+		for (w = 0; w < cmd->width; w++) {
+			if (hdl_sets[w].evd_handle) {
+				ret = DT_Tdep_evd_free(hdl_sets[w].evd_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_evd_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+		}
+	}
+	/* end LIM_EVD cleanup */
+#ifndef __KDAPLTEST__
+	if (depth > LIM_CNO) {
+		unsigned int w;
+
+		for (w = 0; w < cmd->width; w++) {
+			if (hdl_sets[w].cno_handle) {
+				ret = dat_cno_free(hdl_sets[w].cno_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_cno_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+		}
+	}			/* end LIM_CNO cleanup */
+#endif
+
+	if (depth > LIM_PZ) {
+		unsigned int w;
+
+		for (w = 0; w < cmd->width; w++) {
+			if (hdl_sets[w].pz_handle) {
+				ret = dat_pz_free(hdl_sets[w].pz_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_pz_free fails: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					retval = false;
+				}
+			}
+		}
+	}
+	/* end LIM_PZ cleanup */
+	if (depth > LIM_IA) {
+		unsigned int w;
+
+		for (w = 0; w < cmd->width; w++) {
+			if (hdl_sets[w].ia_handle) {
+				/* dat_ia_close cleans up async evd handle, too */
+				ret = dat_ia_close(hdl_sets[w].ia_handle,
+						   DAT_CLOSE_GRACEFUL_FLAG);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ia_close (graceful) error: %s\n",
+							  module,
+							  DT_RetToString(ret));
+					/*
+					 * Since we take some pains to clean up properly,
+					 * this really is an error.  But if we get here,
+					 * we may as well try the largest hammer we have.
+					 */
+					retval = false;
+					ret =
+					    dat_ia_close(hdl_sets[w].ia_handle,
+							 DAT_CLOSE_ABRUPT_FLAG);
+					if (ret != DAT_SUCCESS) {
+						DT_Tdep_PT_Printf(phead,
+								  "%s: dat_ia_close (abrupt) error: %s\n",
+								  module,
+								  DT_RetToString
+								  (ret));
+					}
+				}
+			}
+		}
+	}
+	/* end LIM_IA cleanup */
+	if (depth && hdl_sets) {
+		DT_Mdep_Free(hdl_sets);
+	}
+
+	DT_Tdep_PT_Debug(1,
+			 (phead, "%s: testing and cleanup complete.\n",
+			  module));
+
+	return (retval);
+}
+
+/*********************************************************************
+ * Framework to run through all of the limit tests
+ */
+DAT_RETURN DT_cs_Limit(Params_t * params, Limit_Cmd_t * cmd)
+{
+	DT_Tdep_Print_Head *phead;
+	char *star =
+	    "**********************************************************************";
+
+	phead = params->phead;
+
+	if (cmd->Test_List[LIM_IA]) {
+		char list[] = {
+			"Limitation Test                      limit_ia\n"
+			    "Description:  Test max num of opens for the same physical IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_IA)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	if (cmd->Test_List[LIM_PZ]) {
+		char list[] = {
+			"Limitation Test                      limit_pz\n"
+			    "Description:  Test max num of PZs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_PZ)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+#ifndef __KDAPLTEST__
+	if (cmd->Test_List[LIM_CNO]) {
+		char list[] = {
+			"Limitation Test                      limit_cno\n"
+			    "Description:  Test max num of CNOs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_CNO)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+#endif
+
+	if (cmd->Test_List[LIM_EVD]) {
+		char list[] = {
+			"Limitation Test                      limit_evd\n"
+			    "Description:  Test max num of EVDs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_EVD)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	if (cmd->Test_List[LIM_EP]) {
+		char list[] = {
+			"Limitation Test                      limit_ep\n"
+			    "Description:  Test max num of EPs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_EP)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	if (cmd->Test_List[LIM_RSP]) {
+		char list[] = {
+			"Limitation Test                      limit_rsp\n"
+			    "Description:  Test max num of RSPs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_RSP)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	if (cmd->Test_List[LIM_PSP]) {
+		char list[] = {
+			"Limitation Test                      limit_psp\n"
+			    "Description:  Test max num of PSPs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_PSP)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	if (cmd->Test_List[LIM_LMR]) {
+		char list[] = {
+			"Limitation Test                      limit_lmr\n"
+			    "Description:  Test max num of LMRs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_LMR)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	if (cmd->Test_List[LIM_RPOST]) {
+		char list[] = {
+			"Limitation Test                      limit_rpost\n"
+			    "Description:  Test max num of receive buffers posted to an EP"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_RPOST)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	if (cmd->Test_List[LIM_SIZE_LMR]) {
+		char list[] = {
+			"Limitation Test                      limit_size_lmr\n"
+			    "Description:  Test max size of LMRs that are supported by an IA"
+		}
+		;
+
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+		DT_Tdep_PT_Printf(phead, "%s\n", list);
+		if (!limit_test(phead, cmd, LIM_SIZE_LMR)) {
+			goto error;
+		}
+		DT_Tdep_PT_Printf(phead, "%s\n", star);
+	}
+
+	/* More tests TBS ... */
+
+	return DAT_SUCCESS;
+
+      error:
+	DT_Tdep_PT_Printf(phead,
+			  "error occurs, can not continue with limit test\n");
+	DT_Tdep_PT_Printf(phead, "%s\n", star);
+	return DAT_INSUFFICIENT_RESOURCES;
+}
diff --git a/test/dapltest/test/dapl_memlist.c b/test/dapltest/test/dapl_memlist.c
new file mode 100644
index 0000000..03e8d88
--- /dev/null
+++ b/test/dapltest/test/dapl_memlist.c
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_MemListInit(Per_Test_Data_t * pt_ptr)
+{
+	DT_Mdep_LockInit(&pt_ptr->MemListLock);
+	pt_ptr->MemListHead = 0;
+}
+
+void *DT_MemListAlloc(Per_Test_Data_t * pt_ptr,
+		      char *file, mem_type_e t, int size)
+{
+	void *buffptr;
+	MemListEntry_t *entry_ptr;
+	buffptr = 0;
+	entry_ptr = 0;
+
+	buffptr = DT_Mdep_Malloc(size);
+	if (buffptr == 0) {
+		return 0;
+	}
+	if (pt_ptr == 0) {	/* not use mem_list */
+		return buffptr;
+	}
+	entry_ptr = (MemListEntry_t *) DT_Mdep_Malloc(sizeof(MemListEntry_t));
+	if (entry_ptr == 0) {
+		DT_Mdep_Free(buffptr);
+		return 0;
+	}
+	strcpy(entry_ptr->filename, file);
+	entry_ptr->MemType = t;
+	entry_ptr->mem_ptr = buffptr;
+
+	DT_Mdep_Lock(&pt_ptr->MemListLock);
+	entry_ptr->next = pt_ptr->MemListHead;
+	pt_ptr->MemListHead = entry_ptr;
+	DT_Mdep_Unlock(&pt_ptr->MemListLock);
+
+	return buffptr;
+}
+
+void DT_MemListFree(Per_Test_Data_t * pt_ptr, void *ptr)
+{
+	MemListEntry_t *pre, *cur;
+	if (pt_ptr == 0) {	/* not use mem_list */
+		DT_Mdep_Free(ptr);
+		return;
+	}
+	DT_Mdep_Lock(&pt_ptr->MemListLock);
+	pre = 0;
+	cur = pt_ptr->MemListHead;
+	while (cur) {
+		if (cur->mem_ptr == ptr) {
+			if (!pre) {	/* first entry */
+				pt_ptr->MemListHead = cur->next;
+				cur->next = 0;
+			} else {
+				pre->next = cur->next;
+				cur->next = 0;
+			}
+			DT_Mdep_Free(ptr);
+			DT_Mdep_Free(cur);
+			goto unlock_and_return;
+		}
+		pre = cur;
+		cur = cur->next;
+	}
+      unlock_and_return:
+	DT_Mdep_Unlock(&pt_ptr->MemListLock);
+}
+
+void DT_PrintMemList(Per_Test_Data_t * pt_ptr)
+{
+	char *type[10] = {
+		"BPOOL", "BUFF", "PERTESTDATA", "NIC", "NETADDRESS",
+		"TRANSACTIONTEST", "THREAD", "EPCONTEXT"
+	};
+	DT_Tdep_Print_Head *phead;
+	MemListEntry_t *cur;
+
+	phead = pt_ptr->Params.phead;
+	DT_Mdep_Lock(&pt_ptr->MemListLock);
+	cur = pt_ptr->MemListHead;
+	if (cur != 0) {
+		DT_Tdep_PT_Printf(phead,
+				  "the allocated memory that have not been returned are:\n");
+	}
+	while (cur) {
+		DT_Tdep_PT_Printf(phead, "file: dapl_%s, \tMemType:%s\n",
+				  cur->filename, type[cur->MemType]);
+		cur = cur->next;
+	}
+	DT_Mdep_Unlock(&pt_ptr->MemListLock);
+}
diff --git a/test/dapltest/test/dapl_performance_client.c b/test/dapltest/test/dapl_performance_client.c
new file mode 100644
index 0000000..96d5b47
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_client.c
@@ -0,0 +1,490 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define MAX_CONN_RETRY 8
+
+/****************************************************************************/
+DAT_RETURN
+DT_Performance_Test_Client(Params_t * params_ptr,
+			   Per_Test_Data_t * pt_ptr,
+			   DAT_IA_HANDLE * ia_handle,
+			   DAT_IA_ADDRESS_PTR remote_ia_addr)
+{
+	Performance_Test_t *test_ptr = NULL;
+	int connected = 1;
+	DT_Tdep_Print_Head *phead;
+	DAT_RETURN rc;
+
+	phead = pt_ptr->Params.phead;
+
+	DT_Tdep_PT_Debug(1, (phead, "Client: Starting performance test\n"));
+
+	if (!DT_Performance_Test_Create(pt_ptr,
+					ia_handle,
+					remote_ia_addr,
+					false,
+					pt_ptr->Server_Info.is_little_endian,
+					&test_ptr)) {
+		DT_Tdep_PT_Debug(1,
+				 (phead, "Client: Resource Creation Failed\n"));
+		connected = 0;
+	} else if (!DT_Performance_Test_Client_Connect(phead, test_ptr)) {
+		DT_Tdep_PT_Debug(1, (phead, "Client: Connection Failed\n"));
+		connected = 0;
+	}
+
+	if (connected) {
+		if (!DT_Performance_Test_Client_Exchange
+		    (params_ptr, phead, test_ptr)) {
+			DT_Tdep_PT_Debug(1, (phead, "Client: Test Failed\n"));
+		}
+	}
+	/* If we never connected, then the test will hang here
+	 *  because in the destroy of the test it waits for a
+	 *  disconnect event which will never arrive, simply
+	 *  because there was never a connection.
+	 */
+
+	DT_Performance_Test_Destroy(pt_ptr, test_ptr, false);
+
+#ifdef CM_BUSTED
+    /*****  XXX Chill out a bit to give the kludged CM a chance ...
+     *****/ DT_Mdep_Sleep(5000);
+#endif
+
+	DT_Tdep_PT_Debug(1, (phead, "Client: Finished performance test\n"));
+
+	return (connected ? DAT_SUCCESS : DAT_INSUFFICIENT_RESOURCES);
+}
+
+/****************************************************************************/
+bool
+DT_Performance_Test_Client_Connect(DT_Tdep_Print_Head * phead,
+				   Performance_Test_t * test_ptr)
+{
+	DAT_RETURN ret;
+	DAT_EVENT_NUMBER event_num;
+	unsigned int retry_cnt = 0;
+
+	/*
+	 * Client - connect
+	 */
+	DT_Tdep_PT_Debug(1,
+			 (phead,
+			  "Client[" F64x "]: Connect on port 0x" F64x "\n",
+			  test_ptr->base_port, test_ptr->ep_context.port));
+
+      retry:
+	ret = dat_ep_connect(test_ptr->ep_context.ep_handle, test_ptr->remote_ia_addr, test_ptr->ep_context.port, DAT_TIMEOUT_INFINITE, 0, (DAT_PVOID) 0,	/* no private data */
+			     test_ptr->cmd->qos, DAT_CONNECT_DEFAULT_FLAG);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x "]: dat_ep_connect error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		return false;
+	}
+
+	/* wait for DAT_CONNECTION_EVENT_ESTABLISHED */
+	if (!DT_conn_event_wait(phead,
+				test_ptr->ep_context.ep_handle,
+				test_ptr->conn_evd_hdl, &event_num)) {
+		if (event_num == DAT_CONNECTION_EVENT_PEER_REJECTED) {
+			DT_Mdep_Sleep(1000);
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: retrying connection...\n",
+					  test_ptr->base_port);
+			retry_cnt++;
+			if (retry_cnt < MAX_CONN_RETRY) {
+				goto retry;
+			}
+		}
+		/* error message printed by DT_cr_event_wait */
+		return false;
+	}
+#ifdef CM_BUSTED
+    /*****  XXX Chill out a bit to give the kludged CM a chance ...
+     *****/ DT_Mdep_Sleep(5000);
+#endif
+
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Client[" F64x "]: Got Connection\n",
+			  test_ptr->base_port));
+
+	return true;
+}
+
+/****************************************************************************/
+static bool
+DT_Performance_Test_Client_Phase1(DT_Tdep_Print_Head * phead,
+				  Performance_Test_t * test_ptr,
+				  Performance_Stats_t * stats)
+{
+	DT_Mdep_TimeStamp pre_ts;
+	DT_Mdep_TimeStamp post_ts;
+	DT_CpuStat pre_cpu_stat;
+	DT_CpuStat post_cpu_stat;
+	unsigned int post_cnt;
+	unsigned int reap_cnt;
+
+	/*
+	 * measure bandwidth, OPS, and CPU utilization
+	 */
+
+	if (!DT_Mdep_GetCpuStat(&pre_cpu_stat)) {
+		return false;
+	}
+
+	pre_ts = DT_Mdep_GetTimeStamp();
+
+	/*
+	 * Fill the pipe
+	 */
+
+	for (post_cnt = 0;
+	     post_cnt < (unsigned int)test_ptr->ep_context.pipeline_len;
+	     post_cnt++) {
+		if (!DT_performance_post_rdma_op
+		    (&test_ptr->ep_context, test_ptr->reqt_evd_hdl, stats)) {
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "Test[" F64x "]: Post %i failed\n",
+					  test_ptr->base_port, post_cnt));
+			return false;
+		}
+	}
+
+	/*
+	 * Reap completions and repost
+	 */
+
+	for (reap_cnt = 0; reap_cnt < test_ptr->cmd->num_iterations;) {
+		unsigned int cur_reap_cnt;
+		unsigned int cur_post_cnt;
+		unsigned int cur_post_i;
+
+		cur_reap_cnt = DT_performance_reap(phead,
+						   test_ptr->reqt_evd_hdl,
+						   test_ptr->cmd->mode, stats);
+
+		if (0 == cur_reap_cnt) {
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "Test[" F64x "]: Poll %i failed\n",
+					  test_ptr->base_port, reap_cnt));
+			return false;
+		}
+
+		/* repost */
+		cur_post_cnt = DT_min(test_ptr->cmd->num_iterations - post_cnt,
+				      cur_reap_cnt);
+
+		for (cur_post_i = 0; cur_post_i < cur_post_cnt; cur_post_i++) {
+			if (!DT_performance_post_rdma_op(&test_ptr->ep_context,
+							 test_ptr->reqt_evd_hdl,
+							 stats)) {
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Test[" F64x
+						  "]: Post %i failed\n",
+						  test_ptr->base_port,
+						  post_cnt));
+				return false;
+			}
+		}
+
+		reap_cnt += cur_reap_cnt;
+		post_cnt += cur_post_cnt;
+	}
+
+	/* end time and update stats */
+	post_ts = DT_Mdep_GetTimeStamp();
+	stats->time_ts = post_ts - pre_ts;
+	stats->num_ops = test_ptr->cmd->num_iterations;
+
+	if (!DT_Mdep_GetCpuStat(&post_cpu_stat)) {
+		return false;
+	}
+
+	/* calculate CPU utilization */
+	{
+		unsigned long int system;
+		unsigned long int user;
+		unsigned long int idle;
+		unsigned long int total;
+
+		system = post_cpu_stat.system - pre_cpu_stat.system;
+		user = post_cpu_stat.user - pre_cpu_stat.user;
+		idle = post_cpu_stat.idle - pre_cpu_stat.idle;
+
+		total = system + user + idle;
+
+		if (0 == total) {
+			stats->cpu_utilization = 0.0;
+		} else {
+			stats->cpu_utilization =
+			    (double)1.0 - ((double)idle / (double)total);
+			stats->cpu_utilization *= 100.0;
+		}
+	}
+
+	return true;
+}
+
+/****************************************************************************/
+static bool
+DT_Performance_Test_Client_Phase2(DT_Tdep_Print_Head * phead,
+				  Performance_Test_t * test_ptr,
+				  Performance_Stats_t * stats)
+{
+	DAT_LMR_TRIPLET *iov;
+	DAT_RMR_TRIPLET rmr_triplet;
+	DAT_DTO_COOKIE cookie;
+	DAT_EVENT event;
+	DAT_RETURN ret;
+	Performance_Ep_Context_t *ep_context;
+	Performance_Test_Op_t *op;
+	DT_Mdep_TimeStamp pre_ts;
+	DT_Mdep_TimeStamp post_ts;
+	unsigned long int bytes;
+	unsigned int i;
+
+	/*
+	 * measure latency
+	 */
+
+	ep_context = &test_ptr->ep_context;
+	op = &ep_context->op;
+	iov = DT_Bpool_GetIOV(op->bp, 0);
+
+	bytes = op->seg_size * op->num_segs;
+
+	/* Prep the inputs */
+	for (i = 0; i < op->num_segs; i++) {
+		iov[i].virtual_address = (DAT_VADDR) (uintptr_t)
+		    DT_Bpool_GetBuffer(op->bp, i);
+		iov[i].segment_length = op->seg_size;
+		iov[i].lmr_context = DT_Bpool_GetLMR(op->bp, i);
+	}
+
+	rmr_triplet.virtual_address = op->Rdma_Address;
+	rmr_triplet.segment_length = op->seg_size * op->num_segs;
+	rmr_triplet.rmr_context = op->Rdma_Context;
+
+	cookie.as_ptr = NULL;
+
+	for (i = 0; i < test_ptr->cmd->num_iterations; i++) {
+		if (RDMA_WRITE == op->transfer_type) {
+			pre_ts = DT_Mdep_GetTimeStamp();
+
+			ret = dat_ep_post_rdma_write(ep_context->ep_handle,
+						     op->num_segs,
+						     iov,
+						     cookie,
+						     &rmr_triplet,
+						     DAT_COMPLETION_DEFAULT_FLAG);
+		} else {
+			pre_ts = DT_Mdep_GetTimeStamp();
+
+			ret = dat_ep_post_rdma_read(ep_context->ep_handle,
+						    op->num_segs,
+						    iov,
+						    cookie,
+						    &rmr_triplet,
+						    DAT_COMPLETION_DEFAULT_FLAG);
+		}
+
+		if (DAT_SUCCESS != ret) {
+			return false;
+		}
+
+		for (;;) {
+			DT_Mdep_Schedule();
+			ret = DT_Tdep_evd_dequeue(test_ptr->reqt_evd_hdl,
+						  &event);
+
+			post_ts = DT_Mdep_GetTimeStamp();
+
+			if (DAT_GET_TYPE(ret) == DAT_QUEUE_EMPTY) {
+				continue;
+			} else if (DAT_SUCCESS != ret) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test Error: dapl_event_dequeue failed: %s\n",
+						  DT_RetToString(ret));
+				return false;
+			} else if (event.event_number ==
+				   DAT_DTO_COMPLETION_EVENT) {
+				DT_performance_stats_record_latency(stats,
+								    post_ts -
+								    pre_ts);
+				break;
+			} else {	/* error */
+
+				DT_Tdep_PT_Printf(phead,
+						  "Warning: dapl_performance_wait swallowing %s event\n",
+						  DT_EventToSTr(event.
+								event_number));
+
+				return false;
+			}
+		}
+	}
+
+	return true;
+}
+
+/****************************************************************************/
+bool
+DT_Performance_Test_Client_Exchange(Params_t * params_ptr,
+				    DT_Tdep_Print_Head * phead,
+				    Performance_Test_t * test_ptr)
+{
+	DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+	DAT_DTO_COOKIE dto_cookie;
+	Performance_Stats_t stats;
+	RemoteMemoryInfo *rmi;
+
+	test_ptr->ep_context.op.bp =
+	    DT_BpoolAlloc(test_ptr->pt_ptr,
+			  phead,
+			  test_ptr->ia_handle,
+			  test_ptr->pz_handle,
+			  test_ptr->ep_context.ep_handle,
+			  test_ptr->reqt_evd_hdl,
+			  test_ptr->ep_context.op.seg_size,
+			  test_ptr->ep_context.op.num_segs,
+			  DAT_OPTIMAL_ALIGNMENT, false, false);
+
+	if (!test_ptr->ep_context.op.bp) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x
+				  "]: no memory for buffers (RDMA/RD)\n",
+				  test_ptr->base_port);
+		return false;
+	}
+
+	/*
+	 * Recv the other side's info
+	 */
+	DT_Tdep_PT_Debug(1, (phead, "Test[" F64x "]: Waiting for Sync Msg\n",
+			     test_ptr->base_port));
+
+	dto_cookie.as_64 = LZERO;
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->ep_context.bp,
+					   DT_PERF_SYNC_RECV_BUFFER_ID);
+	if (!DT_dto_event_wait(phead, test_ptr->recv_evd_hdl, &dto_stat) ||
+	    !DT_dto_check(phead,
+			  &dto_stat,
+			  test_ptr->ep_context.ep_handle,
+			  DT_PERF_SYNC_BUFF_SIZE,
+			  dto_cookie, "Received Sync_Msg")) {
+		return false;
+	}
+
+	/*
+	 * Extract what we need
+	 */
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: Sync Msg Received\n",
+			  test_ptr->base_port));
+	rmi =
+	    (RemoteMemoryInfo *) DT_Bpool_GetBuffer(test_ptr->ep_context.bp,
+						    DT_PERF_SYNC_RECV_BUFFER_ID);
+
+	/*
+	 * If the client and server are of different endiannesses,
+	 * we must correct the endianness of the handle and address
+	 * we pass to the other side.  The other side cannot (and
+	 * better not) interpret these values.
+	 */
+	if (DT_local_is_little_endian != test_ptr->is_remote_little_endian) {
+		rmi->rmr_context = DT_EndianMemHandle(rmi->rmr_context);
+		rmi->mem_address.as_64 =
+		    DT_EndianMemAddress(rmi->mem_address.as_64);
+	}
+
+	test_ptr->ep_context.op.Rdma_Context = rmi->rmr_context;
+	test_ptr->ep_context.op.Rdma_Address = rmi->mem_address.as_64;
+
+	DT_Tdep_PT_Debug(3, (phead,
+			     "Got RemoteMemInfo [ va=" F64x ", ctx=%x ]\n",
+			     test_ptr->ep_context.op.Rdma_Address,
+			     test_ptr->ep_context.op.Rdma_Context));
+
+	/*
+	 * Get to work ...
+	 */
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: Begin...\n",
+			  test_ptr->base_port));
+
+	DT_performance_stats_init(&stats);
+
+	if (!DT_Performance_Test_Client_Phase1(phead, test_ptr, &stats)) {
+		return false;
+	}
+
+	if (!DT_Performance_Test_Client_Phase2(phead, test_ptr, &stats)) {
+		return false;
+	}
+
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: Sending Sync Msg\n",
+			  test_ptr->base_port));
+
+	if (!DT_post_send_buffer(phead,
+				 test_ptr->ep_context.ep_handle,
+				 test_ptr->ep_context.bp,
+				 DT_PERF_SYNC_SEND_BUFFER_ID,
+				 DT_PERF_SYNC_BUFF_SIZE)) {
+		/* error message printed by DT_post_send_buffer */
+		return false;
+	}
+
+	dto_cookie.as_64 = LZERO;
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->ep_context.bp,
+					   DT_PERF_SYNC_SEND_BUFFER_ID);
+	if (!DT_dto_event_wait(phead, test_ptr->reqt_evd_hdl, &dto_stat) ||
+	    !DT_dto_check(phead,
+			  &dto_stat,
+			  test_ptr->ep_context.ep_handle,
+			  DT_PERF_SYNC_BUFF_SIZE,
+			  dto_cookie, "Client_Sync_Send")) {
+		return false;
+	}
+	DT_performance_stats_print(params_ptr, phead, &stats, test_ptr->cmd,
+				   test_ptr);
+
+	return true;
+}
diff --git a/test/dapltest/test/dapl_performance_server.c b/test/dapltest/test/dapl_performance_server.c
new file mode 100644
index 0000000..5083967
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_server.c
@@ -0,0 +1,391 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/****************************************************************************/
+void DT_Performance_Test_Server(void *var)
+{
+	Per_Test_Data_t *pt_ptr = var;
+	Performance_Test_t *test_ptr = NULL;
+	DT_Tdep_Print_Head *phead;
+	int success = 1;
+
+	phead = pt_ptr->Params.phead;
+	DT_Tdep_PT_Debug(1, (phead, "Server: Starting performance test\n"));
+
+	if (!DT_Performance_Test_Create(pt_ptr,
+					pt_ptr->ps_ptr->ia_handle,
+					(DAT_IA_ADDRESS_PTR) 0,
+					true,
+					pt_ptr->Client_Info.is_little_endian,
+					&test_ptr)) {
+		DT_Tdep_PT_Printf(phead, "Server: Resource Creation Failed\n");
+		success = 0;
+	}
+	if (1 == success) {
+		if (!DT_Performance_Test_Server_Connect(phead, test_ptr)) {
+			success = 0;
+			DT_Tdep_PT_Printf(phead, "Server: Connection Failed\n");
+		}
+	}
+
+	if (1 == success) {
+		if (!DT_Performance_Test_Server_Exchange(phead, test_ptr)) {
+			success = 0;
+			DT_Tdep_PT_Printf(phead, "Server: Test Failed\n");
+		}
+	}
+#ifdef CM_BUSTED
+    /*****  XXX Chill out a bit to give the kludged CM a chance ...
+     *****/ DT_Mdep_Sleep(5000);
+#endif
+
+	DT_Performance_Test_Destroy(pt_ptr, test_ptr, true);
+
+	DT_Tdep_PT_Printf(phead,
+			  "Server: Finished performance test.  Detaching.\n");
+
+	DT_Mdep_Thread_Detach(DT_Mdep_Thread_SELF());	/* AMM */
+	DT_Thread_Destroy(pt_ptr->thread, pt_ptr);	/* destroy Master thread */
+
+	DT_Mdep_Lock(&pt_ptr->ps_ptr->num_clients_lock);
+	pt_ptr->ps_ptr->num_clients--;
+	DT_Mdep_Unlock(&pt_ptr->ps_ptr->num_clients_lock);
+
+	DT_PrintMemList(pt_ptr);	/* check if we return all space allocated */
+	DT_Mdep_LockDestroy(&pt_ptr->Thread_counter_lock);
+	DT_Mdep_LockDestroy(&pt_ptr->MemListLock);
+	DT_Free_Per_Test_Data(pt_ptr);
+
+	DT_Mdep_Unlock(&g_PerfTestLock);
+	DT_Tdep_PT_Printf(phead,
+			  "Server: Finished performance test.  Exiting.\n");
+
+	DT_Mdep_Thread_EXIT(NULL);
+}
+
+/****************************************************************************/
+bool
+DT_Performance_Test_Server_Connect(DT_Tdep_Print_Head * phead,
+				   Performance_Test_t * test_ptr)
+{
+	DAT_RETURN ret;
+	bool status;
+	DAT_RSP_HANDLE rsp_handle;
+	DAT_PSP_HANDLE psp_handle;
+
+	DAT_CR_ARRIVAL_EVENT_DATA cr_stat;
+	DAT_CR_HANDLE cr_handle;
+	DAT_EVENT_NUMBER event_num;
+
+	rsp_handle = DAT_HANDLE_NULL;
+	psp_handle = DAT_HANDLE_NULL;
+#if 0				/* FIXME */
+	if (test_ptr->cmd->use_rsp) {
+		/*
+		 * Server - create a single-use RSP and
+		 *          await a connection for this EP
+		 */
+		ret = dat_rsp_create(test_ptr->ia_handle,
+				     test_ptr->ep_context.port,
+				     test_ptr->ep_context.ep_handle,
+				     test_ptr->creq_evd_hdl, &rsp_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_rsp_create error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			status = false;
+			goto psp_free;
+		}
+
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Server[" F64x "]: Listen on RSP port 0x" F64x
+				  "\n", test_ptr->base_port,
+				  test_ptr->ep_context.port));
+
+		/* wait for the connection request */
+		if (!DT_cr_event_wait(test_ptr->conn_evd_hdl, &cr_stat) ||
+		    !DT_cr_check(&cr_stat,
+				 DAT_HANDLE_NULL,
+				 test_ptr->ep_context.port,
+				 &cr_handle, "Server")) {
+			status = false;
+			goto psp_free;
+		}
+
+		/* what, me query?  just try to accept the connection */
+		ret = dat_cr_accept(cr_handle,
+				    test_ptr->ep_context.ep_handle,
+				    0, (DAT_PVOID) 0 /* no private data */ );
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_cr_accept error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* cr_handle consumed on failure */
+			status = false;
+			goto psp_free;
+		}
+
+		/* wait for DAT_CONNECTION_EVENT_ESTABLISHED */
+		if (!DT_conn_event_wait(test_ptr->ep_context.ep_handle,
+					test_ptr->conn_evd_hdl, &event_num)) {
+			/* error message printed by DT_conn_event_wait */
+			status = false;
+			goto psp_free;
+		}
+
+	} else
+#endif				/* FIXME */
+	{
+		/*
+		 * Server - use a short-lived PSP instead of an RSP
+		 */
+		status = true;
+
+		ret = dat_psp_create(test_ptr->ia_handle,
+				     test_ptr->ep_context.port,
+				     test_ptr->creq_evd_hdl,
+				     DAT_PSP_CONSUMER_FLAG, &psp_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_psp_create error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			status = false;
+			psp_handle = DAT_HANDLE_NULL;
+			return (status);
+		}
+
+	}
+
+	/*
+	 * Here's where we tell the main server process that
+	 * this thread is ready to wait for a connection request
+	 * from the remote end.
+	 */
+	DT_Mdep_wait_object_wakeup(&test_ptr->pt_ptr->synch_wait_object);
+
+	DT_Tdep_PT_Debug(1,
+			 (phead,
+			  "Server[" F64x "]: Listen on PSP port 0x" F64x "\n",
+			  test_ptr->base_port, test_ptr->ep_context.port));
+
+	/* wait for a connection request */
+	if (!DT_cr_event_wait(phead, test_ptr->creq_evd_hdl, &cr_stat) ||
+	    !DT_cr_check(phead,
+			 &cr_stat,
+			 psp_handle,
+			 test_ptr->ep_context.port, &cr_handle, "Server")) {
+		status = false;
+		goto psp_free;
+	}
+
+	/* what, me query?  just try to accept the connection */
+	ret = dat_cr_accept(cr_handle,
+			    test_ptr->ep_context.ep_handle,
+			    0, (DAT_PVOID) 0 /* no private data */ );
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x "]: dat_cr_accept error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		/* cr_handle consumed on failure */
+		status = false;
+		goto psp_free;
+	}
+
+	/* wait for DAT_CONNECTION_EVENT_ESTABLISHED */
+	if (!DT_conn_event_wait(phead,
+				test_ptr->ep_context.ep_handle,
+				test_ptr->conn_evd_hdl, &event_num)) {
+		/* error message printed by DT_cr_event_wait */
+		status = false;
+		goto psp_free;
+	}
+
+	DT_Tdep_PT_Debug(1,
+			 (phead,
+			  "Server[" F64x "]: Accept on port 0x" F64x "\n",
+			  test_ptr->base_port, test_ptr->ep_context.port));
+      psp_free:
+	if (DAT_HANDLE_NULL != psp_handle) {
+		/* throw away single-use PSP */
+		ret = dat_psp_free(psp_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_psp_free error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			status = false;
+		}
+	}
+	if (DAT_HANDLE_NULL != rsp_handle) {
+		/* throw away single-use PSP */
+		ret = dat_rsp_free(rsp_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_rsp_free error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			status = false;
+		}
+	}
+	/* end short-lived PSP */
+#ifdef CM_BUSTED
+    /*****  XXX Chill out a bit to give the kludged CM a chance ...
+     *****/ DT_Mdep_Sleep(5000);
+#endif
+
+	return status;
+}
+
+/****************************************************************************/
+bool
+DT_Performance_Test_Server_Exchange(DT_Tdep_Print_Head * phead,
+				    Performance_Test_t * test_ptr)
+{
+	DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+	RemoteMemoryInfo *rmi;
+	DAT_DTO_COOKIE dto_cookie;
+
+	test_ptr->ep_context.op.bp =
+	    DT_BpoolAlloc(test_ptr->pt_ptr,
+			  phead,
+			  test_ptr->ia_handle,
+			  test_ptr->pz_handle,
+			  test_ptr->ep_context.ep_handle,
+			  test_ptr->reqt_evd_hdl,
+			  test_ptr->ep_context.op.seg_size,
+			  test_ptr->ep_context.op.num_segs,
+			  DAT_OPTIMAL_ALIGNMENT, true, true);
+
+	if (!test_ptr->ep_context.op.bp) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x
+				  "]: no memory for buffers (RDMA/RD)\n",
+				  test_ptr->base_port);
+		return false;
+	}
+
+	test_ptr->ep_context.op.Rdma_Context =
+	    DT_Bpool_GetRMR(test_ptr->ep_context.op.bp, 0);
+	test_ptr->ep_context.op.Rdma_Address = (DAT_VADDR) (uintptr_t)
+	    DT_Bpool_GetBuffer(test_ptr->ep_context.op.bp, 0);
+
+	/*
+	 * Prep send buffer with memory information
+	 */
+	rmi = (RemoteMemoryInfo *) DT_Bpool_GetBuffer(test_ptr->ep_context.bp,
+						      DT_PERF_SYNC_SEND_BUFFER_ID);
+
+	rmi->rmr_context = test_ptr->ep_context.op.Rdma_Context;
+	rmi->mem_address.as_64 = test_ptr->ep_context.op.Rdma_Address;
+
+	if (rmi->mem_address.as_ptr) {
+		DT_Tdep_PT_Debug(3, (phead,
+				     "RemoteMemInfo va=" F64x ", ctx=%x\n",
+				     rmi->mem_address.as_64, rmi->rmr_context));
+	}
+
+	/*
+	 * If the client and server are of different endiannesses,
+	 * we must correct the endianness of the handle and address
+	 * we pass to the other side.  The other side cannot (and
+	 * better not) interpret these values.
+	 */
+	if (DT_local_is_little_endian != test_ptr->is_remote_little_endian) {
+		rmi->rmr_context = DT_EndianMemHandle(rmi->rmr_context);
+		rmi->mem_address.as_64 =
+		    DT_EndianMemAddress(rmi->mem_address.as_64);
+	}
+
+	/*
+	 * Send our memory info
+	 */
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: Sending Sync Msg\n",
+			  test_ptr->base_port));
+
+	/* post the send buffer */
+	if (!DT_post_send_buffer(phead,
+				 test_ptr->ep_context.ep_handle,
+				 test_ptr->ep_context.bp,
+				 DT_PERF_SYNC_SEND_BUFFER_ID,
+				 DT_PERF_SYNC_BUFF_SIZE)) {
+		/* error message printed by DT_post_send_buffer */
+		return false;
+	}
+
+	/* reap the send and verify it */
+	dto_cookie.as_64 = LZERO;
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->ep_context.bp,
+					   DT_PERF_SYNC_SEND_BUFFER_ID);
+	if (!DT_dto_event_wait(phead, test_ptr->reqt_evd_hdl, &dto_stat) ||
+	    !DT_dto_check(phead,
+			  &dto_stat,
+			  test_ptr->ep_context.ep_handle,
+			  DT_PERF_SYNC_BUFF_SIZE,
+			  dto_cookie, "Send Sync_Msg")) {
+		return false;
+	}
+
+	/*
+	 * Recv the other side's info
+	 */
+	DT_Tdep_PT_Debug(1, (phead, "Test[" F64x "]: Waiting for Sync Msg\n",
+			     test_ptr->base_port));
+
+	dto_cookie.as_64 = LZERO;
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->ep_context.bp,
+					   DT_PERF_SYNC_RECV_BUFFER_ID);
+	if (!DT_dto_event_wait(phead, test_ptr->recv_evd_hdl, &dto_stat) ||
+	    !DT_dto_check(phead,
+			  &dto_stat,
+			  test_ptr->ep_context.ep_handle,
+			  DT_PERF_SYNC_BUFF_SIZE,
+			  dto_cookie, "Received Sync_Msg")) {
+		return false;
+	}
+
+	DT_Tdep_PT_Debug(1, (phead, "Test[" F64x "]: Received Sync Msg\n",
+			     test_ptr->base_port));
+
+	return true;
+}
diff --git a/test/dapltest/test/dapl_performance_stats.c b/test/dapltest/test/dapl_performance_stats.c
new file mode 100644
index 0000000..95fa202
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_stats.c
@@ -0,0 +1,374 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_performance_stats_init(Performance_Stats_t * stats)
+{
+	stats->num_ops = 0;
+	stats->bytes = 0;
+	stats->post_ctxt_switch_num = 0;
+	stats->reap_ctxt_switch_num = 0;
+
+	stats->cpu_utilization = 0.0;
+	stats->time_ts = 0;
+
+	stats->posts_sans_ctxt.num = 0;
+	stats->posts_sans_ctxt.total_ts = 0;
+	stats->posts_sans_ctxt.max_ts = 0;
+	stats->posts_sans_ctxt.min_ts = ~0;
+
+	stats->posts_with_ctxt.num = 0;
+	stats->posts_with_ctxt.total_ts = 0;
+	stats->posts_with_ctxt.max_ts = 0;
+	stats->posts_with_ctxt.min_ts = ~0;
+
+	stats->reaps_sans_ctxt.num = 0;
+	stats->reaps_sans_ctxt.total_ts = 0;
+	stats->reaps_sans_ctxt.max_ts = 0;
+	stats->reaps_sans_ctxt.min_ts = ~0;
+
+	stats->reaps_with_ctxt.num = 0;
+	stats->reaps_with_ctxt.total_ts = 0;
+	stats->reaps_with_ctxt.max_ts = 0;
+	stats->reaps_with_ctxt.min_ts = ~0;
+
+	stats->latency.num = 0;
+	stats->latency.total_ts = 0;
+	stats->latency.max_ts = 0;
+	stats->latency.min_ts = ~0;
+}
+
+void
+DT_performance_stats_record_post(Performance_Stats_t * stats,
+				 unsigned long ctxt_switch_num,
+				 DT_Mdep_TimeStamp ts)
+{
+	if (ctxt_switch_num) {
+		stats->posts_with_ctxt.num++;
+		stats->posts_with_ctxt.total_ts += ts;
+		stats->posts_with_ctxt.max_ts =
+		    DT_max(stats->posts_with_ctxt.max_ts, ts);
+		stats->posts_with_ctxt.min_ts =
+		    DT_min(stats->posts_with_ctxt.min_ts, ts);
+
+		stats->post_ctxt_switch_num += ctxt_switch_num;
+	} else {
+		stats->posts_sans_ctxt.num++;
+		stats->posts_sans_ctxt.total_ts += ts;
+		stats->posts_sans_ctxt.max_ts =
+		    DT_max(stats->posts_sans_ctxt.max_ts, ts);
+		stats->posts_sans_ctxt.min_ts =
+		    DT_min(stats->posts_sans_ctxt.min_ts, ts);
+	}
+}
+
+void
+DT_performance_stats_record_reap(Performance_Stats_t * stats,
+				 unsigned long ctxt_switch_num,
+				 DT_Mdep_TimeStamp ts)
+{
+	if (ctxt_switch_num) {
+		stats->reaps_with_ctxt.num++;
+		stats->reaps_with_ctxt.total_ts += ts;
+		stats->reaps_with_ctxt.max_ts =
+		    DT_max(stats->reaps_with_ctxt.max_ts, ts);
+		stats->reaps_with_ctxt.min_ts =
+		    DT_min(stats->reaps_with_ctxt.min_ts, ts);
+
+		stats->reap_ctxt_switch_num += ctxt_switch_num;
+	} else {
+		stats->reaps_sans_ctxt.num++;
+		stats->reaps_sans_ctxt.total_ts += ts;
+		stats->reaps_sans_ctxt.max_ts =
+		    DT_max(stats->reaps_sans_ctxt.max_ts, ts);
+		stats->reaps_sans_ctxt.min_ts =
+		    DT_min(stats->reaps_sans_ctxt.min_ts, ts);
+	}
+}
+
+void
+DT_performance_stats_record_latency(Performance_Stats_t * stats,
+				    DT_Mdep_TimeStamp ts)
+{
+	stats->latency.num++;
+	stats->latency.total_ts += ts;
+	stats->latency.max_ts = DT_max(stats->latency.max_ts, ts);
+	stats->latency.min_ts = DT_min(stats->latency.min_ts, ts);
+}
+
+void
+DT_performance_stats_data_combine(Performance_Stats_Data_t * dest,
+				  Performance_Stats_Data_t * src_a,
+				  Performance_Stats_Data_t * src_b)
+{
+	dest->num = src_a->num + src_b->num;
+	dest->total_ts = src_a->total_ts + src_b->total_ts;
+	dest->max_ts = DT_max(src_a->max_ts, src_b->max_ts);
+	dest->min_ts = DT_min(src_a->min_ts, src_b->min_ts);
+}
+
+void
+DT_performance_stats_combine(Performance_Stats_t * dest,
+			     Performance_Stats_t * src_a,
+			     Performance_Stats_t * src_b)
+{
+	dest->num_ops = src_a->num_ops + src_b->num_ops;
+
+	dest->bytes = src_a->bytes + src_b->bytes;
+
+	dest->post_ctxt_switch_num =
+	    src_a->post_ctxt_switch_num + src_b->post_ctxt_switch_num;
+
+	dest->reap_ctxt_switch_num =
+	    src_b->reap_ctxt_switch_num + src_b->reap_ctxt_switch_num;
+
+	dest->cpu_utilization = DT_max(src_a->cpu_utilization,
+				       src_b->cpu_utilization);
+	dest->time_ts = DT_max(src_a->time_ts, src_b->time_ts);
+
+	DT_performance_stats_data_combine(&dest->posts_sans_ctxt,
+					  &src_a->posts_sans_ctxt,
+					  &src_b->posts_sans_ctxt);
+
+	DT_performance_stats_data_combine(&dest->posts_with_ctxt,
+					  &src_a->posts_with_ctxt,
+					  &src_b->posts_with_ctxt);
+
+	DT_performance_stats_data_combine(&dest->reaps_sans_ctxt,
+					  &src_a->reaps_sans_ctxt,
+					  &src_b->reaps_sans_ctxt);
+
+	DT_performance_stats_data_combine(&dest->reaps_with_ctxt,
+					  &src_a->reaps_with_ctxt,
+					  &src_b->reaps_with_ctxt);
+
+	DT_performance_stats_data_combine(&dest->latency,
+					  &src_a->latency, &src_b->latency);
+}
+
+double
+DT_performance_stats_data_print(DT_Tdep_Print_Head * phead,
+				Performance_Stats_Data_t * data, double cpu_mhz)
+{
+	double average;
+
+	average = (int64_t) data->total_ts / (data->num * cpu_mhz);
+
+	DT_Tdep_PT_Printf(phead,
+			  "    Arithmetic mean      : %d.%d us\n"
+			  "    maximum              : %d.%d us\n"
+			  "    minimum              : %d.%d us\n",
+			  DT_whole(average), DT_hundredths(average),
+			  DT_whole((int64_t) data->max_ts / cpu_mhz),
+			  DT_hundredths((int64_t) data->max_ts / cpu_mhz),
+			  DT_whole((int64_t) data->min_ts / cpu_mhz),
+			  DT_hundredths((int64_t) data->min_ts / cpu_mhz));
+	return average;
+}
+
+void
+DT_performance_stats_print(Params_t * params_ptr,
+			   DT_Tdep_Print_Head * phead,
+			   Performance_Stats_t * stats,
+			   Performance_Cmd_t * cmd, Performance_Test_t * test)
+{
+	double cpu_mhz;
+	double time_s;
+	double mbytes;
+	double ops_per_sec;
+	double bandwidth;
+	double latency;
+	double time_per_post;
+	double time_per_reap;
+
+	cpu_mhz = params_ptr->cpu_mhz;
+	latency = 0;
+#if defined(WIN32)
+	/*
+	 * The Microsoft compiler is unable to do a 64 bit conversion when
+	 * working with double. time_ts is a 64 bit value, so we
+	 * potentially lose precision, so limit it to the Windows
+	 * platform. Trying to do the operation below without casting
+	 * a 64 bit value to an unsigned int results in the error when
+	 * using Visual C 6.0:
+	 *
+	 *    Compiler Error C2520: conversion from unsigned __int64 to
+	 *    double not implemented, use signed __int64.
+	 *
+	 * Note that signed __int64 doesn't work either!
+	 */
+	time_s = (double)((unsigned int)stats->time_ts / (1000000.0 * cpu_mhz));
+#else
+	time_s = (double)(stats->time_ts / (1000000.0 * cpu_mhz));
+#endif
+	mbytes = (double)(1.0 * stats->bytes) / 1024 / 1024;
+
+	if (0.0 == time_s) {
+		DT_Tdep_PT_Printf(phead, "Error determining time\n");
+		return;
+	} else if (0 == stats->num_ops) {
+		DT_Tdep_PT_Printf(phead,
+				  "Error determining number of operations\n");
+		return;
+	} else if (0.0 == cpu_mhz) {
+		DT_Tdep_PT_Printf(phead, "Error determining CPU speed\n");
+		return;
+	}
+
+	ops_per_sec = stats->num_ops / time_s;
+	bandwidth = mbytes / time_s;
+	DT_Tdep_PT_Printf(phead,
+			  "------------------------- Statistics -------------------------\n");
+	DT_Tdep_PT_Printf(phead,
+			  "    Mode                 : %s\n"
+			  "    Operation Type       : %s\n"
+			  "    Number of Operations : %u\n"
+			  "    Segment Size         : %u\n"
+			  "    Number of Segments   : %u \n"
+			  "    Pipeline Length      : %u\n\n",
+			  DT_PerformanceModeToString(cmd->mode),
+			  DT_TransferTypeToString(cmd->op.transfer_type),
+			  cmd->num_iterations, cmd->op.seg_size,
+			  cmd->op.num_segs, test->ep_context.pipeline_len);
+
+	DT_Tdep_PT_Printf(phead,
+			  "    Total Time           : %d.%d sec\n"
+			  "    Total Data Exchanged : %d.%d MB\n"
+			  "    CPU Utilization      : %d.%d\n"
+			  "    Operation Throughput : %d.%d ops/sec\n"
+			  "    Bandwidth            : %d.%d MB/sec\n",
+			  DT_whole(time_s), DT_hundredths(time_s),
+			  DT_whole(mbytes), DT_hundredths(mbytes),
+			  DT_whole(stats->cpu_utilization),
+			  DT_hundredths(stats->cpu_utilization),
+			  DT_whole(ops_per_sec), DT_hundredths(ops_per_sec),
+			  DT_whole(bandwidth), DT_hundredths(bandwidth));
+
+	DT_Tdep_PT_Printf(phead, "\nLatency\n");
+
+	if (stats->latency.num) {
+		latency = DT_performance_stats_data_print(phead,
+							  &stats->latency,
+							  cpu_mhz);
+	}
+	DT_Tdep_PT_Printf(phead, "\n"
+			  "Time Per Post\n"
+			  "    %u posts without context switches\n",
+			  stats->posts_sans_ctxt.num);
+
+	if (stats->posts_sans_ctxt.num) {
+		DT_performance_stats_data_print(phead,
+						&stats->posts_sans_ctxt,
+						cpu_mhz);
+	}
+
+	DT_Tdep_PT_Printf(phead, "\n"
+			  "    %u posts with context switches\n",
+			  stats->posts_with_ctxt.num);
+
+	if (stats->posts_with_ctxt.num) {
+		DT_Tdep_PT_Printf(phead, "    %u number of context switches\n",
+				  stats->post_ctxt_switch_num);
+		DT_performance_stats_data_print(phead,
+						&stats->posts_with_ctxt,
+						cpu_mhz);
+	}
+
+	DT_Tdep_PT_Printf(phead, "\n"
+			  "Time Per Reap\n"
+			  "    %u reaps without context switches\n",
+			  stats->reaps_sans_ctxt.num);
+
+	if (stats->reaps_sans_ctxt.num) {
+		DT_performance_stats_data_print(phead,
+						&stats->reaps_sans_ctxt,
+						cpu_mhz);
+	}
+
+	DT_Tdep_PT_Printf(phead, "\n"
+			  "    %u reaps with context switches\n",
+			  stats->reaps_with_ctxt.num);
+
+	if (stats->reaps_with_ctxt.num) {
+		DT_Tdep_PT_Printf(phead, "\n"
+				  "    %u number of context switches\n",
+				  stats->reap_ctxt_switch_num);
+
+		DT_performance_stats_data_print(phead,
+						&stats->reaps_with_ctxt,
+						cpu_mhz);
+	}
+
+	time_per_post =
+	    (int64_t) (stats->posts_sans_ctxt.total_ts +
+		       stats->posts_with_ctxt.total_ts) / (cpu_mhz *
+							   (stats->
+							    posts_sans_ctxt.
+							    num +
+							    stats->
+							    posts_with_ctxt.
+							    num));
+
+	time_per_reap =
+	    (int64_t) (stats->reaps_sans_ctxt.total_ts +
+		       stats->reaps_with_ctxt.total_ts) / (cpu_mhz *
+							   (stats->
+							    reaps_sans_ctxt.
+							    num +
+							    stats->
+							    reaps_with_ctxt.
+							    num));
+
+	DT_Tdep_PT_Printf(phead, "\nNOTE: 1 MB = 1024 KB = 1048576 B \n");
+	DT_Tdep_PT_Printf(phead,
+			  "---------------------------------------------------------------------\n");
+	DT_Tdep_PT_Printf(phead,
+			  "raw: %s, %u, %u, %u, %u, %d.%d, %d.%d, %d.%d, %d.%d, %d.%d, %d.%d \n",
+			  DT_TransferTypeToString(cmd->op.transfer_type),
+			  cmd->num_iterations,
+			  cmd->op.seg_size,
+			  cmd->op.num_segs,
+			  test->ep_context.pipeline_len,
+			  DT_whole(stats->cpu_utilization),
+			  DT_hundredths(stats->cpu_utilization),
+			  DT_whole(ops_per_sec),
+			  DT_hundredths(ops_per_sec),
+			  DT_whole(bandwidth),
+			  DT_hundredths(bandwidth),
+			  DT_whole(latency),
+			  DT_hundredths(latency),
+			  DT_whole(time_per_post),
+			  DT_hundredths(time_per_post),
+			  DT_whole(time_per_reap),
+			  DT_hundredths(time_per_reap));
+	DT_Tdep_PT_Printf(phead,
+			  "---------------------------------------------------------------------\n");
+}
diff --git a/test/dapltest/test/dapl_performance_util.c b/test/dapltest/test/dapl_performance_util.c
new file mode 100644
index 0000000..5023be0
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_util.c
@@ -0,0 +1,618 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define DT_Mdep_GetContextSwitchNum() 0	/* FIXME */
+
+/****************************************************************************/
+bool
+DT_Performance_Test_Create(Per_Test_Data_t * pt_ptr,
+			   DAT_IA_HANDLE * ia_handle,
+			   DAT_IA_ADDRESS_PTR remote_ia_addr,
+			   DAT_BOOLEAN is_server,
+			   DAT_BOOLEAN is_remote_little_endian,
+			   Performance_Test_t ** perf_test)
+{
+	Performance_Test_t *test_ptr;
+	DAT_COUNT pipeline_len;
+	DAT_RETURN ret;
+	DT_Tdep_Print_Head *phead;
+
+	phead = pt_ptr->Params.phead;
+
+	test_ptr = DT_MemListAlloc(pt_ptr,
+				   "transaction_test_t",
+				   TRANSACTIONTEST, sizeof(Performance_Test_t));
+	if (NULL == test_ptr) {
+		return false;
+	}
+
+	*perf_test = test_ptr;
+
+	test_ptr->pt_ptr = pt_ptr;
+	test_ptr->remote_ia_addr = remote_ia_addr;
+	test_ptr->is_remote_little_endian = is_remote_little_endian;
+	test_ptr->base_port =
+	    (DAT_CONN_QUAL) pt_ptr->Server_Info.first_port_number;
+	test_ptr->ia_handle = ia_handle;
+	test_ptr->cmd = &pt_ptr->Params.u.Performance_Cmd;
+
+	ret = dat_ia_query(test_ptr->ia_handle,
+			   NULL, DAT_IA_ALL, &test_ptr->ia_attr, 0, NULL);
+	if (DAT_SUCCESS != ret) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x "]: dat_ia_query error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		return false;
+	}
+
+	pipeline_len = DT_min(DT_min(test_ptr->cmd->num_iterations,
+				     test_ptr->cmd->pipeline_len),
+			      DT_min(test_ptr->ia_attr.max_dto_per_ep,
+				     test_ptr->ia_attr.max_evd_qlen));
+
+	if (RDMA_READ == test_ptr->cmd->op.transfer_type) {
+		pipeline_len = DT_min(pipeline_len,
+				      test_ptr->ia_attr.max_rdma_read_per_ep);
+	}
+
+	test_ptr->reqt_evd_length = pipeline_len;
+	test_ptr->recv_evd_length = DT_PERF_DFLT_EVD_LENGTH;
+	test_ptr->conn_evd_length = DT_PERF_DFLT_EVD_LENGTH;
+	test_ptr->creq_evd_length = DT_PERF_DFLT_EVD_LENGTH;
+
+	/* create a protection zone */
+	ret = dat_pz_create(test_ptr->ia_handle, &test_ptr->pz_handle);
+	if (DAT_SUCCESS != ret) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x "]: dat_pz_create error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		test_ptr->pz_handle = DAT_HANDLE_NULL;
+		return false;
+	}
+
+	/* create 4 EVDs - recv, request+RMR, conn-request, connect */
+	ret = DT_Tdep_evd_create(test_ptr->ia_handle, test_ptr->recv_evd_length, test_ptr->cno_handle, DAT_EVD_DTO_FLAG, &test_ptr->recv_evd_hdl);	/* recv */
+	if (DAT_SUCCESS != ret) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x
+				  "]: dat_evd_create (recv) error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		test_ptr->recv_evd_hdl = DAT_HANDLE_NULL;
+		return false;
+	}
+
+	ret = DT_Tdep_evd_create(test_ptr->ia_handle, test_ptr->reqt_evd_length, test_ptr->cno_handle, DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG, &test_ptr->reqt_evd_hdl);	/* request + rmr bind */
+	if (DAT_SUCCESS != ret) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x
+				  "]: dat_evd_create (request) error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		test_ptr->reqt_evd_hdl = DAT_HANDLE_NULL;
+		return false;
+	}
+
+	if (is_server) {
+		/* Client-side doesn't need CR events */
+		ret = DT_Tdep_evd_create(test_ptr->ia_handle, test_ptr->creq_evd_length, DAT_HANDLE_NULL, DAT_EVD_CR_FLAG, &test_ptr->creq_evd_hdl);	/* cr */
+		if (DAT_SUCCESS != ret) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_evd_create (cr) error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			test_ptr->creq_evd_hdl = DAT_HANDLE_NULL;
+			return false;
+		}
+	}
+
+	ret = DT_Tdep_evd_create(test_ptr->ia_handle, test_ptr->conn_evd_length, DAT_HANDLE_NULL, DAT_EVD_CONNECTION_FLAG, &test_ptr->conn_evd_hdl);	/* conn */
+	if (DAT_SUCCESS != ret) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x
+				  "]: dat_evd_create (conn) error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		test_ptr->conn_evd_hdl = DAT_HANDLE_NULL;
+		return false;
+	}
+
+	/*
+	 * Set up the EP context:
+	 *          create the EP
+	 *          allocate buffers for remote memory info and sync message
+	 *          post the receive buffers
+	 *          connect
+	 *          set up buffers and remote memory info
+	 *          send across our info
+	 *          recv the other side's info and extract what we need
+	 */
+	test_ptr->ep_context.ep_attr = test_ptr->pt_ptr->ep_attr;
+	test_ptr->ep_context.ep_attr.max_request_dtos = pipeline_len;
+
+	/* Create EP */
+	ret = dat_ep_create(test_ptr->ia_handle,	/* IA       */
+			    test_ptr->pz_handle,	/* PZ       */
+			    test_ptr->recv_evd_hdl,	/* recv     */
+			    test_ptr->reqt_evd_hdl,	/* request  */
+			    test_ptr->conn_evd_hdl,	/* connect  */
+			    &test_ptr->ep_context.ep_attr,	/* EP attrs */
+			    &test_ptr->ep_context.ep_handle);
+	if (DAT_SUCCESS != ret) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x "]: dat_ep_create error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		test_ptr->ep_context.ep_handle = DAT_HANDLE_NULL;
+		return false;
+	}
+
+	/*
+	 * Allocate a buffer pool so we can exchange the
+	 * remote memory info and initialize.
+	 */
+	test_ptr->ep_context.bp = DT_BpoolAlloc(test_ptr->pt_ptr, phead, test_ptr->ia_handle, test_ptr->pz_handle, test_ptr->ep_context.ep_handle, DAT_HANDLE_NULL,	/* rmr */
+						DT_PERF_SYNC_BUFF_SIZE, 2,	/* 2 RMIs */
+						DAT_OPTIMAL_ALIGNMENT,
+						false, false);
+	if (!test_ptr->ep_context.bp) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x
+				  "]: no memory for remote memory buffers\n",
+				  test_ptr->base_port);
+		return false;
+	}
+
+	DT_Tdep_PT_Debug(3, (phead,
+			     "0: SYNC_SEND  %p\n",
+			     (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->
+							    ep_context.bp,
+							    DT_PERF_SYNC_SEND_BUFFER_ID)));
+	DT_Tdep_PT_Debug(3,
+			 (phead, "1: SYNC_RECV  %p\n",
+			  (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->ep_context.
+							 bp,
+							 DT_PERF_SYNC_RECV_BUFFER_ID)));
+
+	/*
+	 * Post recv and sync buffers
+	 */
+	if (!DT_post_recv_buffer(phead,
+				 test_ptr->ep_context.ep_handle,
+				 test_ptr->ep_context.bp,
+				 DT_PERF_SYNC_RECV_BUFFER_ID,
+				 DT_PERF_SYNC_BUFF_SIZE)) {
+		/* error message printed by DT_post_recv_buffer */
+		return false;
+	}
+
+	/*
+	 * Fill in the test_ptr with relevant command info
+	 */
+	test_ptr->ep_context.op.transfer_type = test_ptr->cmd->op.transfer_type;
+	test_ptr->ep_context.op.num_segs = test_ptr->cmd->op.num_segs;
+	test_ptr->ep_context.op.seg_size = test_ptr->cmd->op.seg_size;
+
+	/*
+	 * Exchange remote memory info:  If we're going to participate
+	 * in an RDMA, we need to allocate memory buffers and advertise
+	 * them to the other side.
+	 */
+	test_ptr->ep_context.op.Rdma_Context = (DAT_RMR_CONTEXT) 0;
+	test_ptr->ep_context.op.Rdma_Address = 0;
+	test_ptr->ep_context.port = test_ptr->base_port;
+	test_ptr->ep_context.pipeline_len = pipeline_len;
+
+	return true;
+}
+
+/****************************************************************************/
+void
+DT_Performance_Test_Destroy(Per_Test_Data_t * pt_ptr,
+			    Performance_Test_t * test_ptr,
+			    DAT_BOOLEAN is_server)
+{
+	DAT_RETURN ret;
+	DAT_EP_HANDLE ep_handle;
+	DT_Tdep_Print_Head *phead;
+
+	phead = pt_ptr->Params.phead;
+
+	ep_handle = DAT_HANDLE_NULL;
+
+	/* Free the per-op buffers */
+	if (test_ptr->ep_context.op.bp) {
+		if (!DT_Bpool_Destroy(test_ptr->pt_ptr,
+				      phead, test_ptr->ep_context.op.bp)) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: Warning: Bpool destroy fails\n",
+					  test_ptr->base_port);
+			/* carry on trying, regardless */
+		}
+	}
+
+	/* Free the remote memory info exchange buffers */
+	if (test_ptr->ep_context.bp) {
+		if (!DT_Bpool_Destroy(test_ptr->pt_ptr,
+				      phead, test_ptr->ep_context.bp)) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: Warning: Bpool destroy fails\n",
+					  test_ptr->base_port);
+			/* carry on trying, regardless */
+		}
+	}
+
+	/*
+	 * Disconnect -- we may have left recv buffers posted, if we
+	 *               bailed out mid-setup, or ran to completion
+	 *               normally, so we use abrupt closure.
+	 */
+	if (test_ptr->ep_context.ep_handle) {
+		ret = dat_ep_disconnect(test_ptr->ep_context.ep_handle,
+					DAT_CLOSE_ABRUPT_FLAG);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: Warning: dat_ep_disconnect error %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* carry on trying, regardless */
+		} else if (!DT_disco_event_wait(phead, test_ptr->conn_evd_hdl,
+						&ep_handle)) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: bad disconnect event\n",
+					  test_ptr->base_port);
+		}
+	}
+
+	if (DAT_HANDLE_NULL != ep_handle) {
+		/* Destroy the EP */
+		ret = dat_ep_free(ep_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_ep_free error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* carry on trying, regardless */
+		}
+	}
+
+	/* clean up the EVDs */
+	if (test_ptr->conn_evd_hdl) {
+		ret = DT_Tdep_evd_free(test_ptr->conn_evd_hdl);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_evd_free (conn) error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* fall through, keep trying */
+		}
+	}
+	if (is_server) {
+		if (test_ptr->creq_evd_hdl) {
+			ret = DT_Tdep_evd_free(test_ptr->creq_evd_hdl);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test[" F64x
+						  "]: dat_evd_free (creq) error: %s\n",
+						  test_ptr->base_port,
+						  DT_RetToString(ret));
+				/* fall through, keep trying */
+			}
+		}
+	}
+	if (test_ptr->reqt_evd_hdl) {
+		ret = DT_Tdep_evd_free(test_ptr->reqt_evd_hdl);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_evd_free (reqt) error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* fall through, keep trying */
+		}
+	}
+	if (test_ptr->recv_evd_hdl) {
+		ret = DT_Tdep_evd_free(test_ptr->recv_evd_hdl);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_evd_free (recv) error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* fall through, keep trying */
+		}
+	}
+
+	/* clean up the PZ */
+	if (test_ptr->pz_handle) {
+		ret = dat_pz_free(test_ptr->pz_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_pz_free error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* fall through, keep trying */
+		}
+	}
+
+	DT_MemListFree(test_ptr->pt_ptr, test_ptr);
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: cleanup is done\n",
+			  test_ptr->base_port));
+
+}
+
+/****************************************************************************/
+bool
+DT_performance_post_rdma_op(Performance_Ep_Context_t * ep_context,
+			    DAT_EVD_HANDLE reqt_evd_hdl,
+			    Performance_Stats_t * stats)
+{
+	unsigned int j;
+	unsigned long int bytes;
+	unsigned long pre_ctxt_num;
+	unsigned long post_ctxt_num;
+	DT_Mdep_TimeStamp pre_ts;
+	DT_Mdep_TimeStamp post_ts;
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN ret;
+	Performance_Test_Op_t *op = &ep_context->op;
+	DAT_LMR_TRIPLET *iov = DT_Bpool_GetIOV(op->bp, 0);
+	DAT_RMR_TRIPLET rmr_triplet;
+
+	bytes = op->seg_size * op->num_segs;
+
+	/* Prep the inputs */
+	for (j = 0; j < op->num_segs; j++) {
+		iov[j].virtual_address = (DAT_VADDR) (uintptr_t)
+		    DT_Bpool_GetBuffer(op->bp, j);
+		iov[j].segment_length = op->seg_size;
+		iov[j].lmr_context = DT_Bpool_GetLMR(op->bp, j);
+	}
+
+	rmr_triplet.virtual_address = op->Rdma_Address;
+	rmr_triplet.segment_length = op->seg_size * op->num_segs;
+	rmr_triplet.rmr_context = op->Rdma_Context;
+
+	cookie.as_ptr = NULL;
+
+	if (RDMA_WRITE == op->transfer_type) {
+		pre_ctxt_num = DT_Mdep_GetContextSwitchNum();
+		pre_ts = DT_Mdep_GetTimeStamp();
+
+		ret = dat_ep_post_rdma_write(ep_context->ep_handle,
+					     op->num_segs,
+					     iov,
+					     cookie,
+					     &rmr_triplet,
+					     DAT_COMPLETION_DEFAULT_FLAG);
+
+		post_ts = DT_Mdep_GetTimeStamp();
+		post_ctxt_num = DT_Mdep_GetContextSwitchNum();
+
+		stats->bytes += bytes;
+	} else {
+		pre_ctxt_num = DT_Mdep_GetContextSwitchNum();
+		pre_ts = DT_Mdep_GetTimeStamp();
+
+		ret = dat_ep_post_rdma_read(ep_context->ep_handle,
+					    op->num_segs,
+					    iov,
+					    cookie,
+					    &rmr_triplet,
+					    DAT_COMPLETION_DEFAULT_FLAG);
+
+		post_ts = DT_Mdep_GetTimeStamp();
+		post_ctxt_num = DT_Mdep_GetContextSwitchNum();
+
+		stats->bytes += bytes;
+	}
+
+	if (DAT_SUCCESS != ret) {
+		return false;
+	}
+
+	DT_performance_stats_record_post(stats,
+					 post_ctxt_num - pre_ctxt_num,
+					 post_ts - pre_ts);
+
+	return true;
+}
+
+/****************************************************************************/
+unsigned int
+DT_performance_reap(DT_Tdep_Print_Head * phead,
+		    DAT_EVD_HANDLE evd_handle,
+		    Performance_Mode_Type mode, Performance_Stats_t * stats)
+{
+	if (BLOCKING_MODE == mode) {
+		return DT_performance_wait(phead, evd_handle, stats);
+	} else {
+		return DT_performance_poll(phead, evd_handle, stats);
+	}
+}
+
+/****************************************************************************/
+unsigned int
+DT_performance_wait(DT_Tdep_Print_Head * phead,
+		    DAT_EVD_HANDLE evd_handle, Performance_Stats_t * stats)
+{
+	DAT_COUNT i;
+	DAT_COUNT queue_size;
+	DAT_RETURN ret;
+	DAT_EVENT event;
+	unsigned long pre_ctxt_num;
+	unsigned long post_ctxt_num;
+	DT_Mdep_TimeStamp pre_ts;
+	DT_Mdep_TimeStamp post_ts;
+
+	queue_size = 0;
+
+	pre_ctxt_num = DT_Mdep_GetContextSwitchNum();
+	pre_ts = DT_Mdep_GetTimeStamp();
+
+	ret = DT_Tdep_evd_wait(evd_handle, DAT_TIMEOUT_INFINITE, &event);
+
+	post_ts = DT_Mdep_GetTimeStamp();
+	post_ctxt_num = DT_Mdep_GetContextSwitchNum();
+
+	if (DAT_SUCCESS != ret) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test Error: dapl_event_dequeue failed: %s\n",
+				  DT_RetToString(ret));
+		return 0;
+	} else if (event.event_number == DAT_DTO_COMPLETION_EVENT) {
+		DT_performance_stats_record_reap(stats,
+						 post_ctxt_num - pre_ctxt_num,
+						 post_ts - pre_ts);
+	} else {
+		/* This should not happen. There has been an error if it does. */
+
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: dapl_performance_wait swallowing %s event\n",
+				  DT_EventToSTr(event.event_number));
+
+		return 0;
+	}
+
+	for (i = 0; i < queue_size; i++) {
+		pre_ctxt_num = DT_Mdep_GetContextSwitchNum();
+		pre_ts = DT_Mdep_GetTimeStamp();
+
+		ret = DT_Tdep_evd_dequeue(evd_handle, &event);
+
+		post_ts = DT_Mdep_GetTimeStamp();
+		post_ctxt_num = DT_Mdep_GetContextSwitchNum();
+
+		if (DAT_GET_TYPE(ret) == DAT_QUEUE_EMPTY) {
+			continue;
+		} else if (DAT_SUCCESS != ret) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_dequeue failed: %s\n",
+					  DT_RetToString(ret));
+			return 0;
+		} else if (event.event_number == DAT_DTO_COMPLETION_EVENT) {
+			DT_performance_stats_record_reap(stats,
+							 post_ctxt_num -
+							 pre_ctxt_num,
+							 post_ts - pre_ts);
+		} else {
+			/* This should not happen. There has been an error if it does. */
+
+			DT_Tdep_PT_Printf(phead,
+					  "Warning: dapl_performance_wait swallowing %s event\n",
+					  DT_EventToSTr(event.event_number));
+
+			return 0;
+		}
+	}
+
+	return ++queue_size;
+}
+
+/****************************************************************************/
+unsigned int
+DT_performance_poll(DT_Tdep_Print_Head * phead,
+		    DAT_EVD_HANDLE evd_handle, Performance_Stats_t * stats)
+{
+	DAT_RETURN ret;
+	DAT_EVENT event;
+	unsigned long pre_ctxt_num;
+	unsigned long post_ctxt_num;
+	DT_Mdep_TimeStamp pre_ts;
+	DT_Mdep_TimeStamp post_ts;
+
+	for (;;) {
+		pre_ctxt_num = DT_Mdep_GetContextSwitchNum();
+		pre_ts = DT_Mdep_GetTimeStamp();
+
+		ret = DT_Tdep_evd_dequeue(evd_handle, &event);
+
+		post_ts = DT_Mdep_GetTimeStamp();
+		post_ctxt_num = DT_Mdep_GetContextSwitchNum();
+
+		if (DAT_GET_TYPE(ret) == DAT_QUEUE_EMPTY) {
+			continue;
+		} else if (DAT_SUCCESS != ret) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_dequeue failed: %s\n",
+					  DT_RetToString(ret));
+			return 0;
+		} else if (event.event_number == DAT_DTO_COMPLETION_EVENT) {
+			DT_performance_stats_record_reap(stats,
+							 post_ctxt_num -
+							 pre_ctxt_num,
+							 post_ts - pre_ts);
+			return 1;
+		} else {
+			/* This should not happen. There has been an error if it does. */
+
+			DT_Tdep_PT_Printf(phead,
+					  "Warning: dapl_performance_wait swallowing %s event\n",
+					  DT_EventToSTr(event.event_number));
+
+			return 0;
+		}
+	}
+
+	/*never reached */
+	return 0;
+}
+
+void
+DT_Performance_Cmd_PT_Print(DT_Tdep_Print_Head * phead, Performance_Cmd_t * cmd)
+{
+	DT_Tdep_PT_Printf(phead, "-------------------------------------\n");
+	DT_Tdep_PT_Printf(phead, "PerfCmd.server_name              : %s\n",
+			  cmd->server_name);
+	DT_Tdep_PT_Printf(phead, "PerfCmd.dapl_name                : %s\n",
+			  cmd->dapl_name);
+	DT_Tdep_PT_Printf(phead, "PerfCmd.mode                     : %s\n",
+			  (cmd->mode ==
+			   BLOCKING_MODE) ? "BLOCKING" : "POLLING");
+	DT_Tdep_PT_Printf(phead, "PerfCmd.num_iterations           : %d\n",
+			  cmd->num_iterations);
+	DT_Tdep_PT_Printf(phead, "PerfCmd.pipeline_len             : %d\n",
+			  cmd->pipeline_len);
+	DT_Tdep_PT_Printf(phead, "PerfCmd.op.transfer_type         : %s\n",
+			  cmd->op.transfer_type ==
+			  RDMA_READ ? "RDMA_READ" : cmd->op.transfer_type ==
+			  RDMA_WRITE ? "RDMA_WRITE" : "SEND_RECV");
+	DT_Tdep_PT_Printf(phead, "PerfCmd.op.num_segs              : %d\n",
+			  cmd->op.num_segs);
+	DT_Tdep_PT_Printf(phead, "PerfCmd.op.seg_size              : %d\n",
+			  cmd->op.seg_size);
+}
diff --git a/test/dapltest/test/dapl_quit_util.c b/test/dapltest/test/dapl_quit_util.c
new file mode 100644
index 0000000..a0524c4
--- /dev/null
+++ b/test/dapltest/test/dapl_quit_util.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *  
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_Quit_Cmd_PT_Print(DT_Tdep_Print_Head * phead, Quit_Cmd_t * cmd)
+{
+	/*  DT_Mdep_printf ("Quit_Cmd.server_name: %s\n", cmd->server_name);
+	   DT_Mdep_printf ("Quit_Cmd.device_name: %s\n", cmd->device_name);
+	 */
+	DT_Tdep_PT_Printf(phead, "Quit_Cmd.server_name: %s\n",
+			  cmd->server_name);
+	DT_Tdep_PT_Printf(phead, "Quit_Cmd.device_name: %s\n",
+			  cmd->device_name);
+
+}
diff --git a/test/dapltest/test/dapl_server.c b/test/dapltest/test/dapl_server.c
new file mode 100644
index 0000000..443425c
--- /dev/null
+++ b/test/dapltest/test/dapl_server.c
@@ -0,0 +1,855 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#ifdef DFLT_QLEN
+#undef DFLT_QLEN
+#endif
+
+#define DFLT_QLEN 8		/* default event queue length */
+
+int send_control_data(DT_Tdep_Print_Head * phead,
+		      unsigned char *buffp,
+		      Per_Server_Data_t * ps_ptr, Per_Test_Data_t * pt_ptr);
+
+void DT_cs_Server(Params_t * params_ptr)
+{
+	Server_Cmd_t *Server_Cmd = &params_ptr->u.Server_Cmd;
+	Client_Info_t *Client_Info = NULL;
+	Transaction_Cmd_t *Transaction_Cmd = NULL;
+	Quit_Cmd_t *Quit_Cmd = NULL;
+	Performance_Cmd_t *Performance_Cmd = NULL;
+	Per_Server_Data_t *ps_ptr = NULL;
+	Per_Test_Data_t *pt_ptr = NULL;
+	Started_server_t *temp_list = NULL;
+	Started_server_t *pre_list = NULL;
+	unsigned char *buffp = NULL;
+	char *module = "DT_cs_Server";
+
+	DAT_DTO_COOKIE dto_cookie;
+	DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+	DAT_RETURN ret;
+	DT_Tdep_Print_Head *phead;
+
+	phead = params_ptr->phead;
+
+	/* Check if device from command line already in use */
+	temp_list = DT_started_server_list;
+	while (temp_list) {
+		if (strcmp(temp_list->devicename, Server_Cmd->dapl_name) == 0) {
+			DT_Tdep_PT_Printf(phead,
+					  "NOTICE: server already started for this NIC: %s\n",
+					  Server_Cmd->dapl_name);
+			return;
+		}
+		temp_list = temp_list->next;
+	}
+
+	/* Alloc memory for server list */
+	temp_list =
+	    (Started_server_t *) DT_Mdep_Malloc(sizeof(Started_server_t));
+	if (temp_list == 0) {
+		DT_Tdep_PT_Printf(phead, "no memory for server_list\n");
+		return;
+	}
+	strcpy(temp_list->devicename, Server_Cmd->dapl_name);
+	temp_list->next = DT_started_server_list;
+	DT_started_server_list = temp_list;
+
+	if (Server_Cmd->debug) {
+		/* Echo our inputs if debugging */
+		DT_Server_Cmd_PT_Print(phead, Server_Cmd);
+	}
+
+	/* Allocate memory for Per_Server_Data */
+	ps_ptr =
+	    (Per_Server_Data_t *) DT_Mdep_Malloc(sizeof(Per_Server_Data_t));
+	if (ps_ptr == 0) {
+		DT_Tdep_PT_Printf(phead, "no memory for ps_data\n");
+		goto server_exit;
+	}
+	DT_Mdep_LockInit(&ps_ptr->num_clients_lock);
+	ps_ptr->NextPortNumber = SERVER_PORT_NUMBER + 1;
+	ps_ptr->num_clients = 0;
+
+	/* Open the IA */
+	ret = dat_ia_open(Server_Cmd->dapl_name,
+			  DFLT_QLEN,
+			  &ps_ptr->async_evd_hdl, &ps_ptr->ia_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: Could not open %s (%s)\n",
+				  module,
+				  Server_Cmd->dapl_name, DT_RetToString(ret));
+		ps_ptr->ia_handle = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+	DT_Tdep_PT_Debug(1,
+			 (phead, "%s: IA %s opened\n", module,
+			  Server_Cmd->dapl_name));
+
+	/* Create a PZ */
+	ret = dat_pz_create(ps_ptr->ia_handle, &ps_ptr->pz_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_pz_create error: %s\n",
+				  module, DT_RetToString(ret));
+		ps_ptr->pz_handle = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+	DT_Tdep_PT_Debug(1, (phead, "%s: PZ created\n", module));
+
+	/* Create 4 events - recv, request, connection-request, connect */
+	ret = DT_Tdep_evd_create(ps_ptr->ia_handle,
+				 DFLT_QLEN,
+				 NULL, DAT_EVD_DTO_FLAG, &ps_ptr->recv_evd_hdl);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_evd_create (recv) failed %s\n",
+				  module, DT_RetToString(ret));
+		ps_ptr->recv_evd_hdl = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+	ret = DT_Tdep_evd_create(ps_ptr->ia_handle,
+				 DFLT_QLEN,
+				 NULL,
+				 DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG,
+				 &ps_ptr->reqt_evd_hdl);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_evd_create (send) failed %s\n",
+				  module, DT_RetToString(ret));
+		ps_ptr->reqt_evd_hdl = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+	ret = DT_Tdep_evd_create(ps_ptr->ia_handle,
+				 DFLT_QLEN,
+				 NULL, DAT_EVD_CR_FLAG, &ps_ptr->creq_evd_hdl);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_evd_create (cr) failed %s\n",
+				  module, DT_RetToString(ret));
+		ps_ptr->creq_evd_hdl = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+	ret = DT_Tdep_evd_create(ps_ptr->ia_handle,
+				 DFLT_QLEN,
+				 NULL,
+				 DAT_EVD_CONNECTION_FLAG,
+				 &ps_ptr->conn_evd_hdl);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_evd_create (conn) failed %s\n",
+				  module, DT_RetToString(ret));
+		ps_ptr->conn_evd_hdl = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+
+	/* Create the EP */
+	ret = dat_ep_create(ps_ptr->ia_handle,	/* IA       */
+			    ps_ptr->pz_handle,	/* PZ       */
+			    ps_ptr->recv_evd_hdl,	/* recv     */
+			    ps_ptr->reqt_evd_hdl,	/* request  */
+			    ps_ptr->conn_evd_hdl,	/* connect  */
+			    (DAT_EP_ATTR *) NULL, &ps_ptr->ep_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_ep_create error: %s\n",
+				  module, DT_RetToString(ret));
+		ps_ptr->ep_handle = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+	DT_Tdep_PT_Debug(1, (phead, "%s: EP created\n", module));
+
+	/* Create PSP */
+	ret = dat_psp_create(ps_ptr->ia_handle,
+			     SERVER_PORT_NUMBER,
+			     ps_ptr->creq_evd_hdl,
+			     DAT_PSP_CONSUMER_FLAG, &ps_ptr->psp_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: dat_psp_create error: %s\n",
+				  module, DT_RetToString(ret));
+		ps_ptr->psp_handle = DAT_HANDLE_NULL;
+		goto server_exit;
+	}
+	DT_Tdep_PT_Debug(1, (phead, "%s: PSP created\n", module));
+
+	/*
+	 * Create two buffers, large enough to hold ClientInfo and the largest
+	 * command we'll use.
+	 */
+	ps_ptr->bpool = DT_BpoolAlloc(NULL, phead, ps_ptr->ia_handle, ps_ptr->pz_handle, ps_ptr->ep_handle, DAT_HANDLE_NULL,	/* no RMR */
+				      DT_RoundSize(sizeof(Transaction_Cmd_t), 8192), 3,	/* num_buffers */
+				      DAT_OPTIMAL_ALIGNMENT, false, false);
+	if (ps_ptr->bpool == 0) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: no memory for command buffer pool.\n",
+				  module);
+		goto server_exit;
+	}
+
+	DT_Tdep_PT_Debug(3, (phead,
+			     "Recv 0  %p\n",
+			     (DAT_PVOID) DT_Bpool_GetBuffer(ps_ptr->bpool, 0)));
+	DT_Tdep_PT_Debug(3, (phead,
+			     "Recv 1  %p\n",
+			     (DAT_PVOID) DT_Bpool_GetBuffer(ps_ptr->bpool, 1)));
+	DT_Tdep_PT_Debug(3, (phead,
+			     "SrvInfo 2  %p\n",
+			     (DAT_PVOID) DT_Bpool_GetBuffer(ps_ptr->bpool, 2)));
+
+	/* Initialize the performance test lock in case an incoming test
+	 * is a performance test, so we can allow only one at a time.
+	 * Otherwise, multiple performance tests cause a race condition
+	 * between the server creating a new thread trying to allocate a
+	 * PSP with the same ID as another thread that is either running
+	 * a test on that same ID or hasn't yet destroyed it.  Only one
+	 * PSP with a particular ID can exist at a time.  It's a
+	 * de-facto shared resource that must be protected.
+	 */
+    /************************************************************************
+     * Loop accepting connections and acting on them
+     */
+	for (; /* EVER */ ;) {
+		DAT_CR_HANDLE cr_handle;
+		DAT_CR_ARRIVAL_EVENT_DATA cr_stat;
+		DAT_EVENT_NUMBER event_num;
+
+		/* Set up the Per_Test_Data */
+		pt_ptr = DT_Alloc_Per_Test_Data(phead);
+		if (!pt_ptr) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: no memory for Per_Test_Data\n",
+					  module);
+			goto server_exit;
+		}
+		DT_MemListInit(pt_ptr);
+		DT_Thread_Init(pt_ptr);
+		pt_ptr->local_is_server = true;
+		pt_ptr->ps_ptr = ps_ptr;
+		memcpy((void *)(uintptr_t) & pt_ptr->Params,
+		       (const void *)params_ptr, sizeof(Params_t));
+
+		/* Server_Info, Client_Info, Params set up below */
+
+		/* Gather whatever info we want about defaults */
+		if (!DT_query(pt_ptr, ps_ptr->ia_handle, ps_ptr->ep_handle)) {
+			goto server_exit;
+		}
+
+		/* Post recv buffers for ClientInfo and Transaction_Cmd_t */
+		DT_Tdep_PT_Debug(1, (phead, "%s: Posting 2 recvs\n", module));
+		if (!DT_post_recv_buffer(phead,
+					 ps_ptr->ep_handle,
+					 ps_ptr->bpool,
+					 0,
+					 DT_Bpool_GetBuffSize(ps_ptr->bpool,
+							      0))) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: cannot post ClientInfo recv buffer\n",
+					  module);
+			goto server_exit;
+		}
+		if (!DT_post_recv_buffer(phead,
+					 ps_ptr->ep_handle,
+					 ps_ptr->bpool,
+					 1,
+					 DT_Bpool_GetBuffSize(ps_ptr->bpool,
+							      1))) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: cannot post Transaction_Cmd_t recv buffer\n",
+					  module);
+			goto server_exit;
+		}
+
+		/* message to help automated test scripts know when to start the client */
+		DT_Tdep_PT_Printf(phead,
+				  "Dapltest: Service Point Ready - %s\n",
+				  Server_Cmd->dapl_name);
+
+		DT_Mdep_flush();
+
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: Waiting for Connection Request\n",
+				  module));
+		if (!DT_cr_event_wait(phead, ps_ptr->creq_evd_hdl, &cr_stat)
+		    || !DT_cr_check(phead, &cr_stat, ps_ptr->psp_handle,
+				    SERVER_PORT_NUMBER, &cr_handle, module)) {
+
+			DT_Tdep_PT_Printf(phead,
+					  "CR Check failed, file %s line %d\n",
+					  __FILE__, __LINE__);
+			goto server_exit;
+		}
+
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: Accepting Connection Request\n",
+				  module));
+		ret =
+		    dat_cr_accept(cr_handle, ps_ptr->ep_handle, 0,
+				  (DAT_PVOID) 0);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_cr_accept error: %s\n",
+					  module, DT_RetToString(ret));
+			goto server_exit;
+		}
+
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: Awaiting connection ...\n",
+				  module));
+		if (!DT_conn_event_wait
+		    (phead, ps_ptr->ep_handle, ps_ptr->conn_evd_hdl,
+		     &event_num)) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: error awaiting conn-established event\n",
+					  module);
+			goto server_exit;
+		}
+
+		if (DT_dapltest_debug) {
+			DT_Tdep_PT_Debug(1,
+					 (phead, "%s: Connected!\n", module));
+			get_ep_connection_state(phead, ps_ptr->ep_handle);
+		}
+
+		/* Wait for Client_Info */
+		dto_cookie.as_64 = LZERO;
+		dto_cookie.as_ptr =
+		    (DAT_PVOID) (uintptr_t) DT_Bpool_GetBuffer(ps_ptr->bpool,
+							       0);
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: Waiting for Client_Info\n",
+				  module));
+		if (!DT_dto_event_wait(phead, ps_ptr->recv_evd_hdl, &dto_stat)
+		    || !DT_dto_check(phead, &dto_stat, ps_ptr->ep_handle,
+				     DT_Bpool_GetBuffSize(ps_ptr->bpool, 0),
+				     dto_cookie, "Client_Info_Recv")) {
+			goto server_exit;
+		}
+		DT_Tdep_PT_Debug(1, (phead, "%s: Got Client_Info\n", module));
+
+		/* Extract the Client_Info */
+		Client_Info =
+		    (Client_Info_t *) DT_Bpool_GetBuffer(ps_ptr->bpool, 0);
+		DT_Client_Info_Endian(Client_Info);
+		memcpy((void *)(uintptr_t) & pt_ptr->Client_Info,
+		       (const void *)Client_Info, sizeof(Client_Info_t));
+
+		/* Wait for client's command info */
+		dto_cookie.as_64 = LZERO;
+		dto_cookie.as_ptr =
+		    (DAT_PVOID) (uintptr_t) DT_Bpool_GetBuffer(ps_ptr->bpool,
+							       1);
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: Waiting for Client_Cmd_Info\n",
+				  module));
+		if (!DT_dto_event_wait(phead, ps_ptr->recv_evd_hdl, &dto_stat)
+		    || !DT_dto_check(phead, &dto_stat, ps_ptr->ep_handle,
+				     DT_Bpool_GetBuffSize(ps_ptr->bpool, 1),
+				     dto_cookie, "Client_Cmd_Recv")) {
+			goto server_exit;
+		}
+
+		/* Extract the client's command info */
+		switch (Client_Info->test_type) {
+		case TRANSACTION_TEST:
+			{
+				Transaction_Cmd = (Transaction_Cmd_t *)
+				    DT_Bpool_GetBuffer(ps_ptr->bpool, 1);
+				DT_Transaction_Cmd_Endian(Transaction_Cmd,
+							  false);
+				memcpy((void *)(uintptr_t) & pt_ptr->Params.u.
+				       Transaction_Cmd,
+				       (const void *)Transaction_Cmd,
+				       sizeof(Transaction_Cmd_t));
+				break;
+			}
+
+		case QUIT_TEST:
+			{
+				Quit_Cmd =
+				    (Quit_Cmd_t *) DT_Bpool_GetBuffer(ps_ptr->
+								      bpool, 1);
+				DT_Quit_Cmd_Endian(Quit_Cmd, false);
+				memcpy((void *)(uintptr_t) & pt_ptr->Params.u.
+				       Quit_Cmd, (const void *)Quit_Cmd,
+				       sizeof(Quit_Cmd_t));
+				break;
+			}
+
+		case PERFORMANCE_TEST:
+			{
+				Performance_Cmd = (Performance_Cmd_t *)
+				    DT_Bpool_GetBuffer(ps_ptr->bpool, 1);
+				DT_Performance_Cmd_Endian(Performance_Cmd);
+				memcpy((void *)(uintptr_t) & pt_ptr->Params.u.
+				       Performance_Cmd,
+				       (const void *)Performance_Cmd,
+				       sizeof(Performance_Cmd_t));
+				break;
+			}
+
+		default:
+			{
+				DT_Tdep_PT_Printf(phead,
+						  "Unknown TestType received\n");
+				goto server_exit;
+				break;
+			}
+		}
+
+		/* Setup Server Info */
+		DT_Tdep_PT_Debug(1, (phead, "%s: Send Server_Info\n", module));
+		pt_ptr->Server_Info.dapltest_version = DAPLTEST_VERSION;
+		pt_ptr->Server_Info.is_little_endian =
+		    DT_local_is_little_endian;
+		/* reset port, don't eat up port space on long runs */
+		if (ps_ptr->NextPortNumber >= SERVER_PORT_NUMBER + 1000)
+			ps_ptr->NextPortNumber = SERVER_PORT_NUMBER + 1;
+		pt_ptr->Server_Info.first_port_number = ps_ptr->NextPortNumber;
+		ps_ptr->NextPortNumber += pt_ptr->Client_Info.total_threads;
+
+		/* This had to be done here because the pt_ptr is being fed to
+		 * the thread as its context, and if it isn't properly
+		 * initialized before the thread spawns then the thread may
+		 * incorrectly set up its PSP and the server will be listening
+		 * on the WRONG PORT!
+		 */
+
+		switch (Client_Info->test_type) {
+		case TRANSACTION_TEST:
+			{
+				/* create a thread to handle this pt_ptr; */
+				ps_ptr->NextPortNumber +=
+				    (pt_ptr->Params.u.Transaction_Cmd.
+				     eps_per_thread -
+				     1) * pt_ptr->Client_Info.total_threads;
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "%s: Creating Transaction Test Thread\n",
+						  module));
+				pt_ptr->thread =
+				    DT_Thread_Create(pt_ptr,
+						     DT_Transaction_Test_Server,
+						     pt_ptr,
+						     DT_MDEP_DEFAULT_STACK_SIZE);
+				if (pt_ptr->thread == 0) {
+					DT_Tdep_PT_Printf(phead,
+							  "no memory to create thread\n");
+					goto server_exit;
+				}
+				break;
+			}
+
+		case QUIT_TEST:
+			{
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Client Requests Server to Quit\n"));
+				(void)send_control_data(phead, buffp, ps_ptr,
+							pt_ptr);
+				goto server_exit;
+				break;
+			}
+
+		case LIMIT_TEST:
+			{
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Limit Test is Client-side Only!\n"));
+				(void)send_control_data(phead, buffp, ps_ptr,
+							pt_ptr);
+				goto server_exit;
+				break;
+			}
+
+		case PERFORMANCE_TEST:
+			{
+				/* create a thread to handle this pt_ptr; */
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "%s: Creating Performance Test Thread\n",
+						  module));
+				pt_ptr->thread =
+				    DT_Thread_Create(pt_ptr,
+						     DT_Performance_Test_Server,
+						     pt_ptr,
+						     DT_MDEP_DEFAULT_STACK_SIZE);
+				if (pt_ptr->thread == 0) {
+					DT_Tdep_PT_Printf(phead,
+							  "no memory to create thread\n");
+					goto server_exit;
+				}
+				/* take the performance test lock to serialize */
+				DT_Mdep_Lock(&g_PerfTestLock);
+
+				break;
+			}
+
+		case FFT_TEST:
+
+		default:
+			{
+				DT_Tdep_PT_Printf(phead,
+						  "Unknown TestType received\n");
+				(void)send_control_data(phead, buffp, ps_ptr,
+							pt_ptr);
+				goto server_exit;
+				break;
+			}
+		}
+
+		/* Start the new test thread */
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: Starting Test Thread\n", module));
+		if (DT_Thread_Start(pt_ptr->thread) == false) {
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "failed to start test thread\n"));
+			goto server_exit;
+		}
+
+		buffp = DT_Bpool_GetBuffer(ps_ptr->bpool, 2);	/* 3rd buffer */
+		memcpy((void *)buffp,
+		       (const void *)&pt_ptr->Server_Info,
+		       sizeof(Server_Info_t));
+		DT_Server_Info_Endian((Server_Info_t *) buffp);
+
+		/* Perform obligatory version check */
+		if (pt_ptr->Client_Info.dapltest_version != DAPLTEST_VERSION) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: %s: Server %d, Client %d\n",
+					  module,
+					  "DAPLTEST VERSION MISMATCH",
+					  DAPLTEST_VERSION,
+					  pt_ptr->Client_Info.dapltest_version);
+			goto server_exit;
+		}
+		DT_Tdep_PT_Debug(1, (phead, "%s: Version OK!\n", module));
+
+		DT_Mdep_wait_object_wait(&pt_ptr->synch_wait_object,
+					 DAT_TIMEOUT_INFINITE);
+
+		/* Send the Server_Info */
+		DT_Tdep_PT_Debug(1, (phead, "%s: Send Server_Info\n", module));
+
+		if (!DT_post_send_buffer(phead, ps_ptr->ep_handle,
+					 ps_ptr->bpool,
+					 2,
+					 DT_Bpool_GetBuffSize(ps_ptr->bpool,
+							      2))) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: cannot send Server_Info\n",
+					  module);
+			goto server_exit;
+		}
+		/* reap the send and verify it */
+		dto_cookie.as_64 = LZERO;
+		dto_cookie.as_ptr =
+		    (DAT_PVOID) (uintptr_t) DT_Bpool_GetBuffer(ps_ptr->bpool,
+							       2);
+		if (!DT_dto_event_wait(phead, ps_ptr->reqt_evd_hdl, &dto_stat)
+		    || !DT_dto_check(phead, &dto_stat, ps_ptr->ep_handle,
+				     DT_Bpool_GetBuffSize(ps_ptr->bpool, 2),
+				     dto_cookie, "Server_Info_Send")) {
+			goto server_exit;
+		}
+
+		/* Count this new client and get ready for the next */
+		DT_Mdep_Lock(&ps_ptr->num_clients_lock);
+		ps_ptr->num_clients++;
+		DT_Mdep_Unlock(&ps_ptr->num_clients_lock);
+
+		/* we passed the pt_ptr to the thread and must now 'forget' it */
+		pt_ptr = 0;
+
+#ifdef CM_BUSTED
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "%s: Server exiting because provider does not support\n"
+				  " multiple connections to the same service point\n",
+				  module));
+		/* Until connections are healthier we run just one test */
+		break;
+#else
+		ret =
+		    dat_ep_disconnect(ps_ptr->ep_handle,
+				      DAT_CLOSE_GRACEFUL_FLAG);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "%s: dat_ep_disconnect fails: %s\n",
+					  module, DT_RetToString(ret));
+			goto server_exit;
+		}
+		if (!DT_disco_event_wait(phead, ps_ptr->conn_evd_hdl, NULL)) {
+			DT_Tdep_PT_Printf(phead, "%s: bad disconnect event\n",
+					  module);
+			goto server_exit;
+		}
+
+		/* reset the EP to get back into the game */
+		dat_ep_reset(ps_ptr->ep_handle);
+		DT_Tdep_PT_Debug(1,
+				 (phead, "%s: Waiting for another client...\n",
+				  module));
+#endif
+	}			/* end loop accepting connections */
+
+    /************************************************************************
+     * Finished (or had an error) so clean up and go home
+     */
+      server_exit:
+
+	/* Wait until all of our clients are gone */
+	DT_Tdep_PT_Debug(1,
+			 (phead, "%s: Waiting for clients to all go away...\n",
+			  module));
+	while (ps_ptr && ps_ptr->num_clients > 0) {
+		DT_Mdep_Sleep(100);
+	}
+
+	/* Clean up the Per_Test_Data (if any) */
+	DT_Tdep_PT_Debug(1, (phead, "%s: Cleaning up ...\n", module));
+	if (pt_ptr) {
+		DT_Mdep_LockDestroy(&pt_ptr->Thread_counter_lock);
+		DT_Mdep_LockDestroy(&pt_ptr->MemListLock);
+		DT_Free_Per_Test_Data(pt_ptr);
+	}
+
+	/* Clean up the Per_Server_Data */
+	if (ps_ptr) {
+		/*
+		 * disconnect the most recent EP
+		 *
+		 * we also get here on error, hence abrupt closure to
+		 * flush any lingering buffers posted.
+		 */
+		if (ps_ptr->ep_handle) {
+			ret = dat_ep_disconnect(ps_ptr->ep_handle,
+						DAT_CLOSE_ABRUPT_FLAG);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_ep_disconnect fails: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			} else if (!DT_disco_event_wait(phead,
+							ps_ptr->conn_evd_hdl,
+							NULL)) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: bad disconnect event\n",
+						  module);
+			}
+		}
+
+		/* Destroy the Bpool */
+		if (ps_ptr->bpool) {
+			if (!DT_Bpool_Destroy(NULL, phead, ps_ptr->bpool)) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: error destroying buffer pool\n",
+						  module);
+				/* keep trying */
+			}
+		}
+
+		/* Free the PSP */
+		if (ps_ptr->psp_handle) {
+			ret = dat_psp_free(ps_ptr->psp_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_psp_free error: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			}
+		}
+
+		/* Free the EP */
+		if (ps_ptr->ep_handle) {
+			ret = dat_ep_free(ps_ptr->ep_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_ep_free error: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			}
+		}
+
+		/* Free the 4 EVDs */
+		if (ps_ptr->conn_evd_hdl) {
+			ret = DT_Tdep_evd_free(ps_ptr->conn_evd_hdl);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_evd_free (conn) error: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			}
+		}
+		if (ps_ptr->creq_evd_hdl) {
+			ret = DT_Tdep_evd_free(ps_ptr->creq_evd_hdl);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_evd_free (creq) error: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			}
+		}
+		if (ps_ptr->reqt_evd_hdl) {
+			ret = DT_Tdep_evd_free(ps_ptr->reqt_evd_hdl);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_evd_free (reqt) error: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			}
+		}
+		if (ps_ptr->recv_evd_hdl) {
+			ret = DT_Tdep_evd_free(ps_ptr->recv_evd_hdl);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_evd_free (recv) error: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			}
+		}
+
+		/* Free the PZ */
+		if (ps_ptr->pz_handle) {
+			ret = dat_pz_free(ps_ptr->pz_handle);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_pz_free error: %s\n",
+						  module, DT_RetToString(ret));
+				/* keep trying */
+			}
+		}
+
+		/* Close the IA */
+		if (ps_ptr->ia_handle) {
+			/* dat_ia_close cleans up async evd handle, too */
+			ret =
+			    dat_ia_close(ps_ptr->ia_handle,
+					 DAT_CLOSE_GRACEFUL_FLAG);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "%s: dat_ia_close (graceful) error: %s\n",
+						  module, DT_RetToString(ret));
+				ret =
+				    dat_ia_close(ps_ptr->ia_handle,
+						 DAT_CLOSE_ABRUPT_FLAG);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "%s: dat_ia_close (abrupt) error: %s\n",
+							  module,
+							  DT_RetToString(ret));
+				}
+				/* keep trying */
+			} else {
+				DT_Tdep_PT_Debug(1,
+						 (phead, "%s: IA %s closed\n",
+						  module,
+						  Server_Cmd->dapl_name));
+			}
+		}
+
+		/* Destroy the ps_ptr */
+		DT_Mdep_LockDestroy(&ps_ptr->num_clients_lock);
+		DT_Mdep_Free(ps_ptr);
+	}
+
+	/* end if ps_ptr */
+	/* Clean up the server list */
+	pre_list = 0;
+	temp_list = DT_started_server_list;
+	while (temp_list) {
+		if (strcmp(temp_list->devicename, Server_Cmd->dapl_name) == 0) {
+			if (pre_list == 0) {	/* first one */
+				DT_started_server_list = temp_list->next;
+			} else {
+				pre_list->next = temp_list->next;
+			}
+			DT_Mdep_Free(temp_list);
+			break;
+		}
+		pre_list = temp_list;
+		temp_list = temp_list->next;
+	}
+
+	DT_Tdep_PT_Printf(phead,
+			  "%s (%s):  Exiting.\n", module,
+			  Server_Cmd->dapl_name);
+}
+
+int
+send_control_data(DT_Tdep_Print_Head * phead,
+		  unsigned char *buffp,
+		  Per_Server_Data_t * ps_ptr, Per_Test_Data_t * pt_ptr)
+{
+	char *module = "send_control_data";
+	DAT_DTO_COOKIE dto_cookie;
+	DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+
+	buffp = DT_Bpool_GetBuffer(ps_ptr->bpool, 2);	/* 3rd buffer */
+	memcpy((void *)buffp,
+	       (const void *)&pt_ptr->Server_Info, sizeof(Server_Info_t));
+	DT_Server_Info_Endian((Server_Info_t *) buffp);
+
+	if (!DT_post_send_buffer(phead, ps_ptr->ep_handle,
+				 ps_ptr->bpool,
+				 2, DT_Bpool_GetBuffSize(ps_ptr->bpool, 2))) {
+		DT_Tdep_PT_Printf(phead, "%s: cannot send Server_Info\n",
+				  module);
+		return 1;
+	}
+	/* reap the send and verify it */
+	dto_cookie.as_64 = LZERO;
+	dto_cookie.as_ptr =
+	    (DAT_PVOID) (uintptr_t) DT_Bpool_GetBuffer(ps_ptr->bpool, 2);
+	if (!DT_dto_event_wait(phead, ps_ptr->reqt_evd_hdl, &dto_stat) ||
+	    !DT_dto_check(phead,
+			  &dto_stat,
+			  ps_ptr->ep_handle,
+			  DT_Bpool_GetBuffSize(ps_ptr->bpool, 2),
+			  dto_cookie, "Server_Info_Send")) {
+		return 1;
+	}
+
+	return 0;
+}
+
+void
+DT_Server_Cmd_PT_Print(DT_Tdep_Print_Head * phead, Server_Cmd_t * Server_Cmd)
+{
+	DT_Tdep_PT_Printf(phead, "Server_Cmd.debug:       %d\n",
+			  Server_Cmd->debug);
+	DT_Tdep_PT_Printf(phead, "Server_Cmd.dapl_name: %s\n",
+			  Server_Cmd->dapl_name);
+}
diff --git a/test/dapltest/test/dapl_server_info.c b/test/dapltest/test/dapl_server_info.c
new file mode 100644
index 0000000..6041ba8
--- /dev/null
+++ b/test/dapltest/test/dapl_server_info.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+Started_server_t *DT_started_server_list = 0;
+
+void DT_Server_Info_Endian(Server_Info_t * server_info)
+{
+	server_info->dapltest_version =
+	    DT_Endian32(server_info->dapltest_version);
+	server_info->is_little_endian =
+	    DT_Endian32(server_info->is_little_endian);
+	server_info->first_port_number =
+	    DT_Endian32(server_info->first_port_number);
+}
+
+void
+DT_Server_Info_Print(DT_Tdep_Print_Head * phead, Server_Info_t * server_info)
+{
+	DT_Tdep_PT_Printf(phead, "-------------------------------------\n");
+	DT_Tdep_PT_Printf(phead, "Server_Info.dapltest_version   : %d\n",
+			  server_info->dapltest_version);
+	DT_Tdep_PT_Printf(phead, "Server_Info.is_little_endian   : %d\n",
+			  server_info->is_little_endian);
+}
diff --git a/test/dapltest/test/dapl_test_data.c b/test/dapltest/test/dapl_test_data.c
new file mode 100644
index 0000000..59d5d1a
--- /dev/null
+++ b/test/dapltest/test/dapl_test_data.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+DT_Mdep_LockType g_PerfTestLock;
+/*
+ * check memory leaking int             alloc_count; DT_Mdep_LockType
+ * Alloc_Count_Lock;
+ */
+
+Per_Test_Data_t *DT_Alloc_Per_Test_Data(DT_Tdep_Print_Head * phead)
+{
+	Per_Test_Data_t *pt_ptr;
+	pt_ptr = 0;
+
+	pt_ptr = DT_Mdep_Malloc(sizeof(Per_Test_Data_t));
+	if (!pt_ptr) {
+		DT_Tdep_PT_Printf(phead,
+				  "No Memory to create per_test_data!\n");
+	}
+
+	return (pt_ptr);
+}
+
+void DT_Free_Per_Test_Data(Per_Test_Data_t * pt_ptr)
+{
+	DT_Mdep_Free(pt_ptr);
+}
diff --git a/test/dapltest/test/dapl_test_util.c b/test/dapltest/test/dapl_test_util.c
new file mode 100644
index 0000000..db9b672
--- /dev/null
+++ b/test/dapltest/test/dapl_test_util.c
@@ -0,0 +1,680 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/* -----------------------------------------------------------
+ * Gather info about default attributes
+ */
+DAT_BOOLEAN
+DT_query(Per_Test_Data_t * pt_ptr,
+	 DAT_IA_HANDLE ia_handle, DAT_EP_HANDLE ep_handle)
+{
+	char *module = "DT_query";
+	DAT_EVD_HANDLE async_evd_hdl;	/* not used */
+	DAT_EP_PARAM ep_params;
+	DAT_RETURN ret;
+	DT_Tdep_Print_Head *phead;
+
+	phead = pt_ptr->Params.phead;
+
+	/* Query the IA */
+	ret = dat_ia_query(ia_handle,
+			   &async_evd_hdl,
+			   DAT_IA_ALL,
+			   &pt_ptr->ia_attr,
+			   DAT_PROVIDER_FIELD_ALL, &pt_ptr->provider_attr);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "%s: dat_ia_query error: %s\n",
+				  module, DT_RetToString(ret));
+		return (false);
+	}
+
+	/* Query the EP */
+	ret = dat_ep_query(ep_handle, DAT_EP_FIELD_ALL, &ep_params);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead, "%s: dat_ep_query error: %s\n",
+				  module, DT_RetToString(ret));
+		return (false);
+	}
+	pt_ptr->ep_attr = ep_params.ep_attr;
+
+	/*
+	 * If debugging, print out some interesting attributes
+	 */
+	if (DT_dapltest_debug) {
+		DAT_SOCK_ADDR6 *ip6_addr;
+		struct sockaddr_in *ip_addr;
+
+		DT_Tdep_PT_Printf(phead,
+				  "*****  DAPL  Characteristics  *****\n");
+		DT_Tdep_PT_Printf(phead,
+				  "Provider: %s  Version %d.%d  DAPL %d.%d\n",
+				  pt_ptr->provider_attr.provider_name,
+				  pt_ptr->provider_attr.provider_version_major,
+				  pt_ptr->provider_attr.provider_version_minor,
+				  pt_ptr->provider_attr.dapl_version_major,
+				  pt_ptr->provider_attr.dapl_version_minor);
+		DT_Tdep_PT_Printf(phead, "Adapter: %s by %s Version %d.%d\n",
+				  pt_ptr->ia_attr.adapter_name,
+				  pt_ptr->ia_attr.vendor_name,
+				  pt_ptr->ia_attr.hardware_version_major,
+				  pt_ptr->ia_attr.hardware_version_minor);
+		DT_Tdep_PT_Printf(phead, "Supporting:\n");
+		DT_Tdep_PT_Printf(phead,
+				  "\t%d EPs with %d DTOs and %d RDMA/RDs each\n",
+				  pt_ptr->ia_attr.max_eps,
+				  pt_ptr->ia_attr.max_dto_per_ep,
+				  pt_ptr->ia_attr.max_rdma_read_per_ep);
+		DT_Tdep_PT_Printf(phead,
+				  "\t%d EVDs of up to %d entries "
+				  " (default S/R size is %d/%d)\n",
+				  pt_ptr->ia_attr.max_evds,
+				  pt_ptr->ia_attr.max_evd_qlen,
+				  pt_ptr->ep_attr.max_request_dtos,
+				  pt_ptr->ep_attr.max_recv_dtos);
+		DT_Tdep_PT_Printf(phead, "\tIOVs of up to %d elements\n",
+				  pt_ptr->ia_attr.max_iov_segments_per_dto);
+		DT_Tdep_PT_Printf(phead,
+				  "\t%d LMRs (and %d RMRs) of up to 0x" F64x
+				  " bytes\n", pt_ptr->ia_attr.max_lmrs,
+				  pt_ptr->ia_attr.max_rmrs,
+				  pt_ptr->ia_attr.max_lmr_block_size);
+		DT_Tdep_PT_Printf(phead,
+				  "\tMaximum MTU 0x" F64x " bytes, RDMA 0x" F64x
+				  " bytes\n", pt_ptr->ia_attr.max_mtu_size,
+				  pt_ptr->ia_attr.max_rdma_size);
+		DT_Tdep_PT_Printf(phead,
+				  "\tMaximum Private data size %d bytes\n",
+				  pt_ptr->provider_attr.max_private_data_size);
+
+		ip6_addr = (DAT_SOCK_ADDR6 *) pt_ptr->ia_attr.ia_address_ptr;
+		if (ip6_addr->sin6_family == AF_INET6) {
+			DT_Tdep_PT_Printf(phead,
+					  "\tLocal IP address  %x:%x:%x:%x:%x:%x:%x:%x:\n",
+					  ip6_addr->sin6_addr.s6_addr[0],
+					  ip6_addr->sin6_addr.s6_addr[1],
+					  ip6_addr->sin6_addr.s6_addr[2],
+					  ip6_addr->sin6_addr.s6_addr[3],
+					  ip6_addr->sin6_addr.s6_addr[4],
+					  ip6_addr->sin6_addr.s6_addr[5],
+					  ip6_addr->sin6_addr.s6_addr[6],
+					  ip6_addr->sin6_addr.s6_addr[7]);
+			DT_Tdep_PT_Printf(phead, "%x:%x:%x:%x:%x:%x:%x:%x\n",
+					  ip6_addr->sin6_addr.s6_addr[8],
+					  ip6_addr->sin6_addr.s6_addr[9],
+					  ip6_addr->sin6_addr.s6_addr[10],
+					  ip6_addr->sin6_addr.s6_addr[11],
+					  ip6_addr->sin6_addr.s6_addr[12],
+					  ip6_addr->sin6_addr.s6_addr[13],
+					  ip6_addr->sin6_addr.s6_addr[14],
+					  ip6_addr->sin6_addr.s6_addr[15]);
+		} else if (ip6_addr->sin6_family == AF_INET)
+		{
+			ip_addr =
+			    (struct sockaddr_in *)pt_ptr->ia_attr.
+			    ia_address_ptr;
+
+			DT_Tdep_PT_Printf(phead, "\tLocal IP address %s\n",
+					  inet_ntoa(ip_addr->sin_addr));
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "***** ***** ***** ***** ***** *****\n");
+	}
+
+	return (true);
+}
+
+/* -----------------------------------------------------------
+ * Post a recv buffer
+ */
+DAT_BOOLEAN
+DT_post_recv_buffer(DT_Tdep_Print_Head * phead,
+		    DAT_EP_HANDLE ep_handle, Bpool * bp, int index, int size)
+{
+	unsigned char *buff = DT_Bpool_GetBuffer(bp, index);
+	DAT_LMR_TRIPLET *iov = DT_Bpool_GetIOV(bp, index);
+	DAT_LMR_CONTEXT lmr_c = DT_Bpool_GetLMR(bp, index);
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN ret;
+
+	/*
+	 * Prep the inputs
+	 */
+	iov->virtual_address = (DAT_VADDR) (uintptr_t) buff;
+	iov->segment_length = size;
+	iov->lmr_context = lmr_c;
+	cookie.as_64 = (DAT_UINT64) 0UL;
+	cookie.as_ptr = (DAT_PVOID) buff;
+
+	DT_Tdep_PT_Debug(3,
+			 (phead, "Post-Recv #%d [%p, %x]\n", index, buff,
+			  size));
+
+	/* Post the recv buffer */
+	ret = dat_ep_post_recv(ep_handle,
+			       1, iov, cookie, DAT_COMPLETION_DEFAULT_FLAG);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test Error: dat_ep_post_recv failed: %s\n",
+				  DT_RetToString(ret));
+		DT_Test_Error();
+		return false;
+	}
+	return true;
+}
+
+/* -----------------------------------------------------------
+ * Post a send buffer
+ */
+DAT_BOOLEAN
+DT_post_send_buffer(DT_Tdep_Print_Head * phead,
+		    DAT_EP_HANDLE ep_handle, Bpool * bp, int index, int size)
+{
+	unsigned char *buff = DT_Bpool_GetBuffer(bp, index);
+	DAT_LMR_TRIPLET *iov = DT_Bpool_GetIOV(bp, index);
+	DAT_LMR_CONTEXT lmr_c = DT_Bpool_GetLMR(bp, index);
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN ret;
+
+	/*
+	 * Prep the inputs
+	 */
+	iov->virtual_address = (DAT_VADDR) (uintptr_t) buff;
+	iov->segment_length = size;
+	iov->lmr_context = lmr_c;
+	cookie.as_64 = (DAT_UINT64) 0UL;
+	cookie.as_ptr = (DAT_PVOID) buff;
+
+	DT_Tdep_PT_Debug(3,
+			 (phead, "Post-Send #%d [%p, %x]\n", index, buff,
+			  size));
+
+	/* Post the recv buffer */
+	ret = dat_ep_post_send(ep_handle,
+			       1, iov, cookie, DAT_COMPLETION_DEFAULT_FLAG);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test Error: dat_ep_post_send failed: %s\n",
+				  DT_RetToString(ret));
+		DT_Test_Error();
+		return false;
+	}
+	return true;
+}
+
+/* -----------------------------------------------------------
+ * Wait for a CR event, returning false on error.
+ */
+bool
+DT_cr_event_wait(DT_Tdep_Print_Head * phead,
+		 DAT_EVD_HANDLE evd_handle,
+		 DAT_CR_ARRIVAL_EVENT_DATA * cr_stat_p)
+{
+	int err_cnt;
+
+	err_cnt = 0;
+
+	for (;;) {
+		DAT_RETURN ret;
+		DAT_EVENT event;
+
+		ret =
+		    DT_Tdep_evd_wait(evd_handle, DAT_TIMEOUT_INFINITE, &event);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_wait (CR) failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			/*
+			 * If we get an error due to the client breaking the
+			 * connection early or some transients, just ignore it
+			 * and keep going. If we get a bunch of errors, bail
+			 * out.
+			 */
+			/*      if ( err_cnt++ < 10 ) */
+			/*      { */
+			/*              continue; */
+			/*      } */
+
+			break;
+		}
+
+		if (event.event_number == DAT_CONNECTION_REQUEST_EVENT) {
+			/*
+			 * Pass back what we know, if requested.
+			 */
+			if (cr_stat_p) {
+				*cr_stat_p =
+				    event.event_data.cr_arrival_event_data;
+			}
+			return (true);
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: cr_event_wait swallowing %s event\n",
+				  DT_EventToSTr(event.event_number));
+	}
+
+	return (false);
+}
+
+/* -----------------------------------------------------------
+ * Wait for a connection event, returning false on error.
+ */
+bool
+DT_conn_event_wait(DT_Tdep_Print_Head * phead,
+		   DAT_EP_HANDLE ep_handle,
+		   DAT_EVD_HANDLE evd_handle, DAT_EVENT_NUMBER * event_number)
+{
+	for (;;) {
+		DAT_RETURN ret;
+		DAT_EVENT event;
+
+		ret =
+		    DT_Tdep_evd_wait(evd_handle, DAT_TIMEOUT_INFINITE, &event);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_wait (CONN) failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			break;
+		}
+		*event_number = event.event_number;
+		if (event.event_number == DAT_CONNECTION_EVENT_PEER_REJECTED
+		    || event.event_number ==
+		    DAT_CONNECTION_EVENT_NON_PEER_REJECTED
+		    || event.event_number ==
+		    DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR
+		    || event.event_number == DAT_CONNECTION_EVENT_DISCONNECTED
+		    || event.event_number == DAT_CONNECTION_EVENT_BROKEN
+		    || event.event_number == DAT_CONNECTION_EVENT_UNREACHABLE
+		    || event.event_number == DAT_CONNECTION_EVENT_TIMED_OUT) {
+			DT_Tdep_PT_Printf(phead,
+					  "Warning: conn_event_wait %s\n",
+					  DT_EventToSTr(event.event_number));
+			break;
+		}
+		if (event.event_number == DAT_CONNECTION_EVENT_ESTABLISHED) {
+			/*
+			 * Could return DAT_CONNECTION_EVENT_DATA and verify:
+			 *      event.event_data.connect_event_data.ep_handle
+			 *      event.event_data.connect_event_data.private_data_size
+			 *      event.event_data.connect_event_data.private_data
+			 */
+			return (true);
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: conn_event_wait swallowing %s event\n",
+				  DT_EventToSTr(event.event_number));
+	}
+
+	return (false);
+}
+
+/* -----------------------------------------------------------
+ * Wait for a disconnection event, returning false on error.
+ */
+bool
+DT_disco_event_wait(DT_Tdep_Print_Head * phead,
+		    DAT_EVD_HANDLE evd_handle, DAT_EP_HANDLE * ep_handle)
+{
+	for (;;) {
+		DAT_RETURN ret;
+		DAT_EVENT event;
+
+		ret =
+		    DT_Tdep_evd_wait(evd_handle, DAT_TIMEOUT_INFINITE, &event);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_wait (DISCONN) failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			break;
+		}
+		if (event.event_number == DAT_CONNECTION_EVENT_PEER_REJECTED
+		    || event.event_number ==
+		    DAT_CONNECTION_EVENT_NON_PEER_REJECTED
+		    || event.event_number ==
+		    DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR
+		    || event.event_number == DAT_CONNECTION_EVENT_BROKEN
+		    || event.event_number == DAT_CONNECTION_EVENT_UNREACHABLE
+		    || event.event_number == DAT_CONNECTION_EVENT_TIMED_OUT) {
+			DT_Tdep_PT_Printf(phead,
+					  "Warning: disconn_event_wait %s\n",
+					  DT_EventToSTr(event.event_number));
+			break;
+		}
+
+		if (event.event_number == DAT_CONNECTION_EVENT_DISCONNECTED) {
+			if (ep_handle != NULL) {
+				*ep_handle =
+				    event.event_data.connect_event_data.
+				    ep_handle;
+			}
+			return (true);
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: conn_event_wait swallowing %s event\n",
+				  DT_EventToSTr(event.event_number));
+	}
+
+	return (false);
+}
+
+/* -----------------------------------------------------------
+ * Reap a DTO event using a wait or polling, returning false on error.
+ */
+bool
+DT_dto_event_reap(DT_Tdep_Print_Head * phead,
+		  DAT_EVD_HANDLE evd_handle,
+		  bool poll, DAT_DTO_COMPLETION_EVENT_DATA * dto_statusp)
+{
+	if (poll) {
+		return DT_dto_event_poll(phead, evd_handle, dto_statusp);
+	} else {
+		return DT_dto_event_wait(phead, evd_handle, dto_statusp);
+	}
+}
+
+/* -----------------------------------------------------------
+ * Poll for a DTO event, returning false on error.
+ */
+bool
+DT_dto_event_poll(DT_Tdep_Print_Head * phead,
+		  DAT_EVD_HANDLE evd_handle,
+		  DAT_DTO_COMPLETION_EVENT_DATA * dto_statusp)
+{
+	for (;;) {
+		DAT_RETURN ret;
+		DAT_EVENT event;
+
+		ret = DT_Tdep_evd_dequeue(evd_handle, &event);
+
+		if (DAT_GET_TYPE(ret) == DAT_QUEUE_EMPTY) {
+			continue;
+		}
+
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_wait (DTO) failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			break;
+		}
+
+		if (event.event_number == DAT_DTO_COMPLETION_EVENT) {
+			/*
+			 * Pass back all the useful bits if requested:
+			 *      ep_handle,  user_cookie.as_ptr
+			 *      status,     transfered_length
+			 */
+			if (dto_statusp) {
+				*dto_statusp =
+				    event.event_data.dto_completion_event_data;
+			}
+
+			return (true);
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: dto_event_poll swallowing %s event\n",
+				  DT_EventToSTr(event.event_number));
+	}
+
+	return (false);
+}
+
+/* -----------------------------------------------------------
+ * Wait for a DTO event, returning false on error.
+ */
+bool
+DT_dto_event_wait(DT_Tdep_Print_Head * phead,
+		  DAT_EVD_HANDLE evd_handle,
+		  DAT_DTO_COMPLETION_EVENT_DATA * dto_statusp)
+{
+	for (;;) {
+		DAT_RETURN ret;
+		DAT_EVENT event;
+
+		ret =
+		    DT_Tdep_evd_wait(evd_handle, DAT_TIMEOUT_INFINITE, &event);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_wait (DTO) failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			break;
+		}
+
+		if (event.event_number == DAT_DTO_COMPLETION_EVENT) {
+			/*
+			 * Pass back all the useful bits if requested:
+			 *      ep_handle,  user_cookie.as_ptr
+			 *      status,     transfered_length
+			 */
+			if (dto_statusp) {
+				*dto_statusp =
+				    event.event_data.dto_completion_event_data;
+			}
+			return (true);
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: dto_event_wait swallowing %s event\n",
+				  DT_EventToSTr(event.event_number));
+	}
+
+	return (false);
+}
+
+/* -----------------------------------------------------------
+ * Wait for a RMR event, returning false on error.
+ */
+bool
+DT_rmr_event_wait(DT_Tdep_Print_Head * phead,
+		  DAT_EVD_HANDLE evd_handle,
+		  DAT_RMR_BIND_COMPLETION_EVENT_DATA * rmr_statusp)
+{
+	for (;;) {
+		DAT_RETURN ret;
+		DAT_EVENT event;
+
+		ret =
+		    DT_Tdep_evd_wait(evd_handle, DAT_TIMEOUT_INFINITE, &event);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dapl_event_wait (RMR) failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			break;
+		}
+
+		if (event.event_number == DAT_RMR_BIND_COMPLETION_EVENT) {
+			/*
+			 * Pass back all the useful bits if requested:
+			 *      rmr_handle,  user_cookie, status
+			 */
+			if (rmr_statusp) {
+				*rmr_statusp =
+				    event.event_data.rmr_completion_event_data;
+			}
+			return (true);
+		}
+
+		DT_Tdep_PT_Printf(phead,
+				  "Warning: rmr_event_wait swallowing %s event\n",
+				  DT_EventToSTr(event.event_number));
+	}
+
+	return (false);
+}
+
+/* -----------------------------------------------------------
+ * Check a DTO and print some debug info if anything is amiss.
+ */
+bool
+DT_dto_check(DT_Tdep_Print_Head * phead,
+	     DAT_DTO_COMPLETION_EVENT_DATA * dto_p,
+	     DAT_EP_HANDLE ep_expected,
+	     DAT_COUNT len_expected,
+	     DAT_DTO_COOKIE cookie_expected, char *message)
+{
+	if (((ep_expected != NULL) && (dto_p->ep_handle != ep_expected))
+	    || dto_p->transfered_length != len_expected
+	    || dto_p->user_cookie.as_64 != cookie_expected.as_64
+	    || dto_p->status != DAT_DTO_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test Error: %s-reaping DTO problem, status = %s\n",
+				  message,
+				  (dto_p->status ==
+				   DAT_DTO_SUCCESS ? "OK" : (dto_p->status ==
+							     DAT_DTO_FAILURE ?
+							     "FAILURE" :
+							     "LengthError")));
+		DT_Test_Error();
+		if ((ep_expected != NULL) && (dto_p->ep_handle != ep_expected)) {
+			DT_Tdep_PT_Printf(phead,
+					  "\tEndPoint mismatch (got %p wanted %p)\n",
+					  dto_p->ep_handle, ep_expected);
+		}
+		if (dto_p->transfered_length != len_expected) {
+			DT_Tdep_PT_Printf(phead,
+					  "\tLength mismatch (xfer 0x" F64x
+					  " wanted 0x%x)\n",
+					  dto_p->transfered_length,
+					  len_expected);
+		}
+		if (dto_p->user_cookie.as_64 != cookie_expected.as_64) {
+			DT_Tdep_PT_Printf(phead,
+					  "\tCookie mismatch (got " F64x
+					  " wanted " F64x ")\n",
+					  dto_p->user_cookie.as_64,
+					  cookie_expected.as_64);
+		}
+		return (false);
+	}
+
+	return (true);
+}
+
+/* -----------------------------------------------------------
+ * Check an RMR Bind  and print some debug info if anything is amiss.
+ */
+bool
+DT_rmr_check(DT_Tdep_Print_Head * phead,
+	     DAT_RMR_BIND_COMPLETION_EVENT_DATA * rmr_p,
+	     DAT_RMR_HANDLE rmr_expected,
+	     DAT_PVOID cookie_expected, char *message)
+{
+	if (rmr_p->rmr_handle != rmr_expected
+	    || rmr_p->user_cookie.as_ptr != cookie_expected
+	    || rmr_p->status != DAT_RMR_BIND_SUCCESS) {
+
+		DT_Tdep_PT_Printf(phead,
+				  "Test Error: %s RMR bind problem, status = %s\n",
+				  message,
+				  (rmr_p->status ==
+				   DAT_RMR_BIND_SUCCESS ? "OK" : "FAILURE"));
+		DT_Test_Error();
+		if (rmr_p->rmr_handle != rmr_expected) {
+			DT_Tdep_PT_Printf(phead,
+					  "\tRMR handle mismatch (got 0x%p wanted 0x%p)\n",
+					  rmr_p->rmr_handle, rmr_expected);
+		}
+		if (rmr_p->user_cookie.as_ptr != cookie_expected) {
+			DT_Tdep_PT_Printf(phead,
+					  "\tCookie mismatch (got %p wanted %p)\n",
+					  rmr_p->user_cookie.as_ptr,
+					  cookie_expected);
+		}
+		return (false);
+	}
+
+	return (true);
+}
+
+/* -----------------------------------------------------------
+ * Check a CR and print some debug info if anything is amiss.
+ */
+bool
+DT_cr_check(DT_Tdep_Print_Head * phead,
+	    DAT_CR_ARRIVAL_EVENT_DATA * cr_stat_p,
+	    DAT_PSP_HANDLE psp_handle_expected,
+	    DAT_CONN_QUAL port_expected,
+	    DAT_CR_HANDLE * cr_handlep, char *message)
+{
+	DAT_RETURN ret;
+
+	if (cr_handlep) {
+		*cr_handlep = (DAT_CR_HANDLE) 0;
+	}
+
+	if (cr_stat_p->conn_qual != port_expected ||
+	    (psp_handle_expected &&
+	     cr_stat_p->sp_handle.psp_handle != psp_handle_expected)) {
+
+		DT_Tdep_PT_Printf(phead, "Test Error: %s CR data problem\n",
+				  message);
+		DT_Test_Error();
+		if (cr_stat_p->conn_qual != port_expected) {
+			DT_Tdep_PT_Printf(phead, "\tCR conn_qual mismatch "
+					  " (got 0x" F64x " wanted 0x" F64x
+					  ")\n", cr_stat_p->conn_qual,
+					  port_expected);
+		}
+		if (psp_handle_expected &&
+		    cr_stat_p->sp_handle.psp_handle != psp_handle_expected) {
+			DT_Tdep_PT_Printf(phead,
+					  "\tPSP mismatch (got 0x%p wanted 0x%p)\n",
+					  cr_stat_p->sp_handle.psp_handle,
+					  psp_handle_expected);
+		}
+		if (!cr_stat_p->cr_handle) {
+			DT_Tdep_PT_Printf(phead, "\tGot NULL cr_handle\n");
+		} else {
+			ret = dat_cr_reject(cr_stat_p->cr_handle, 0, NULL);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "\tdat_cr_reject error: %s\n",
+						  DT_RetToString(ret));
+			}
+		}
+		return (false);
+	}
+
+	if (cr_handlep) {
+		*cr_handlep = cr_stat_p->cr_handle;
+	}
+	return (true);
+}
diff --git a/test/dapltest/test/dapl_thread.c b/test/dapltest/test/dapl_thread.c
new file mode 100644
index 0000000..9a56558
--- /dev/null
+++ b/test/dapltest/test/dapl_thread.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+/*
+ * Class Thread
+ *
+ * Threads subsystem initialization
+ */
+void DT_Thread_Init(Per_Test_Data_t * pt_ptr)
+{
+	DT_Mdep_LockInit(&pt_ptr->Thread_counter_lock);
+	pt_ptr->Thread_counter = 0;
+
+	/*
+	 * Initialize the synchronization event in the pt_ptr so it's ready
+	 * to be signalled when the time comes.  The countdown counter
+	 * lets me coordinate with all the test threads so that the server
+	 * thread doesn't get notified that the test endpoints are ready
+	 * until they actually are.  Only transaction tests use this *
+	 * functionality; if the performance test gets changed to use
+	 * multiple threads on the server side then that code semantic
+	 * will need to be added for final test endpoint setup
+	 * notification or there will continue  to be a race condition
+	 * between the main server thread and the server test threads.
+	 */
+	DT_Mdep_wait_object_init(&pt_ptr->synch_wait_object);
+	pt_ptr->Countdown_Counter = 0;
+
+}
+
+/*
+ * Threads subsystem destroying
+ */
+void DT_Thread_End(Per_Test_Data_t * pt_ptr)
+{
+	DT_Mdep_LockDestroy(&pt_ptr->Thread_counter_lock);
+
+	/*
+	 * destroy the wait object created by init.
+	 */
+	DT_Mdep_wait_object_destroy(&pt_ptr->synch_wait_object);
+
+}
+
+/*
+ * Thread constructor
+ *
+ * NOTE: This routine does NOT create a thread as the name implies. The thread
+ * is created in DT_Thread_Start (which is counter intuitive)
+ */
+Thread *DT_Thread_Create(Per_Test_Data_t * pt_ptr,
+			 void (*fn) (void *),
+			 void *param, unsigned int stacksize)
+{
+	Thread *thread_ptr;
+	thread_ptr =
+	    (Thread *) DT_MemListAlloc(pt_ptr, "thread.c", THREAD,
+				       sizeof(Thread));
+	if (thread_ptr == NULL) {
+		return NULL;
+	}
+	thread_ptr->param = param;
+	thread_ptr->function = fn;
+	thread_ptr->thread_handle = 0;
+	thread_ptr->stacksize = stacksize;
+
+	DT_Mdep_Lock(&pt_ptr->Thread_counter_lock);
+	pt_ptr->Thread_counter++;
+	DT_Mdep_Unlock(&pt_ptr->Thread_counter_lock);
+
+	DT_Mdep_Thread_Init_Attributes(thread_ptr);
+
+	return thread_ptr;
+}
+
+/*
+ * Thread destructor
+ */
+void DT_Thread_Destroy(Thread * thread_ptr, Per_Test_Data_t * pt_ptr)
+{
+	if (thread_ptr) {
+		DT_Mdep_Lock(&pt_ptr->Thread_counter_lock);
+		pt_ptr->Thread_counter--;
+		DT_Mdep_Unlock(&pt_ptr->Thread_counter_lock);
+
+		DT_Mdep_Thread_Destroy_Attributes(thread_ptr);
+		DT_MemListFree(pt_ptr, thread_ptr);
+	}
+}
+
+/*
+ * Start thread execution NOTE: This routine DOES create a thread in addition
+ * to starting it whereas DT_Thread_Create just sets up some data structures.
+ * (this is counter-intuitive)
+ */
+bool DT_Thread_Start(Thread * thread_ptr)
+{
+	return DT_Mdep_Thread_Start(thread_ptr);
+}
diff --git a/test/dapltest/test/dapl_transaction_stats.c b/test/dapltest/test/dapl_transaction_stats.c
new file mode 100644
index 0000000..f9d6377
--- /dev/null
+++ b/test/dapltest/test/dapl_transaction_stats.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void
+DT_init_transaction_stats(Transaction_Stats_t * transaction_stats,
+			  unsigned int num)
+{
+	DT_Mdep_LockInit(&transaction_stats->lock);
+
+	transaction_stats->wait_count = num;
+	transaction_stats->num_ops = 0;
+	transaction_stats->time_ms = 0;
+	transaction_stats->bytes_send = 0;
+	transaction_stats->bytes_recv = 0;
+	transaction_stats->bytes_rdma_read = 0;
+	transaction_stats->bytes_rdma_write = 0;
+}
+
+void
+DT_transaction_stats_set_ready(DT_Tdep_Print_Head * phead,
+			       Transaction_Stats_t * transaction_stats)
+{
+	DT_Mdep_Lock(&transaction_stats->lock);
+	transaction_stats->wait_count--;
+
+	DT_Tdep_PT_Debug(1,
+			 (phead,
+			  "Received Sync Message from server (%d left)\n",
+			  transaction_stats->wait_count));
+	DT_Mdep_Unlock(&transaction_stats->lock);
+}
+
+bool
+DT_transaction_stats_wait_for_all(DT_Tdep_Print_Head * phead,
+				  Transaction_Stats_t * transaction_stats)
+{
+	unsigned int loop_count;
+	loop_count = 100 * 10;	/* 100 * 10ms * 10  = 10 seconds */
+	while (transaction_stats->wait_count != 0 && loop_count != 0) {
+		DT_Mdep_Sleep(10);
+		loop_count--;
+	}
+	if (loop_count == 0) {
+		DT_Tdep_PT_Printf(phead,
+				  "FAIL: %d Server test connections did not report ready.\n",
+				  transaction_stats->wait_count);
+		return false;
+	}
+	return true;
+}
+
+/*
+ *
+ */
+void
+DT_update_transaction_stats(Transaction_Stats_t * transaction_stats,
+			    unsigned int num_ops,
+			    unsigned int time_ms,
+			    unsigned int bytes_send,
+			    unsigned int bytes_recv,
+			    unsigned int bytes_rdma_read,
+			    unsigned int bytes_rdma_write)
+{
+	DT_Mdep_Lock(&transaction_stats->lock);
+
+	/* look for the longest time... */
+	if (time_ms > transaction_stats->time_ms) {
+		transaction_stats->time_ms = time_ms;
+	}
+
+	transaction_stats->num_ops += num_ops;
+	transaction_stats->bytes_send += bytes_send;
+	transaction_stats->bytes_recv += bytes_recv;
+	transaction_stats->bytes_rdma_read += bytes_rdma_read;
+	transaction_stats->bytes_rdma_write += bytes_rdma_write;
+	DT_Mdep_Unlock(&transaction_stats->lock);
+}
+
+/*
+ *
+ */
+void
+DT_print_transaction_stats(DT_Tdep_Print_Head * phead,
+			   Transaction_Stats_t * transaction_stats,
+			   unsigned int num_threads, unsigned int num_EPs)
+{
+	double time_s;
+	double mbytes_send;
+	double mbytes_recv;
+	double mbytes_rdma_read;
+	double mbytes_rdma_write;
+	int total_ops;
+	DT_Mdep_Lock(&transaction_stats->lock);
+	time_s = (double)(transaction_stats->time_ms) / 1000;
+	if (time_s == 0.0) {
+		DT_Tdep_PT_Printf(phead,
+				  "----- Test completed successfully, but cannot calculate stats as not\n"
+				  "----- enough time has lapsed.\n"
+				  "----- Try running the test with more iterations.\n");
+		goto unlock_and_return;
+	}
+	mbytes_send = (double)transaction_stats->bytes_send / 1000 / 1000;
+	mbytes_recv = (double)transaction_stats->bytes_recv / 1000 / 1000;
+	mbytes_rdma_read =
+	    (double)transaction_stats->bytes_rdma_read / 1000 / 1000;
+	mbytes_rdma_write =
+	    (double)transaction_stats->bytes_rdma_write / 1000 / 1000;
+	total_ops = transaction_stats->num_ops;
+
+	if (0 == total_ops) {
+		DT_Tdep_PT_Printf(phead,
+				  "----- Test completed successfully, but no operations!\n");
+		goto unlock_and_return;
+	}
+
+	DT_Tdep_PT_Printf(phead, "----- Stats ---- : %u threads, %u EPs\n",
+			  num_threads, num_EPs);
+	DT_Tdep_PT_Printf(phead, "Total WQE        : %7d.%02d WQE/Sec\n",
+			  whole(total_ops / time_s),
+			  hundredths(total_ops / time_s));
+	DT_Tdep_PT_Printf(phead, "Total Time       : %7d.%02d sec\n",
+			  whole(time_s), hundredths(time_s));
+	DT_Tdep_PT_Printf(phead,
+			  "Total Send       : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_send), hundredths(mbytes_send),
+			  whole(mbytes_send / time_s),
+			  hundredths(mbytes_send / time_s));
+	DT_Tdep_PT_Printf(phead,
+			  "Total Recv       : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_recv), hundredths(mbytes_recv),
+			  whole(mbytes_recv / time_s),
+			  hundredths(mbytes_recv / time_s));
+	DT_Tdep_PT_Printf(phead,
+			  "Total RDMA Read  : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_rdma_read), hundredths(mbytes_rdma_read),
+			  whole(mbytes_rdma_read / time_s),
+			  hundredths(mbytes_rdma_read / time_s));
+	DT_Tdep_PT_Printf(phead,
+			  "Total RDMA Write : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_rdma_write),
+			  hundredths(mbytes_rdma_write),
+			  whole(mbytes_rdma_write / time_s),
+			  hundredths(mbytes_rdma_write / time_s));
+
+      unlock_and_return:
+	DT_Mdep_Unlock(&transaction_stats->lock);
+}
diff --git a/test/dapltest/test/dapl_transaction_test.c b/test/dapltest/test/dapl_transaction_test.c
new file mode 100644
index 0000000..14c14b4
--- /dev/null
+++ b/test/dapltest/test/dapl_transaction_test.c
@@ -0,0 +1,2265 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+#define RMI_SEND_BUFFER_ID      0
+#define RMI_RECV_BUFFER_ID      1
+#define SYNC_SEND_BUFFER_ID     2
+#define SYNC_RECV_BUFFER_ID     3
+
+/*
+ * The sync buffers are sent to say "Go!" to the other side.
+ * This is a handy place to test whether a zero-sized send into
+ * a zero-sized buffer actually works.  If the client side hangs
+ * in 'Wait for Sync Message' when this is zero, it's a DAPL bug.
+ */
+#define SYNC_BUFF_SIZE		64
+
+#define DFLT_QLEN      8	/* default event queue length */
+#define DFLT_TMO      10	/* default timeout (seconds)  */
+#define MAX_CONN_RETRY 8
+
+/****************************************************************************/
+DAT_RETURN
+DT_Transaction_Test_Client(Per_Test_Data_t * pt_ptr,
+			   DAT_IA_HANDLE ia_handle,
+			   DAT_IA_ADDRESS_PTR remote_ia_addr)
+{
+	Transaction_Cmd_t *cmd = &pt_ptr->Params.u.Transaction_Cmd;
+	unsigned int i;
+	DT_Tdep_Print_Head *phead;
+	DAT_RETURN rc = DAT_SUCCESS;
+
+	phead = pt_ptr->Params.phead;
+
+	DT_init_transaction_stats(&pt_ptr->Client_Stats,
+				  cmd->num_threads * cmd->eps_per_thread);
+
+	/* Now go set up the client test threads */
+	for (i = 0; i < cmd->num_threads; i++) {
+		unsigned int port_num = pt_ptr->Server_Info.first_port_number
+		    + i * cmd->eps_per_thread;
+
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Client: Starting Client side of test\n"));
+		if (!DT_Transaction_Create_Test
+		    (pt_ptr, ia_handle, false, port_num,
+		     pt_ptr->Server_Info.is_little_endian, remote_ia_addr)) {
+			DT_Tdep_PT_Printf(phead,
+					  "Client: Cannot Create Test!\n");
+			rc = DAT_INSUFFICIENT_RESOURCES;
+			break;
+		}
+#ifdef CM_BUSTED
+	/*****  XXX Chill out a bit to give the kludged CM a chance ...
+	 *****/ DT_Mdep_Sleep(5000);
+#endif
+
+	}
+
+	/* Wait until end of all threads */
+	while (pt_ptr->Thread_counter > 0) {
+		DT_Mdep_Sleep(100);
+	}
+
+	DT_print_transaction_stats(phead,
+				   &pt_ptr->Client_Stats,
+				   cmd->num_threads, cmd->eps_per_thread);
+	return rc;
+}
+
+/****************************************************************************/
+void DT_Transaction_Test_Server(void *params)
+{
+	Per_Test_Data_t *pt_ptr = (Per_Test_Data_t *) params;
+	Transaction_Cmd_t *cmd = &pt_ptr->Params.u.Transaction_Cmd;
+	unsigned int i;
+	DT_Tdep_Print_Head *phead;
+
+	phead = pt_ptr->Params.phead;
+
+	pt_ptr->Countdown_Counter = cmd->num_threads;
+
+	for (i = 0; i < cmd->num_threads; i++) {
+		unsigned int port_num = pt_ptr->Server_Info.first_port_number
+		    + i * cmd->eps_per_thread;
+
+		if (!DT_Transaction_Create_Test(pt_ptr,
+						pt_ptr->ps_ptr->ia_handle,
+						true,
+						port_num,
+						pt_ptr->Client_Info.
+						is_little_endian,
+						(DAT_IA_ADDRESS_PTR) 0)) {
+			DT_Tdep_PT_Printf(phead,
+					  "Server: Cannot Create Test!\n");
+			break;
+		}
+#ifdef CM_BUSTED
+	/*****  XXX Chill out a bit to give the kludged CM a chance ...
+	 *****/ DT_Mdep_Sleep(5000);
+#endif
+
+	}
+
+	/* Wait until end of all sub-threads */
+	while (pt_ptr->Thread_counter > 1) {
+		DT_Mdep_Sleep(100);
+	}
+	DT_Thread_Destroy(pt_ptr->thread, pt_ptr);	/* destroy Master thread */
+
+	DT_Mdep_Lock(&pt_ptr->ps_ptr->num_clients_lock);
+	pt_ptr->ps_ptr->num_clients--;
+	DT_Mdep_Unlock(&pt_ptr->ps_ptr->num_clients_lock);
+
+	/* NB: Server has no pt_ptr->remote_netaddr */
+	DT_PrintMemList(pt_ptr);	/* check if we return all space allocated */
+	DT_Mdep_LockDestroy(&pt_ptr->Thread_counter_lock);
+	DT_Mdep_LockDestroy(&pt_ptr->MemListLock);
+	DT_Free_Per_Test_Data(pt_ptr);
+	DT_Tdep_PT_Printf(phead,
+			  "Server: Transaction Test Finished for this client\n");
+	/*
+	 * check memory leaking DT_Tdep_PT_Printf(phead, "Server: App allocated Memory Left:
+	 * %d\n", alloc_count);
+	 */
+}
+
+/****************************************************************************/
+/*
+ * DT_Transaction_Create_Test()
+ *
+ * Initialize what we can in the test structure.  Then fork a thread to do the
+ * work.
+ */
+
+bool
+DT_Transaction_Create_Test(Per_Test_Data_t * pt_ptr,
+			   DAT_IA_HANDLE * ia_handle,
+			   DAT_BOOLEAN is_server,
+			   unsigned int port_num,
+			   DAT_BOOLEAN remote_is_little_endian,
+			   DAT_IA_ADDRESS_PTR remote_ia_addr)
+{
+	Transaction_Test_t *test_ptr;
+	DT_Tdep_Print_Head *phead;
+
+	phead = pt_ptr->Params.phead;
+
+	test_ptr = (Transaction_Test_t *) DT_MemListAlloc(pt_ptr,
+							  "transaction_test_t",
+							  TRANSACTIONTEST,
+							  sizeof
+							  (Transaction_Test_t));
+	if (!test_ptr) {
+		DT_Tdep_PT_Printf(phead,
+				  "No Memory to create transaction test structure!\n");
+		return false;
+	}
+
+	/* Unused fields zeroed by allocator */
+	test_ptr->remote_is_little_endian = remote_is_little_endian;
+	test_ptr->is_server = is_server;
+	test_ptr->pt_ptr = pt_ptr;
+	test_ptr->ia_handle = ia_handle;
+	test_ptr->base_port = (DAT_CONN_QUAL) port_num;
+	test_ptr->cmd = &pt_ptr->Params.u.Transaction_Cmd;
+	test_ptr->time_out = DFLT_TMO * 1000;	/* DFLT_TMO seconds  */
+
+	/* FIXME more analysis needs to go into determining the minimum  */
+	/* possible value for DFLT_QLEN. This evd_length value will be   */
+	/* used for all EVDs. There are a number of dependencies imposed */
+	/* by this design (ex. min(cr_evd_len) != min(recv_evd_len) ).   */
+	/* In the future it may be best to use individual values.        */
+	test_ptr->evd_length = DT_max(DFLT_QLEN,
+				      test_ptr->cmd->eps_per_thread *
+				      test_ptr->cmd->num_ops);
+
+	test_ptr->remote_ia_addr = remote_ia_addr;
+
+	test_ptr->thread = DT_Thread_Create(pt_ptr,
+					    DT_Transaction_Main,
+					    test_ptr,
+					    DT_MDEP_DEFAULT_STACK_SIZE);
+	if (test_ptr->thread == 0) {
+		DT_Tdep_PT_Printf(phead, "No memory!\n");
+		DT_MemListFree(test_ptr->pt_ptr, test_ptr);
+		return false;
+	}
+	DT_Thread_Start(test_ptr->thread);
+
+	return true;
+}
+
+/****************************************************************************/
+/*
+ * Main Transaction Test Execution Routine
+ *
+ * Both client and server threads start here, with IA already open.
+ * Each test thread establishes a connection with its counterpart.
+ * They swap remote memory information (if necessary), then set up
+ * buffers and local data structures.  When ready, the two sides
+ * synchronize, then testing begins.
+ */
+void DT_Transaction_Main(void *param)
+{
+	Transaction_Test_t *test_ptr = (Transaction_Test_t *) param;
+	DAT_RETURN ret;
+	DAT_UINT32 i, j;
+	bool success = false;
+	Per_Test_Data_t *pt_ptr;
+	Thread *thread;
+	DAT_DTO_COOKIE dto_cookie;
+	char *private_data_str;
+	DAT_EVENT_NUMBER event_num;
+	DT_Tdep_Print_Head *phead;
+
+	pt_ptr = test_ptr->pt_ptr;
+	thread = test_ptr->thread;
+	phead = pt_ptr->Params.phead;
+#ifdef CM_BUSTED
+	private_data_str = "";
+#else
+	private_data_str = "DAPL and RDMA rule! Test 4321.";
+#endif
+
+	/* create a protection zone */
+	ret = dat_pz_create(test_ptr->ia_handle, &test_ptr->pz_handle);
+	if (ret != DAT_SUCCESS) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x "]: dat_pz_create error: %s\n",
+				  test_ptr->base_port, DT_RetToString(ret));
+		test_ptr->pz_handle = DAT_HANDLE_NULL;
+		goto test_failure;
+	}
+
+	/* Allocate per-EP data */
+	test_ptr->ep_context = (Ep_Context_t *)
+	    DT_MemListAlloc(pt_ptr,
+			    "transaction_test",
+			    EPCONTEXT,
+			    test_ptr->cmd->eps_per_thread
+			    * sizeof(Ep_Context_t));
+	if (!test_ptr->ep_context) {
+		DT_Tdep_PT_Printf(phead,
+				  "Test[" F64x "]: no memory for EP context\n",
+				  test_ptr->base_port);
+		goto test_failure;
+	}
+
+	/*
+	 * Set up the per-EP contexts:
+	 *          create the EP
+	 *          allocate buffers for remote memory info exchange
+	 *          post the receive buffers
+	 *          connect
+	 *          set up buffers and remote memory info
+	 *          send across our info
+	 *          recv the other side's info and extract what we need
+	 */
+	for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+		DAT_EP_ATTR ep_attr;
+		DAT_UINT32 buff_size = MAX_OPS * sizeof(RemoteMemoryInfo);
+
+		/* create 4 EVDs - recv, request+RMR, conn-request, connect */
+		ret =
+		    DT_Tdep_evd_create(test_ptr->ia_handle,
+				       test_ptr->evd_length, NULL,
+				       DAT_EVD_DTO_FLAG,
+				       &test_ptr->ep_context[i].recv_evd_hdl);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_evd_create (recv) error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			test_ptr->ep_context[i].recv_evd_hdl = DAT_HANDLE_NULL;
+			goto test_failure;
+		}
+
+		ret =
+		    DT_Tdep_evd_create(test_ptr->ia_handle,
+				       test_ptr->evd_length, NULL,
+				       DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG,
+				       &test_ptr->ep_context[i].reqt_evd_hdl);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_evd_create (request) error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			test_ptr->ep_context[i].reqt_evd_hdl = DAT_HANDLE_NULL;
+			goto test_failure;
+		}
+
+		if (pt_ptr->local_is_server) {
+			/* Client-side doesn't need CR events */
+			ret =
+			    DT_Tdep_evd_create(test_ptr->ia_handle,
+					       test_ptr->evd_length, NULL,
+					       DAT_EVD_CR_FLAG,
+					       &test_ptr->ep_context[i].
+					       creq_evd_hdl);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test[" F64x
+						  "]: dat_evd_create (cr) error: %s\n",
+						  test_ptr->base_port,
+						  DT_RetToString(ret));
+				test_ptr->ep_context[i].creq_evd_hdl =
+				    DAT_HANDLE_NULL;
+				goto test_failure;
+			}
+		}
+
+		ret =
+		    DT_Tdep_evd_create(test_ptr->ia_handle,
+				       test_ptr->evd_length, NULL,
+				       DAT_EVD_CONNECTION_FLAG,
+				       &test_ptr->ep_context[i].conn_evd_hdl);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_evd_create (conn) error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			test_ptr->ep_context[i].conn_evd_hdl = DAT_HANDLE_NULL;
+			goto test_failure;
+		}
+
+		/*
+		 * Adjust default EP attributes to fit the requested test.
+		 * This is simplistic; in that we don't count ops of each
+		 * type and direction, checking EP limits.  We just try to
+		 * be sure the EP's WQs are large enough.  The "+2" is for
+		 * the RemoteMemInfo and Sync receive buffers.
+		 */
+		ep_attr = pt_ptr->ep_attr;
+		if (ep_attr.max_recv_dtos < test_ptr->cmd->num_ops + 2) {
+			ep_attr.max_recv_dtos = test_ptr->cmd->num_ops + 2;
+		}
+		if (ep_attr.max_request_dtos < test_ptr->cmd->num_ops + 2) {
+			ep_attr.max_request_dtos = test_ptr->cmd->num_ops + 2;
+		}
+
+		/* Create EP */
+		ret = dat_ep_create(test_ptr->ia_handle,	/* IA       */
+				    test_ptr->pz_handle,	/* PZ       */
+				    test_ptr->ep_context[i].recv_evd_hdl,	/* recv     */
+				    test_ptr->ep_context[i].reqt_evd_hdl,	/* request  */
+				    test_ptr->ep_context[i].conn_evd_hdl,	/* connect  */
+				    &ep_attr,	/* EP attrs */
+				    &test_ptr->ep_context[i].ep_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_ep_create #%d error: %s\n",
+					  test_ptr->base_port, i,
+					  DT_RetToString(ret));
+			test_ptr->ep_context[i].ep_handle = DAT_HANDLE_NULL;
+			goto test_failure;
+		}
+
+		/*
+		 * Allocate a buffer pool so we can exchange the
+		 * remote memory info and initialize.
+		 */
+		test_ptr->ep_context[i].bp = DT_BpoolAlloc(pt_ptr, phead, test_ptr->ia_handle, test_ptr->pz_handle, test_ptr->ep_context[i].ep_handle, DAT_HANDLE_NULL,	/* rmr */
+							   buff_size,
+							   4,
+							   DAT_OPTIMAL_ALIGNMENT,
+							   false, false);
+		if (!test_ptr->ep_context[i].bp) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: no memory for remote memory buffers\n",
+					  test_ptr->base_port);
+			goto test_failure;
+		}
+
+		DT_Tdep_PT_Debug(3, (phead,
+				     "0: RMI_SEND  %p\n",
+				     (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->
+								    ep_context
+								    [i].bp,
+								    0)));
+		DT_Tdep_PT_Debug(3,
+				 (phead, "1: RMI_RECV  %p\n",
+				  (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->
+								 ep_context[i].
+								 bp, 1)));
+		DT_Tdep_PT_Debug(3,
+				 (phead, "2: SYNC_SEND %p\n",
+				  (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->
+								 ep_context[i].
+								 bp, 2)));
+		DT_Tdep_PT_Debug(3,
+				 (phead, "3: SYNC_RECV %p\n",
+				  (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->
+								 ep_context[i].
+								 bp, 3)));
+
+		/*
+		 * Post recv and sync buffers
+		 */
+		if (!DT_post_recv_buffer(phead,
+					 test_ptr->ep_context[i].ep_handle,
+					 test_ptr->ep_context[i].bp,
+					 RMI_RECV_BUFFER_ID, buff_size)) {
+			/* error message printed by DT_post_recv_buffer */
+			goto test_failure;
+		}
+		if (!DT_post_recv_buffer(phead,
+					 test_ptr->ep_context[i].ep_handle,
+					 test_ptr->ep_context[i].bp,
+					 SYNC_RECV_BUFFER_ID, SYNC_BUFF_SIZE)) {
+			/* error message printed by DT_post_recv_buffer */
+			goto test_failure;
+		}
+
+		/*
+		 * Establish the connection
+		 */
+		test_ptr->ep_context[i].ia_port = test_ptr->base_port + i;
+
+		if (pt_ptr->local_is_server) {
+			if (test_ptr->cmd->use_rsp) {
+				/*
+				 * Server - create a single-use RSP and
+				 *          await a connection for this EP
+				 */
+
+				ret = dat_rsp_create(test_ptr->ia_handle,
+						     test_ptr->ep_context[i].
+						     ia_port,
+						     test_ptr->ep_context[i].
+						     ep_handle,
+						     test_ptr->ep_context[i].
+						     creq_evd_hdl,
+						     &test_ptr->ep_context[i].
+						     rsp_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_rsp_create #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					goto test_failure;
+				}
+			} else {
+				ret = dat_psp_create(test_ptr->ia_handle,
+						     test_ptr->ep_context[i].
+						     ia_port,
+						     test_ptr->ep_context[i].
+						     creq_evd_hdl,
+						     DAT_PSP_CONSUMER_FLAG,
+						     &test_ptr->ep_context[i].
+						     psp_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_psp_create #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					goto test_failure;
+				}
+
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Server[" F64x
+						  "]: Listen #%d on PSP port 0x"
+						  F64x "\n",
+						  test_ptr->base_port, i,
+						  test_ptr->ep_context[i].
+						  ia_port));
+			}
+		}
+	}
+
+	/* Here's where we tell the server process that this thread is
+	 * ready to wait for connection requests from the remote end.
+	 * Modify the synch wait semantics at your own risk - if these
+	 * signals and waits aren't here, there will be chronic
+	 * connection rejection timing problems.
+	 */
+	if (pt_ptr->local_is_server) {
+		DT_Mdep_Lock(&pt_ptr->Thread_counter_lock);
+		pt_ptr->Countdown_Counter--;
+		/* Deliberate pre-decrement.  Post decrement won't
+		 * work here, so don't do it.
+		 */
+		if (pt_ptr->Countdown_Counter <= 0) {
+			DT_Mdep_wait_object_wakeup(&pt_ptr->synch_wait_object);
+		}
+
+		DT_Mdep_Unlock(&pt_ptr->Thread_counter_lock);
+	}
+
+	for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+		DAT_UINT32 buff_size = MAX_OPS * sizeof(RemoteMemoryInfo);
+		RemoteMemoryInfo *RemoteMemInfo;
+		DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+		DAT_CR_ARRIVAL_EVENT_DATA cr_stat;
+		DAT_CR_HANDLE cr_handle;
+
+		/*
+		 * Establish the connection
+		 */
+
+		if (pt_ptr->local_is_server) {
+			DAT_CR_PARAM cr_param;
+
+			if (test_ptr->cmd->use_rsp) {
+
+				/* wait for the connection request */
+				if (!DT_cr_event_wait(phead,
+						      test_ptr->ep_context[i].
+						      creq_evd_hdl, &cr_stat)
+				    || !DT_cr_check(phead, &cr_stat,
+						    test_ptr->ep_context[i].
+						    rsp_handle,
+						    test_ptr->ep_context[i].
+						    ia_port, &cr_handle,
+						    "Server")) {
+					goto test_failure;
+				}
+
+				ret = dat_cr_query(cr_handle,
+						   DAT_CR_FIELD_ALL, &cr_param);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_cr_query #%d error:(%x) %s\n",
+							  test_ptr->base_port,
+							  i, ret,
+							  DT_RetToString(ret));
+				} else {
+					if (strncmp
+					    ((char *)cr_param.private_data,
+					     private_data_str,
+					     strlen(private_data_str)) != 0) {
+						DT_Tdep_PT_Printf(phead,
+								  "--Private Data mismatch!\n");
+					} else {
+						DT_Tdep_PT_Debug(1,
+								 (phead,
+								  "--Private Data: %d: <%s>\n",
+								  cr_param.
+								  private_data_size,
+								  (char *)
+								  cr_param.
+								  private_data));
+					}
+				}
+
+				/* what, me query?  just try to accept the connection */
+				ret = dat_cr_accept(cr_handle, 0,	/* NULL for RSP */
+						    0,
+						    (DAT_PVOID) 0
+						    /* no private data */ );
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_cr_accept #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					/* cr_handle consumed on failure */
+					goto test_failure;
+				}
+
+				/* wait for DAT_CONNECTION_EVENT_ESTABLISHED */
+				if (!DT_conn_event_wait(phead,
+							test_ptr->ep_context[i].
+							ep_handle,
+							test_ptr->ep_context[i].
+							conn_evd_hdl,
+							&event_num)) {
+					/* error message printed by DT_conn_event_wait */
+					goto test_failure;
+				}
+				/* throw away single-use PSP */
+				ret =
+				    dat_rsp_free(test_ptr->ep_context[i].
+						 rsp_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_rsp_free #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					goto test_failure;
+				}
+
+			} else {
+				/*
+				 * Server - use a short-lived PSP instead of an RSP
+				 */
+				/* wait for a connection request */
+				if (!DT_cr_event_wait(phead,
+						      test_ptr->ep_context[i].
+						      creq_evd_hdl, &cr_stat)) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_psp_create #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					goto test_failure;
+				}
+				if (!DT_cr_check(phead,
+						 &cr_stat,
+						 test_ptr->ep_context[i].
+						 psp_handle,
+						 test_ptr->ep_context[i].
+						 ia_port, &cr_handle,
+						 "Server")) {
+					goto test_failure;
+				}
+
+				ret = dat_cr_query(cr_handle,
+						   DAT_CR_FIELD_ALL, &cr_param);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_cr_query #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+				} else {
+					if (strncmp
+					    ((char *)cr_param.private_data,
+					     private_data_str,
+					     strlen(private_data_str)) != 0) {
+						DT_Tdep_PT_Printf(phead,
+								  "--Private Data mismatch!\n");
+					} else {
+						DT_Tdep_PT_Debug(1,
+								 (phead,
+								  "--Private Data: %d: <%s>\n",
+								  cr_param.
+								  private_data_size,
+								  (char *)
+								  cr_param.
+								  private_data));
+					}
+				}
+
+				/* what, me query?  just try to accept the connection */
+				ret = dat_cr_accept(cr_handle,
+						    test_ptr->ep_context[i].
+						    ep_handle, 0,
+						    (DAT_PVOID) 0
+						    /* no private data */ );
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_cr_accept #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					/* cr_handle consumed on failure */
+					(void)dat_psp_free(test_ptr->
+							   ep_context[i].
+							   psp_handle);
+					goto test_failure;
+				}
+
+				/* wait for DAT_CONNECTION_EVENT_ESTABLISHED */
+				if (!DT_conn_event_wait(phead,
+							test_ptr->ep_context[i].
+							ep_handle,
+							test_ptr->ep_context[i].
+							conn_evd_hdl,
+							&event_num)) {
+					/* error message printed by DT_cr_event_wait */
+					(void)dat_psp_free(&test_ptr->
+							   ep_context[i].
+							   psp_handle);
+					goto test_failure;
+				}
+
+				/* throw away single-use PSP */
+				ret =
+				    dat_psp_free(test_ptr->ep_context[i].
+						 psp_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_psp_free #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					goto test_failure;
+				}
+			}	/* end short-lived PSP */
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "Server[" F64x
+					  "]: Accept #%d on port 0x" F64x "\n",
+					  test_ptr->base_port, i,
+					  test_ptr->ep_context[i].ia_port));
+		} else {
+			/*
+			 * Client - connect
+			 */
+			unsigned int retry_cnt = 0;
+			DAT_UINT32 buff_size =
+			    MAX_OPS * sizeof(RemoteMemoryInfo);
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "Client[" F64x
+					  "]: Connect #%d on port 0x" F64x "\n",
+					  test_ptr->base_port, i,
+					  test_ptr->ep_context[i].ia_port));
+
+#ifdef CM_BUSTED
+	    /*****  XXX Chill out a bit to give the kludged CM a chance ...
+	     *****/ DT_Mdep_Sleep(5000);
+#endif
+
+		      retry:
+			ret = dat_ep_connect(test_ptr->ep_context[i].ep_handle,
+					     test_ptr->remote_ia_addr,
+					     test_ptr->ep_context[i].ia_port,
+					     DAT_TIMEOUT_INFINITE,
+					     strlen(private_data_str),
+					     private_data_str,
+					     pt_ptr->Params.ReliabilityLevel,
+					     DAT_CONNECT_DEFAULT_FLAG);
+			if (ret != DAT_SUCCESS) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test[" F64x
+						  "]: dat_ep_connect #%d error: %s (0x%x)\n",
+						  test_ptr->base_port, i,
+						  DT_RetToString(ret), ret);
+				goto test_failure;
+			}
+
+			/* wait for DAT_CONNECTION_EVENT_ESTABLISHED */
+			if (!DT_conn_event_wait(phead,
+						test_ptr->ep_context[i].
+						ep_handle,
+						test_ptr->ep_context[i].
+						conn_evd_hdl, &event_num)) {
+				/* error message printed by DT_cr_event_wait */
+				if (event_num ==
+				    DAT_CONNECTION_EVENT_PEER_REJECTED) {
+					DT_Mdep_Sleep(1000);
+					/*
+					 * See if any buffers were flushed as a result of
+					 * the REJECT; clean them up and repost if so
+					 */
+					{
+						DAT_EVENT event;
+						DAT_COUNT drained = 0;
+
+						dat_ep_reset(test_ptr->
+							     ep_context[i].
+							     ep_handle);
+						do {
+							ret =
+							    DT_Tdep_evd_dequeue
+							    (test_ptr->
+							     ep_context[i].
+							     recv_evd_hdl,
+							     &event);
+							drained++;
+						} while (DAT_GET_TYPE(ret) !=
+							 DAT_QUEUE_EMPTY);
+
+						if (drained > 1) {
+							/*
+							 * Post recv and sync buffers
+							 */
+							if (!DT_post_recv_buffer
+							    (phead,
+							     test_ptr->
+							     ep_context[i].
+							     ep_handle,
+							     test_ptr->
+							     ep_context[i].bp,
+							     RMI_RECV_BUFFER_ID,
+							     buff_size)) {
+								/* error message printed by DT_post_recv_buffer */
+								goto test_failure;
+							}
+							if (!DT_post_recv_buffer
+							    (phead,
+							     test_ptr->
+							     ep_context[i].
+							     ep_handle,
+							     test_ptr->
+							     ep_context[i].bp,
+							     SYNC_RECV_BUFFER_ID,
+							     SYNC_BUFF_SIZE)) {
+								/* error message printed by DT_post_recv_buffer */
+								goto test_failure;
+							}
+						}
+					}
+					DT_Tdep_PT_Printf(phead,
+							  "Client[" F64x
+							  "]: retrying connection...\n",
+							  test_ptr->base_port);
+					retry_cnt++;
+					if (retry_cnt < MAX_CONN_RETRY) {
+						goto retry;
+					}
+				}
+				/* error message printed by DT_cr_event_wait */
+				goto test_failure;
+			}
+
+			DT_Tdep_PT_Debug(1,
+					 (phead,
+					  "Client[" F64x
+					  "]: Got Connection #%d\n",
+					  test_ptr->base_port, i));
+		}
+
+#ifdef CM_BUSTED
+	/*****  XXX Chill out a bit to give the kludged CM a chance ...
+	 *****/ DT_Mdep_Sleep(5000);
+#endif
+
+		/*
+		 * Fill in the test_ptr with relevant command info
+		 */
+		for (j = 0; j < test_ptr->cmd->num_ops; j++) {
+			test_ptr->ep_context[i].op[j].server_initiated
+			    = test_ptr->cmd->op[j].server_initiated;
+			test_ptr->ep_context[i].op[j].transfer_type
+			    = test_ptr->cmd->op[j].transfer_type;
+			test_ptr->ep_context[i].op[j].num_segs
+			    = test_ptr->cmd->op[j].num_segs;
+			test_ptr->ep_context[i].op[j].seg_size
+			    = test_ptr->cmd->op[j].seg_size;
+			test_ptr->ep_context[i].op[j].reap_send_on_recv
+			    = test_ptr->cmd->op[j].reap_send_on_recv;
+		}
+
+		/*
+		 * Exchange remote memory info:  If we're going to participate
+		 * in an RDMA, we need to allocate memory buffers and advertise
+		 * them to the other side.
+		 */
+		for (j = 0; j < test_ptr->cmd->num_ops; j++) {
+			DAT_BOOLEAN us;
+
+			us = (pt_ptr->local_is_server &&
+			      test_ptr->ep_context[i].op[j].server_initiated) ||
+			    (!pt_ptr->local_is_server &&
+			     !test_ptr->ep_context[i].op[j].server_initiated);
+
+			test_ptr->ep_context[i].op[j].Rdma_Context =
+			    (DAT_RMR_CONTEXT) 0;
+			test_ptr->ep_context[i].op[j].Rdma_Address = 0;
+
+			switch (test_ptr->ep_context[i].op[j].transfer_type) {
+			case RDMA_READ:
+				{
+					test_ptr->ep_context[i].op[j].bp =
+					    DT_BpoolAlloc(pt_ptr,
+							  phead,
+							  test_ptr->ia_handle,
+							  test_ptr->pz_handle,
+							  test_ptr->
+							  ep_context[i].
+							  ep_handle,
+							  test_ptr->
+							  ep_context[i].
+							  reqt_evd_hdl,
+							  test_ptr->
+							  ep_context[i].op[j].
+							  seg_size,
+							  test_ptr->
+							  ep_context[i].op[j].
+							  num_segs,
+							  DAT_OPTIMAL_ALIGNMENT,
+							  false,
+							  !us ? true : false);
+					if (!test_ptr->ep_context[i].op[j].bp) {
+						DT_Tdep_PT_Printf(phead,
+								  "Test[" F64x
+								  "]: no memory for buffers (RDMA/RD)\n",
+								  test_ptr->
+								  base_port);
+						goto test_failure;
+					}
+					if (!us) {
+						test_ptr->ep_context[i].op[j].
+						    Rdma_Context =
+						    DT_Bpool_GetRMR(test_ptr->
+								    ep_context
+								    [i].op[j].
+								    bp, 0);
+						test_ptr->ep_context[i].op[j].
+						    Rdma_Address =
+						    (DAT_VADDR) (uintptr_t)
+						    DT_Bpool_GetBuffer
+						    (test_ptr->ep_context[i].
+						     op[j].bp, 0);
+						DT_Tdep_PT_Debug(3,
+								 (phead,
+								  "not-us: RDMA/RD [ va="
+								  F64x
+								  ", ctxt=%x ]\n",
+								  test_ptr->
+								  ep_context[i].
+								  op[j].
+								  Rdma_Address,
+								  test_ptr->
+								  ep_context[i].
+								  op[j].
+								  Rdma_Context));
+					}
+					break;
+				}
+
+			case RDMA_WRITE:
+				{
+					test_ptr->ep_context[i].op[j].bp =
+					    DT_BpoolAlloc(pt_ptr,
+							  phead,
+							  test_ptr->ia_handle,
+							  test_ptr->pz_handle,
+							  test_ptr->
+							  ep_context[i].
+							  ep_handle,
+							  test_ptr->
+							  ep_context[i].
+							  reqt_evd_hdl,
+							  test_ptr->
+							  ep_context[i].op[j].
+							  seg_size,
+							  test_ptr->
+							  ep_context[i].op[j].
+							  num_segs,
+							  DAT_OPTIMAL_ALIGNMENT,
+							  !us ? true : false,
+							  false);
+					if (!test_ptr->ep_context[i].op[j].bp) {
+						DT_Tdep_PT_Printf(phead,
+								  "Test[" F64x
+								  "]: no memory for buffers (RDMA/WR)\n",
+								  test_ptr->
+								  base_port);
+						goto test_failure;
+					}
+					if (!us) {
+						test_ptr->ep_context[i].op[j].
+						    Rdma_Context =
+						    DT_Bpool_GetRMR(test_ptr->
+								    ep_context
+								    [i].op[j].
+								    bp, 0);
+						test_ptr->ep_context[i].op[j].
+						    Rdma_Address =
+						    (DAT_VADDR) (uintptr_t)
+						    DT_Bpool_GetBuffer
+						    (test_ptr->ep_context[i].
+						     op[j].bp, 0);
+						DT_Tdep_PT_Debug(3,
+								 (phead,
+								  "not-us: RDMA/WR [ va="
+								  F64x
+								  ", ctxt=%x ]\n",
+								  test_ptr->
+								  ep_context[i].
+								  op[j].
+								  Rdma_Address,
+								  test_ptr->
+								  ep_context[i].
+								  op[j].
+								  Rdma_Context));
+					}
+					break;
+				}
+
+			case SEND_RECV:
+				{
+					test_ptr->ep_context[i].op[j].bp = DT_BpoolAlloc(pt_ptr, phead, test_ptr->ia_handle, test_ptr->pz_handle, test_ptr->ep_context[i].ep_handle, DAT_HANDLE_NULL,	/* rmr */
+											 test_ptr->
+											 ep_context
+											 [i].
+											 op
+											 [j].
+											 seg_size,
+											 test_ptr->
+											 ep_context
+											 [i].
+											 op
+											 [j].
+											 num_segs,
+											 DAT_OPTIMAL_ALIGNMENT,
+											 false,
+											 false);
+					if (!test_ptr->ep_context[i].op[j].bp) {
+						DT_Tdep_PT_Printf(phead,
+								  "Test[" F64x
+								  "]: no memory for buffers (S/R)\n",
+								  test_ptr->
+								  base_port);
+						goto test_failure;
+					}
+
+					DT_Tdep_PT_Debug(3, (phead,
+							     "%d: S/R [ va=%p ]\n",
+							     j, (DAT_PVOID)
+							     DT_Bpool_GetBuffer
+							     (test_ptr->
+							      ep_context[i].
+							      op[j].bp, 0)));
+					break;
+				}
+			}
+		}		/* end foreach op */
+
+		/*
+		 * Prep send buffer with memory information
+		 */
+		RemoteMemInfo = (RemoteMemoryInfo *)
+		    DT_Bpool_GetBuffer(test_ptr->ep_context[i].bp,
+				       RMI_SEND_BUFFER_ID);
+
+		for (j = 0; j < test_ptr->cmd->num_ops; j++) {
+			RemoteMemInfo[j].rmr_context =
+			    test_ptr->ep_context[i].op[j].Rdma_Context;
+			RemoteMemInfo[j].mem_address.as_64 =
+			    test_ptr->ep_context[i].op[j].Rdma_Address;
+			if (RemoteMemInfo[j].mem_address.as_64) {
+				DT_Tdep_PT_Debug(3, (phead,
+						     "RemoteMemInfo[%d] va="
+						     F64x ", ctx=%x\n", j,
+						     RemoteMemInfo[j].
+						     mem_address.as_64,
+						     RemoteMemInfo[j].
+						     rmr_context));
+			}
+			/*
+			 * If the client and server are of different endiannesses,
+			 * we must correct the endianness of the handle and address
+			 * we pass to the other side.  The other side cannot (and
+			 * better not) interpret these values.
+			 */
+			if (DT_local_is_little_endian !=
+			    test_ptr->remote_is_little_endian) {
+				RemoteMemInfo[j].rmr_context =
+				    DT_EndianMemHandle(RemoteMemInfo[j].
+						       rmr_context);
+				RemoteMemInfo[j].mem_address.as_64 =
+				    DT_EndianMemAddress(RemoteMemInfo[j].
+							mem_address.as_64);
+			}
+		}		/* end foreach op */
+
+		/*
+		 * Send our memory info. The client performs the first send to comply
+		 * with the iWARP MPA protocol's "Connection Startup Rules".
+		 */
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Test[" F64x "]: Sending %s Memory Info\n",
+				  test_ptr->base_port,
+				  test_ptr->is_server ? "Server" : "Client"));
+
+		if (!test_ptr->is_server) {
+
+			/* post the send buffer */
+			if (!DT_post_send_buffer(phead,
+						 test_ptr->ep_context[i].
+						 ep_handle,
+						 test_ptr->ep_context[i].bp,
+						 RMI_SEND_BUFFER_ID,
+						 buff_size)) {
+				/* error message printed by DT_post_send_buffer */
+				goto test_failure;
+			}
+			/* reap the send and verify it */
+			dto_cookie.as_64 = LZERO;
+			dto_cookie.as_ptr =
+			    (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->
+							   ep_context[i].bp,
+							   RMI_SEND_BUFFER_ID);
+			if (!DT_dto_event_wait
+			    (phead, test_ptr->ep_context[i].reqt_evd_hdl,
+			     &dto_stat)
+			    || !DT_dto_check(phead, &dto_stat,
+					     test_ptr->ep_context[i].ep_handle,
+					     buff_size, dto_cookie,
+					     test_ptr->
+					     is_server ? "Client_Mem_Info_Send"
+					     : "Server_Mem_Info_Send")) {
+				goto test_failure;
+			}
+		}
+
+		/*
+		 * Recv the other side's info
+		 */
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Test[" F64x
+				  "]: Waiting for %s Memory Info\n",
+				  test_ptr->base_port,
+				  test_ptr->is_server ? "Client" : "Server"));
+		dto_cookie.as_64 = LZERO;
+		dto_cookie.as_ptr =
+		    (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->ep_context[i].bp,
+						   RMI_RECV_BUFFER_ID);
+		if (!DT_dto_event_wait
+		    (phead, test_ptr->ep_context[i].recv_evd_hdl, &dto_stat)
+		    || !DT_dto_check(phead, &dto_stat,
+				     test_ptr->ep_context[i].ep_handle,
+				     buff_size, dto_cookie,
+				     test_ptr->
+				     is_server ? "Client_Mem_Info_Recv" :
+				     "Server_Mem_Info_Recv")) {
+			goto test_failure;
+		}
+
+		if (test_ptr->is_server) {
+			/* post the send buffer */
+			if (!DT_post_send_buffer(phead,
+						 test_ptr->ep_context[i].
+						 ep_handle,
+						 test_ptr->ep_context[i].bp,
+						 RMI_SEND_BUFFER_ID,
+						 buff_size)) {
+				/* error message printed by DT_post_send_buffer */
+				goto test_failure;
+			}
+			/* reap the send and verify it */
+			dto_cookie.as_64 = LZERO;
+			dto_cookie.as_ptr =
+			    (DAT_PVOID) DT_Bpool_GetBuffer(test_ptr->
+							   ep_context[i].bp,
+							   RMI_SEND_BUFFER_ID);
+			if (!DT_dto_event_wait
+			    (phead, test_ptr->ep_context[i].reqt_evd_hdl,
+			     &dto_stat)
+			    || !DT_dto_check(phead, &dto_stat,
+					     test_ptr->ep_context[i].ep_handle,
+					     buff_size, dto_cookie,
+					     test_ptr->
+					     is_server ? "Client_Mem_Info_Send"
+					     : "Server_Mem_Info_Send")) {
+				goto test_failure;
+			}
+		}
+
+		/*
+		 * Extract what we need
+		 */
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Test[" F64x "]: Memory Info received \n",
+				  test_ptr->base_port));
+		RemoteMemInfo = (RemoteMemoryInfo *)
+		    DT_Bpool_GetBuffer(test_ptr->ep_context[i].bp,
+				       RMI_RECV_BUFFER_ID);
+		for (j = 0; j < test_ptr->cmd->num_ops; j++) {
+			DAT_BOOLEAN us;
+
+			us = (pt_ptr->local_is_server &&
+			      test_ptr->ep_context[i].op[j].server_initiated) ||
+			    (!pt_ptr->local_is_server &&
+			     !test_ptr->ep_context[i].op[j].server_initiated);
+			if (us &&
+			    (test_ptr->ep_context[i].op[j].transfer_type ==
+			     RDMA_READ
+			     || test_ptr->ep_context[i].op[j].transfer_type ==
+			     RDMA_WRITE)) {
+				test_ptr->ep_context[i].op[j].Rdma_Context =
+				    RemoteMemInfo[j].rmr_context;
+				test_ptr->ep_context[i].op[j].Rdma_Address =
+				    RemoteMemInfo[j].mem_address.as_64;
+				DT_Tdep_PT_Debug(3,
+						 (phead,
+						  "Got RemoteMemInfo [ va=" F64x
+						  ", ctx=%x ]\n",
+						  test_ptr->ep_context[i].op[j].
+						  Rdma_Address,
+						  test_ptr->ep_context[i].op[j].
+						  Rdma_Context));
+			}
+		}
+	}			/* end foreach EP context */
+
+	/*
+	 * Dump out the state of the world if we're debugging
+	 */
+	if (test_ptr->cmd->debug) {
+		DT_Print_Transaction_Test(phead, test_ptr);
+	}
+
+	/*
+	 * Finally!  Run the test.
+	 */
+	success = DT_Transaction_Run(phead, test_ptr);
+
+	/*
+	 * Now clean up and go home
+	 */
+      test_failure:
+	if (test_ptr->ep_context) {
+
+		/* Foreach EP */
+		for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+			DAT_EP_HANDLE ep_handle;
+
+			ep_handle = DAT_HANDLE_NULL;
+
+			/* Free the per-op buffers */
+			for (j = 0; j < test_ptr->cmd->num_ops; j++) {
+				if (test_ptr->ep_context[i].op[j].bp) {
+					if (!DT_Bpool_Destroy(pt_ptr,
+							      phead,
+							      test_ptr->
+							      ep_context[i].
+							      op[j].bp)) {
+						DT_Tdep_PT_Printf(phead,
+								  "test[" F64x
+								  "]: Warning: Bpool destroy fails\n",
+								  test_ptr->
+								  base_port);
+						/* carry on trying, regardless */
+					}
+				}
+			}
+
+			/* Free the remote memory info exchange buffers */
+			if (test_ptr->ep_context[i].bp) {
+				if (!DT_Bpool_Destroy(pt_ptr,
+						      phead,
+						      test_ptr->ep_context[i].
+						      bp)) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: Warning: Bpool destroy fails\n",
+							  test_ptr->base_port);
+					/* carry on trying, regardless */
+				}
+			}
+
+			/*
+			 * Disconnect -- we may have left recv buffers posted, if we
+			 *               bailed out mid-setup, or ran to completion
+			 *               normally, so we use abrupt closure.
+			 */
+			if (test_ptr->ep_context[i].ep_handle) {
+				ret =
+				    dat_ep_disconnect(test_ptr->ep_context[i].
+						      ep_handle,
+						      DAT_CLOSE_ABRUPT_FLAG);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: Warning: dat_ep_disconnect (%s) "
+							  "#%d error %s\n",
+							  test_ptr->base_port,
+							  success ? "graceful" :
+							  "abrupt", i,
+							  DT_RetToString(ret));
+					/* carry on trying, regardless */
+				}
+			}
+
+			/*
+			 * Wait on each of the outstanding EP handles. Some of them
+			 * may be disconnected by the remote side, we are racing
+			 * here.
+			 */
+
+			if (success) {	/* Ensure DT_Transaction_Run did not return error otherwise may get stuck waiting for disconnect event */
+				if (!DT_disco_event_wait(phead,
+							 test_ptr->
+							 ep_context[i].
+							 conn_evd_hdl,
+							 &ep_handle)) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: bad disconnect event\n",
+							  test_ptr->base_port);
+				}
+			}
+			ep_handle = test_ptr->ep_context[i].ep_handle;
+
+			/*
+			 * Free the handle returned by the disconnect event.
+			 * With multiple EPs, it may not be the EP we just
+			 * disconnected as we are racing with the remote side
+			 * disconnects.
+			 */
+			if (DAT_HANDLE_NULL != ep_handle) {
+				DAT_EVENT event;
+				/*
+				 * Drain off outstanding DTOs that may have been
+				 * generated by racing disconnects
+				 */
+				do {
+					ret =
+					    DT_Tdep_evd_dequeue(test_ptr->
+								ep_context[i].
+								recv_evd_hdl,
+								&event);
+				} while (ret == DAT_SUCCESS);
+				/* Destroy the EP */
+				ret = dat_ep_free(ep_handle);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_ep_free #%d error: %s\n",
+							  test_ptr->base_port,
+							  i,
+							  DT_RetToString(ret));
+					/* carry on trying, regardless */
+				}
+			}
+			/* clean up the EVDs */
+			if (test_ptr->ep_context[i].conn_evd_hdl) {
+				ret =
+				    DT_Tdep_evd_free(test_ptr->ep_context[i].
+						     conn_evd_hdl);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_evd_free (conn) error: %s\n",
+							  test_ptr->base_port,
+							  DT_RetToString(ret));
+				}
+			}
+			if (pt_ptr->local_is_server) {
+				if (test_ptr->ep_context[i].creq_evd_hdl) {
+					ret =
+					    DT_Tdep_evd_free(test_ptr->
+							     ep_context[i].
+							     creq_evd_hdl);
+					if (ret != DAT_SUCCESS) {
+						DT_Tdep_PT_Printf(phead,
+								  "Test[" F64x
+								  "]: dat_evd_free (creq) error: %s\n",
+								  test_ptr->
+								  base_port,
+								  DT_RetToString
+								  (ret));
+					}
+				}
+			}
+			if (test_ptr->ep_context[i].reqt_evd_hdl) {
+				ret =
+				    DT_Tdep_evd_free(test_ptr->ep_context[i].
+						     reqt_evd_hdl);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_evd_free (reqt) error: %s\n",
+							  test_ptr->base_port,
+							  DT_RetToString(ret));
+				}
+			}
+			if (test_ptr->ep_context[i].recv_evd_hdl) {
+				ret =
+				    DT_Tdep_evd_free(test_ptr->ep_context[i].
+						     recv_evd_hdl);
+				if (ret != DAT_SUCCESS) {
+					DT_Tdep_PT_Printf(phead,
+							  "Test[" F64x
+							  "]: dat_evd_free (recv) error: %s\n",
+							  test_ptr->base_port,
+							  DT_RetToString(ret));
+				}
+			}
+		}		/* end foreach per-EP context */
+
+		DT_MemListFree(pt_ptr, test_ptr->ep_context);
+	}
+
+	/* clean up the PZ */
+	if (test_ptr->pz_handle) {
+		ret = dat_pz_free(test_ptr->pz_handle);
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test[" F64x
+					  "]: dat_pz_free error: %s\n",
+					  test_ptr->base_port,
+					  DT_RetToString(ret));
+			/* fall through, keep trying */
+		}
+	}
+
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: cleanup is done\n",
+			  test_ptr->base_port));
+	DT_MemListFree(pt_ptr, test_ptr);
+	DT_Thread_Destroy(thread, pt_ptr);
+	DT_Mdep_Thread_Detach(DT_Mdep_Thread_SELF());	/* AMM */
+	DT_Mdep_Thread_EXIT(NULL);	/* AMM */
+}
+
+/* -----------------------------------------------------------------------
+ * The actual performance test
+ */
+bool
+DT_Transaction_Run(DT_Tdep_Print_Head * phead, Transaction_Test_t * test_ptr)
+{
+	unsigned int op;
+	unsigned int iteration;
+	int bytes;
+	bool ours;
+	bool success = false;
+	bool repost_recv;
+	unsigned int i;
+
+	/* pre-post all receive buffers */
+	for (op = 0; op < test_ptr->cmd->num_ops; op++) {
+		/* if it is a SEND/RECV, we must post receive buffers */
+		if (test_ptr->ep_context[0].op[op].transfer_type == SEND_RECV) {
+			ours = (test_ptr->is_server ==
+				test_ptr->ep_context[0].op[op].
+				server_initiated);
+			if (!ours) {
+				if (!DT_handle_post_recv_buf(phead,
+							     test_ptr->
+							     ep_context,
+							     test_ptr->cmd->
+							     eps_per_thread,
+							     op)) {
+					goto bail;
+				}
+			}
+		}
+	}
+
+	/* initialize data if we are validating it */
+	if (test_ptr->cmd->validate) {
+		DT_Transaction_Validation_Fill(phead, test_ptr, 0);
+	}
+
+	/*
+	 * Now that we've posted our receive buffers...
+	 * synchronize with the other side.
+	 */
+	DT_Tdep_PT_Debug(1,
+			 (phead,
+			  "Test[" F64x "]: Synchronize with the other side\n",
+			  test_ptr->base_port));
+
+	/*
+	 * Each server thread sends a sync message to the corresponding
+	 * client thread.  All clients wait until all server threads
+	 * have sent their sync messages. Then all clients send
+	 * sync message.
+	 *
+	 * Since all of the events are directed to the same EVD,
+	 * we do not use DT_dto_check(.) to verify the attributes
+	 * of the sync message event. DT_dto_check(.) requires the
+	 * comsumer to pass the expected EP, but we do not know
+	 * what to expect. DAPL does not guarantee the order of
+	 * completions across EPs. Therfore we only know that
+	 * test_ptr->cmd->eps_per_thread number of completion events
+	 * will be generated but not the order in which they will
+	 * complete.
+	 */
+
+	if (test_ptr->is_server) {
+		/*
+		 * Server
+		 */
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Test[" F64x "]: Send Sync to Client\n",
+				  test_ptr->base_port));
+		for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+			if (!DT_post_send_buffer(phead,
+						 test_ptr->ep_context[i].
+						 ep_handle,
+						 test_ptr->ep_context[i].bp,
+						 SYNC_SEND_BUFFER_ID,
+						 SYNC_BUFF_SIZE)) {
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Test[" F64x
+						  "]: Server sync send error\n",
+						  test_ptr->base_port));
+				goto bail;
+			}
+		}
+		for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+			DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+
+			if (!DT_dto_event_wait(phead,
+					       test_ptr->ep_context[i].
+					       reqt_evd_hdl, &dto_stat)) {
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Test[" F64x
+						  "]: Server sync send error\n",
+						  test_ptr->base_port));
+
+				goto bail;
+			}
+		}
+
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Test[" F64x "]: Wait for Sync Message\n",
+				  test_ptr->base_port));
+		for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+			DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+
+			if (!DT_dto_event_wait(phead,
+					       test_ptr->ep_context[i].
+					       recv_evd_hdl, &dto_stat)) {
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Test[" F64x
+						  "]: Server sync recv error\n",
+						  test_ptr->base_port));
+				goto bail;
+			}
+		}
+	} else {
+		/*
+		 * Client
+		 */
+		DT_Tdep_PT_Debug(1,
+				 (phead,
+				  "Test[" F64x "]: Wait for Sync Message\n",
+				  test_ptr->base_port));
+		for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+			DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+
+			if (!DT_dto_event_wait(phead,
+					       test_ptr->ep_context[i].
+					       recv_evd_hdl, &dto_stat)) {
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Test[" F64x
+						  "]: Client sync recv error\n",
+						  test_ptr->base_port));
+				goto bail;
+			}
+			DT_transaction_stats_set_ready(phead,
+						       &test_ptr->pt_ptr->
+						       Client_Stats);
+		}
+
+		/* check if it is time for client to send sync */
+		if (!DT_transaction_stats_wait_for_all(phead,
+						       &test_ptr->pt_ptr->
+						       Client_Stats)) {
+			goto bail;
+		}
+
+		DT_Tdep_PT_Debug(1,
+				 (phead, "Test[" F64x "]: Send Sync Msg\n",
+				  test_ptr->base_port));
+		for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+			if (!DT_post_send_buffer(phead,
+						 test_ptr->ep_context[i].
+						 ep_handle,
+						 test_ptr->ep_context[i].bp,
+						 SYNC_SEND_BUFFER_ID,
+						 SYNC_BUFF_SIZE)) {
+				DT_Tdep_PT_Debug(1,
+						 (phead,
+						  "Test[" F64x
+						  "]: Client sync send error\n",
+						  test_ptr->base_port));
+				goto bail;
+			}
+		}
+		for (i = 0; i < test_ptr->cmd->eps_per_thread; i++) {
+			DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+
+			if (!DT_dto_event_wait(phead,
+					       test_ptr->ep_context[i].
+					       reqt_evd_hdl, &dto_stat)) {
+				goto bail;
+			}
+		}
+	}
+
+	/*
+	 * Get to work ...
+	 */
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: Begin...\n",
+			  test_ptr->base_port));
+	test_ptr->stats.start_time = DT_Mdep_GetTime();
+
+	for (iteration = 0;
+	     iteration < test_ptr->cmd->num_iterations; iteration++) {
+
+		DT_Tdep_PT_Debug(1, (phead, "iteration: %d\n", iteration));
+
+		/* repost unless this is the last iteration */
+		repost_recv = (iteration + 1 != test_ptr->cmd->num_iterations);
+
+		for (op = 0; op < test_ptr->cmd->num_ops; op++) {
+			ours = (test_ptr->is_server ==
+				test_ptr->ep_context[0].op[op].
+				server_initiated);
+			bytes =
+			    (test_ptr->ep_context[0].op[op].seg_size *
+			     test_ptr->ep_context[0].op[op].num_segs *
+			     test_ptr->cmd->eps_per_thread);
+
+			switch (test_ptr->ep_context[0].op[op].transfer_type) {
+			case RDMA_READ:
+				{
+					test_ptr->stats.stat_bytes_rdma_read +=
+					    bytes;
+					if (ours) {
+						DT_Tdep_PT_Debug(1,
+								 (phead,
+								  "Test[" F64x
+								  "]: RdmaRead [%d]\n",
+								  test_ptr->
+								  base_port,
+								  op));
+						if (!DT_handle_rdma_op
+						    (phead,
+						     test_ptr->ep_context,
+						     test_ptr->cmd->
+						     eps_per_thread, RDMA_READ,
+						     op, test_ptr->cmd->poll)) {
+							DT_Tdep_PT_Printf(phead,
+									  "Test["
+									  F64x
+									  "]: RdmaRead error[%d]\n",
+									  test_ptr->
+									  base_port,
+									  op);
+							goto bail;
+						}
+					}
+					break;
+				}
+
+			case RDMA_WRITE:
+				{
+					test_ptr->stats.stat_bytes_rdma_write +=
+					    bytes;
+					if (ours) {
+						DT_Tdep_PT_Debug(1,
+								 (phead,
+								  "Test[" F64x
+								  "]: RdmaWrite [%d]\n",
+								  test_ptr->
+								  base_port,
+								  op));
+						if (!DT_handle_rdma_op
+						    (phead,
+						     test_ptr->ep_context,
+						     test_ptr->cmd->
+						     eps_per_thread, RDMA_WRITE,
+						     op, test_ptr->cmd->poll)) {
+							DT_Tdep_PT_Printf(phead,
+									  "Test["
+									  F64x
+									  "]: RdmaWrite error[%d]\n",
+									  test_ptr->
+									  base_port,
+									  op);
+							goto bail;
+						}
+					}
+					break;
+				}
+
+			case SEND_RECV:
+				{
+					if (ours) {
+						test_ptr->stats.
+						    stat_bytes_send += bytes;
+						DT_Tdep_PT_Debug(1,
+								 (phead,
+								  "Test[" F64x
+								  "]: postsend [%d] \n",
+								  test_ptr->
+								  base_port,
+								  op));
+						/* send data */
+						if (!DT_handle_send_op(phead,
+								       test_ptr->
+								       ep_context,
+								       test_ptr->
+								       cmd->
+								       eps_per_thread,
+								       op,
+								       test_ptr->
+								       cmd->
+								       poll)) {
+							goto bail;
+						}
+					} else {
+						test_ptr->stats.
+						    stat_bytes_recv += bytes;
+						DT_Tdep_PT_Debug(1,
+								 (phead,
+								  "Test[" F64x
+								  "]: RecvWait and Re-Post [%d] \n",
+								  test_ptr->
+								  base_port,
+								  op));
+
+						if (!DT_handle_recv_op(phead,
+								       test_ptr->
+								       ep_context,
+								       test_ptr->
+								       cmd->
+								       eps_per_thread,
+								       op,
+								       test_ptr->
+								       cmd->
+								       poll,
+								       repost_recv))
+						{
+							goto bail;
+						}
+					}
+
+					/* now before going on, is it time to validate? */
+					if (test_ptr->cmd->validate) {
+						if (!test_ptr->pt_ptr->local_is_server) {	/* CLIENT */
+							/* the client validates on the third to last op */
+							if (op ==
+							    test_ptr->cmd->
+							    num_ops - 3) {
+								if (!DT_Transaction_Validation_Check(phead, test_ptr, iteration)) {
+									goto bail;
+								}
+								DT_Transaction_Validation_Fill
+								    (phead,
+								     test_ptr,
+								     iteration +
+								     1);
+							}
+						} else {	/* SERVER */
+
+							/* the server validates on the second to last op */
+							if (op ==
+							    test_ptr->cmd->
+							    num_ops - 2) {
+								if (!DT_Transaction_Validation_Check(phead, test_ptr, iteration)) {
+									goto bail;
+								}
+								DT_Transaction_Validation_Fill
+								    (phead,
+								     test_ptr,
+								     iteration +
+								     1);
+							}
+						}
+					}	/* end validate */
+					break;
+				}
+			}	/* end switch for transfer type */
+		}		/* end loop for each op */
+	}			/* end loop for iteration */
+
+	/* end time and print stats */
+	test_ptr->stats.end_time = DT_Mdep_GetTime();
+	if (!test_ptr->pt_ptr->local_is_server) {
+		DT_update_transaction_stats(&test_ptr->pt_ptr->Client_Stats,
+					    test_ptr->cmd->eps_per_thread *
+					    test_ptr->cmd->num_ops *
+					    test_ptr->cmd->num_iterations,
+					    test_ptr->stats.end_time -
+					    test_ptr->stats.start_time,
+					    test_ptr->stats.stat_bytes_send,
+					    test_ptr->stats.stat_bytes_recv,
+					    test_ptr->stats.
+					    stat_bytes_rdma_read,
+					    test_ptr->stats.
+					    stat_bytes_rdma_write);
+	}
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: End Successfully\n",
+			  test_ptr->base_port));
+	success = true;
+
+      bail:
+	return (success);
+}
+
+/*------------------------------------------------------------------------------ */
+void
+DT_Transaction_Validation_Fill(DT_Tdep_Print_Head * phead,
+			       Transaction_Test_t * test_ptr,
+			       unsigned int iteration)
+{
+	bool ours;
+	unsigned int op;
+	unsigned int i;
+	unsigned int j;
+	unsigned int ind;
+	unsigned char *buff;
+
+	if (iteration >= test_ptr->cmd->num_iterations) {
+		return;
+	}
+	DT_Tdep_PT_Debug(1,
+			 (phead, "Test[" F64x "]: FILL Buffers Iteration %d\n",
+			  test_ptr->base_port, iteration));
+
+	/*
+	 * fill all but the last three ops, which
+	 * were added to create barriers for data validation
+	 */
+	for (ind = 0; ind < test_ptr->cmd->eps_per_thread; ind++) {
+		for (op = 0; op < test_ptr->cmd->num_ops - 3; op++) {
+			ours = (test_ptr->is_server ==
+				test_ptr->ep_context[ind].op[op].
+				server_initiated);
+
+			switch (test_ptr->ep_context[ind].op[op].transfer_type)
+			{
+			case RDMA_READ:
+				{
+					if (!ours) {
+						for (i = 0;
+						     i <
+						     test_ptr->ep_context[ind].
+						     op[op].num_segs; i++) {
+
+							buff =
+							    DT_Bpool_GetBuffer
+							    (test_ptr->
+							     ep_context[ind].
+							     op[op].bp, i);
+							for (j = 0;
+							     j <
+							     test_ptr->
+							     ep_context[ind].
+							     op[op].seg_size;
+							     j++) {
+								/* Avoid using all zero bits the 1st time */
+								buff[j] =
+								    (iteration +
+								     1) & 0xFF;
+							}
+						}
+					}
+					break;
+				}
+
+			case RDMA_WRITE:
+				{
+					if (ours) {
+						for (i = 0;
+						     i <
+						     test_ptr->ep_context[ind].
+						     op[op].num_segs; i++) {
+
+							buff =
+							    DT_Bpool_GetBuffer
+							    (test_ptr->
+							     ep_context[ind].
+							     op[op].bp, i);
+							for (j = 0;
+							     j <
+							     test_ptr->
+							     ep_context[ind].
+							     op[op].seg_size;
+							     j++) {
+								/* Avoid using all zero bits the 1st time */
+								buff[j] =
+								    (iteration +
+								     1) & 0xFF;
+							}
+						}
+					}
+					break;
+				}
+
+			case SEND_RECV:
+				{
+					if (ours) {
+						for (i = 0;
+						     i <
+						     test_ptr->ep_context[ind].
+						     op[op].num_segs; i++) {
+
+							buff =
+							    DT_Bpool_GetBuffer
+							    (test_ptr->
+							     ep_context[ind].
+							     op[op].bp, i);
+			    /*****
+			       DT_Tdep_PT_Printf(phead, 
+			       "\tFill: wq=%d op=%d seg=%d ptr=[%p, %d]\n",
+			       ind, op, i, buff, j);
+			     *****/
+							for (j = 0;
+							     j <
+							     test_ptr->
+							     ep_context[ind].
+							     op[op].seg_size;
+							     j++) {
+								/* Avoid using all zero bits the 1st time */
+								buff[j] =
+								    (iteration +
+								     1) & 0xFF;
+							}
+						}
+					}
+					break;
+				}
+			}	/* end switch transfer_type */
+		}		/* end for each op */
+	}			/* end for each ep per thread */
+}
+
+/*------------------------------------------------------------------------------ */
+bool
+DT_Transaction_Validation_Check(DT_Tdep_Print_Head * phead,
+				Transaction_Test_t * test_ptr, int iteration)
+{
+	bool ours;
+	bool success = true;
+	unsigned int op;
+	unsigned int i;
+	unsigned int j;
+	unsigned int ind;
+	unsigned char *buff;
+	unsigned char expect;
+	unsigned char got;
+
+	DT_Tdep_PT_Debug(1,
+			 (phead,
+			  "Test[" F64x "]: VALIDATE Buffers Iteration %d\n",
+			  test_ptr->base_port, iteration));
+
+	/*
+	 * fill all but the last three ops, which
+	 * were added to create barriers for data validation
+	 */
+	for (ind = 0; ind < test_ptr->cmd->eps_per_thread; ind++) {
+		for (op = 0; op < test_ptr->cmd->num_ops - 3; op++) {
+			ours = (test_ptr->is_server ==
+				test_ptr->ep_context[ind].op[op].
+				server_initiated);
+
+			switch (test_ptr->ep_context[ind].op[op].transfer_type) {
+			case RDMA_READ:
+				{
+					if (ours) {
+						for (i = 0;
+						     i <
+						     test_ptr->ep_context[ind].
+						     op[op].num_segs; i++) {
+
+							buff =
+							    DT_Bpool_GetBuffer
+							    (test_ptr->
+							     ep_context[ind].
+							     op[op].bp, i);
+
+							for (j = 0;
+							     j <
+							     test_ptr->
+							     ep_context[ind].
+							     op[op].seg_size;
+							     j++) {
+
+								expect =
+								    (iteration +
+								     1) & 0xFF;
+								got = buff[j];
+								if (expect !=
+								    got) {
+									DT_Tdep_PT_Printf
+									    (phead,
+									     "Test["
+									     F64x
+									     "]: Validation Error :: %d\n",
+									     test_ptr->
+									     base_port,
+									     op);
+									DT_Tdep_PT_Printf
+									    (phead,
+									     "Test["
+									     F64x
+									     "]: Expected %x Got %x\n",
+									     test_ptr->
+									     base_port,
+									     expect,
+									     got);
+									DT_Tdep_PT_Debug
+									    (3,
+									     (phead,
+									      "\twq=%d op=%d seg=%d byte=%d ptr=%p\n",
+									      ind,
+									      op,
+									      i,
+									      j,
+									      buff));
+									success
+									    =
+									    false;
+									break;
+								}
+							}
+						}
+					}
+					break;
+				}
+
+			case RDMA_WRITE:
+				{
+					if (!ours) {
+						for (i = 0;
+						     i <
+						     test_ptr->ep_context[ind].
+						     op[op].num_segs; i++) {
+
+							buff =
+							    DT_Bpool_GetBuffer
+							    (test_ptr->
+							     ep_context[ind].
+							     op[op].bp, i);
+							for (j = 0;
+							     j <
+							     test_ptr->
+							     ep_context[ind].
+							     op[op].seg_size;
+							     j++) {
+
+								expect =
+								    (iteration +
+								     1) & 0xFF;
+								got = buff[j];
+								if (expect !=
+								    got) {
+									DT_Tdep_PT_Printf
+									    (phead,
+									     "Test["
+									     F64x
+									     "]: Validation Error :: %d\n",
+									     test_ptr->
+									     base_port,
+									     op);
+									DT_Tdep_PT_Printf
+									    (phead,
+									     "Test["
+									     F64x
+									     "]: Expected %x Got %x\n",
+									     test_ptr->
+									     base_port,
+									     expect,
+									     got);
+									DT_Tdep_PT_Debug
+									    (3,
+									     (phead,
+									      "\twq=%d op=%d seg=%d byte=%d ptr=%p\n",
+									      ind,
+									      op,
+									      i,
+									      j,
+									      buff));
+									success
+									    =
+									    false;
+									break;
+								}
+							}
+						}
+					}
+					break;
+				}
+
+			case SEND_RECV:
+				{
+					if (!ours) {
+						for (i = 0;
+						     i <
+						     test_ptr->ep_context[ind].
+						     op[op].num_segs; i++) {
+
+							buff =
+							    DT_Bpool_GetBuffer
+							    (test_ptr->
+							     ep_context[ind].
+							     op[op].bp, i);
+							DT_Tdep_PT_Debug(3,
+									 (phead,
+									  "\tCheck:wq=%d op=%d seg=%d ptr=[%p, %d]\n",
+									  ind,
+									  op, i,
+									  buff,
+									  test_ptr->
+									  ep_context
+									  [ind].
+									  op
+									  [op].
+									  seg_size));
+
+							for (j = 0;
+							     j <
+							     test_ptr->
+							     ep_context[ind].
+							     op[op].seg_size;
+							     j++) {
+
+								expect =
+								    (iteration +
+								     1) & 0xFF;
+								got = buff[j];
+								if (expect !=
+								    got) {
+									DT_Tdep_PT_Printf
+									    (phead,
+									     "Test["
+									     F64x
+									     "]: Validation Error :: %d\n",
+									     test_ptr->
+									     base_port,
+									     op);
+									DT_Tdep_PT_Printf
+									    (phead,
+									     "Test["
+									     F64x
+									     "]: Expected %x Got %x\n",
+									     test_ptr->
+									     base_port,
+									     expect,
+									     got);
+									DT_Tdep_PT_Debug
+									    (3,
+									     (phead,
+									      "\twq=%d op=%d seg=%d byte=%d ptr=%p\n",
+									      ind,
+									      op,
+									      i,
+									      j,
+									      buff));
+									success
+									    =
+									    false;
+									break;
+								}
+							}
+						}
+					}
+					break;
+				}
+			}	/* end switch transfer_type */
+		}		/* end for each op */
+	}			/* end for each ep per thread */
+
+	return (success);
+}
+
+/*------------------------------------------------------------------------------ */
+void
+DT_Print_Transaction_Test(DT_Tdep_Print_Head * phead,
+			  Transaction_Test_t * test_ptr)
+{
+	DT_Tdep_PT_Printf(phead, "-------------------------------------\n");
+	DT_Tdep_PT_Printf(phead, "TransTest.is_server              : %d\n",
+			  test_ptr->is_server);
+	DT_Tdep_PT_Printf(phead, "TransTest.remote_little_endian   : %d\n",
+			  test_ptr->remote_is_little_endian);
+	DT_Tdep_PT_Printf(phead,
+			  "TransTest.base_port              : " F64x "\n",
+			  test_ptr->base_port);
+	DT_Tdep_PT_Printf(phead, "TransTest.pz_handle              : %p\n",
+			  test_ptr->pz_handle);
+	/* statistics */
+	DT_Tdep_PT_Printf(phead, "TransTest.bytes_send             : %d\n",
+			  test_ptr->stats.stat_bytes_send);
+	DT_Tdep_PT_Printf(phead, "TransTest.bytes_recv             : %d\n",
+			  test_ptr->stats.stat_bytes_recv);
+	DT_Tdep_PT_Printf(phead, "TransTest.bytes_rdma_read        : %d\n",
+			  test_ptr->stats.stat_bytes_rdma_read);
+	DT_Tdep_PT_Printf(phead, "TransTest.bytes_rdma_write       : %d\n",
+			  test_ptr->stats.stat_bytes_rdma_write);
+}
+
+/*------------------------------------------------------------------------------ */
+void
+DT_Print_Transaction_Stats(DT_Tdep_Print_Head * phead,
+			   Transaction_Test_t * test_ptr)
+{
+	double time;
+	double mbytes_send;
+	double mbytes_recv;
+	double mbytes_rdma_read;
+	double mbytes_rdma_write;
+	int total_ops;
+	time =
+	    (double)(test_ptr->stats.end_time -
+		     test_ptr->stats.start_time) / 1000;
+	mbytes_send = (double)test_ptr->stats.stat_bytes_send / 1024 / 1024;
+	mbytes_recv = (double)test_ptr->stats.stat_bytes_recv / 1024 / 1024;
+	mbytes_rdma_read =
+	    (double)test_ptr->stats.stat_bytes_rdma_read / 1024 / 1024;
+	mbytes_rdma_write =
+	    (double)test_ptr->stats.stat_bytes_rdma_write / 1024 / 1024;
+	total_ops = test_ptr->cmd->num_ops * test_ptr->cmd->num_iterations;
+
+	DT_Tdep_PT_Printf(phead, "Test[: " F64x "] ---- Stats ----\n",
+			  test_ptr->base_port);
+	DT_Tdep_PT_Printf(phead, "Iterations : %u\n",
+			  test_ptr->cmd->num_iterations);
+	DT_Tdep_PT_Printf(phead, "Ops     : %7d.%02d Ops/Sec\n",
+			  whole(total_ops / time),
+			  hundredths(total_ops / time));
+	DT_Tdep_PT_Printf(phead, "Time       : %7d.%02d sec\n", whole(time),
+			  hundredths(time));
+	DT_Tdep_PT_Printf(phead, "Sent       : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_send), hundredths(mbytes_send),
+			  whole(mbytes_send / time),
+			  hundredths(mbytes_send / time));
+	DT_Tdep_PT_Printf(phead, "Recv       : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_recv), hundredths(mbytes_recv),
+			  whole(mbytes_recv / time),
+			  hundredths(mbytes_recv / time));
+	DT_Tdep_PT_Printf(phead, "RDMA Read  : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_rdma_read), hundredths(mbytes_rdma_read),
+			  whole(mbytes_rdma_read / time),
+			  hundredths(mbytes_rdma_read / time));
+	DT_Tdep_PT_Printf(phead, "RDMA Write : %7d.%02d MB - %7d.%02d MB/Sec\n",
+			  whole(mbytes_rdma_write),
+			  hundredths(mbytes_rdma_write),
+			  whole(mbytes_rdma_write / time),
+			  hundredths(mbytes_rdma_write / time));
+}
diff --git a/test/dapltest/test/dapl_transaction_util.c b/test/dapltest/test/dapl_transaction_util.c
new file mode 100644
index 0000000..ffe5d7d
--- /dev/null
+++ b/test/dapltest/test/dapl_transaction_util.c
@@ -0,0 +1,747 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/* -----------------------------------------------------------
+ * Post a recv buffer on each of this thread's EPs.
+ */
+bool
+DT_handle_post_recv_buf(DT_Tdep_Print_Head * phead,
+			Ep_Context_t * ep_context,
+			unsigned int num_eps, int op_indx)
+{
+	unsigned int i, j;
+
+	for (i = 0; i < num_eps; i++) {
+		Transaction_Test_Op_t *op = &ep_context[i].op[op_indx];
+		DAT_LMR_TRIPLET *iov = DT_Bpool_GetIOV(op->bp, 0);
+		DAT_DTO_COOKIE cookie;
+		DAT_RETURN ret;
+
+		/* Prep the inputs */
+		for (j = 0; j < op->num_segs; j++) {
+			iov[j].virtual_address = (DAT_VADDR) (uintptr_t)
+			    DT_Bpool_GetBuffer(op->bp, j);
+			iov[j].segment_length = op->seg_size;
+			iov[j].lmr_context = DT_Bpool_GetLMR(op->bp, j);
+		}
+		cookie.as_64 = ((((DAT_UINT64) i) << 32)
+				| (((uintptr_t) DT_Bpool_GetBuffer(op->bp, 0)) &
+				   0xffffffffUL));
+
+		/* Post the recv */
+		ret = dat_ep_post_recv(ep_context[i].ep_handle,
+				       op->num_segs,
+				       iov,
+				       cookie, DAT_COMPLETION_DEFAULT_FLAG);
+
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dat_ep_post_recv failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			return false;
+		}
+	}
+
+	return true;
+}
+
+/* -----------------------------------------------------------
+ * Post a send buffer on each of this thread's EPs.
+ */
+bool
+DT_handle_send_op(DT_Tdep_Print_Head * phead,
+		  Ep_Context_t * ep_context,
+		  unsigned int num_eps, int op_indx, bool poll)
+{
+	unsigned int i, j;
+	unsigned char *completion_reaped;
+
+	completion_reaped = DT_Mdep_Malloc(num_eps * sizeof(unsigned char));
+
+	if (!completion_reaped) {
+		return false;
+	}
+
+	for (i = 0; i < num_eps; i++) {
+		Transaction_Test_Op_t *op = &ep_context[i].op[op_indx];
+		DAT_LMR_TRIPLET *iov = DT_Bpool_GetIOV(op->bp, 0);
+		DAT_DTO_COOKIE cookie;
+		DAT_RETURN ret;
+
+		/* Prep the inputs */
+		for (j = 0; j < op->num_segs; j++) {
+			iov[j].virtual_address = (DAT_VADDR) (uintptr_t)
+			    DT_Bpool_GetBuffer(op->bp, j);
+			iov[j].segment_length = op->seg_size;
+			iov[j].lmr_context = DT_Bpool_GetLMR(op->bp, j);
+		}
+		cookie.as_64 = ((((DAT_UINT64) i) << 32)
+				| (((uintptr_t) DT_Bpool_GetBuffer(op->bp, 0)) &
+				   0xffffffffUL));
+
+		/* Post the send */
+		ret = dat_ep_post_send(ep_context[i].ep_handle,
+				       op->num_segs,
+				       iov,
+				       cookie, DAT_COMPLETION_DEFAULT_FLAG);
+
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dat_ep_post_send failed: %s\n",
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return false;
+		}
+	}
+
+	for (i = 0; i < num_eps; i++) {
+		Transaction_Test_Op_t *op = &ep_context[i].op[op_indx];
+
+		if (op->reap_send_on_recv && !op->server_initiated) {
+			/* we will reap the send on the recv (Client SR) */
+			DT_Mdep_Free(completion_reaped);
+			return true;
+		}
+	}
+
+	bzero((void *)completion_reaped, sizeof(unsigned char) * num_eps);
+
+	/* reap the send completion */
+	for (i = 0; i < num_eps; i++) {
+		Transaction_Test_Op_t *op;
+		DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+		DAT_DTO_COOKIE dto_cookie;
+		unsigned int epnum;
+
+		if (!DT_dto_event_reap
+		    (phead, ep_context[i].reqt_evd_hdl, poll, &dto_stat)) {
+			DT_Mdep_Free(completion_reaped);
+			return false;
+		}
+
+		epnum = dto_stat.user_cookie.as_64 >> 32;
+		if (epnum > num_eps) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: Send: Invalid endpoint completion reaped.\n"
+					  "\tEndpoint: 0x%p, Cookie: 0x" F64x
+					  ", Length: " F64u "\n",
+					  dto_stat.ep_handle,
+					  dto_stat.user_cookie.as_64,
+					  dto_stat.transfered_length);
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return false;
+		}
+
+		op = &ep_context[epnum].op[op_indx];
+
+		dto_cookie.as_64 = ((((DAT_UINT64) epnum) << 32)
+				    |
+				    (((uintptr_t) DT_Bpool_GetBuffer(op->bp, 0))
+				     & 0xffffffffUL));
+
+		if (!DT_dto_check(phead,
+				  &dto_stat,
+				  ep_context[epnum].ep_handle,
+				  op->num_segs * op->seg_size,
+				  dto_cookie, "Send")) {
+			DT_Mdep_Free(completion_reaped);
+			return false;
+		}
+
+		if (completion_reaped[epnum]) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: Send: Secondary completion seen for endpoint 0x%p (%d)\n",
+					  ep_context[epnum].ep_handle, epnum);
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return (false);
+		}
+		completion_reaped[epnum] = 1;
+	}
+
+	for (i = 0; i < num_eps; i++) {
+		if (completion_reaped[i] == 0) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: Send: No completion seen for endpoint 0x%p (#%d)\n",
+					  ep_context[i].ep_handle, i);
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return (false);
+		}
+	}
+
+	DT_Mdep_Free(completion_reaped);
+	return true;
+}
+
+/* -----------------------------------------------------------
+ * Reap a recv op on each of this thread's EPs,
+ * then if requested reap the corresponding send ops,
+ * and re-post all of the recv buffers.
+ */
+bool
+DT_handle_recv_op(DT_Tdep_Print_Head * phead,
+		  Ep_Context_t * ep_context,
+		  unsigned int num_eps,
+		  int op_indx, bool poll, bool repost_recv)
+{
+	unsigned int i;
+	unsigned char *recv_completion_reaped;
+	unsigned char *send_completion_reaped;
+
+	recv_completion_reaped = DT_Mdep_Malloc(num_eps);
+	if (recv_completion_reaped == NULL) {
+		return false;
+	}
+
+	send_completion_reaped = DT_Mdep_Malloc(num_eps);
+	if (send_completion_reaped == NULL) {
+		DT_Mdep_Free(recv_completion_reaped);
+		return false;
+	}
+
+	/* Foreach EP, reap */
+	bzero((void *)recv_completion_reaped, sizeof(unsigned char) * num_eps);
+	bzero((void *)send_completion_reaped, sizeof(unsigned char) * num_eps);
+	for (i = 0; i < num_eps; i++) {
+		Transaction_Test_Op_t *op;
+		DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+		DAT_DTO_COOKIE dto_cookie;
+		unsigned int epnum;
+
+		/* First reap the recv DTO event */
+		if (!DT_dto_event_reap
+		    (phead, ep_context[i].recv_evd_hdl, poll, &dto_stat)) {
+			DT_Mdep_Free(recv_completion_reaped);
+			DT_Mdep_Free(send_completion_reaped);
+			return false;
+		}
+
+		epnum = dto_stat.user_cookie.as_64 >> 32;
+		if (epnum > num_eps) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: Receive: Invalid endpoint completion reaped.\n"
+					  "\tEndpoint: 0x%p, Cookie: 0x" F64x
+					  ", Length: " F64u "\n",
+					  dto_stat.ep_handle,
+					  dto_stat.user_cookie.as_64,
+					  dto_stat.transfered_length);
+			DT_Test_Error();
+			DT_Mdep_Free(recv_completion_reaped);
+			DT_Mdep_Free(send_completion_reaped);
+			return false;
+		}
+
+		op = &ep_context[epnum].op[op_indx];
+		dto_cookie.as_64 = ((((DAT_UINT64) epnum) << 32)
+				    |
+				    (((uintptr_t) DT_Bpool_GetBuffer(op->bp, 0))
+				     & 0xffffffffUL));
+
+		if (!DT_dto_check(phead,
+				  &dto_stat,
+				  ep_context[epnum].ep_handle,
+				  op->num_segs * op->seg_size,
+				  dto_cookie, "Recv")) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: recv DTO problem\n");
+			DT_Test_Error();
+			DT_Mdep_Free(recv_completion_reaped);
+			DT_Mdep_Free(send_completion_reaped);
+			return false;
+		}
+
+		if (recv_completion_reaped[epnum]) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: Receive: Secondary completion seen for endpoint 0x%p (%d)\n",
+					  ep_context[epnum].ep_handle, epnum);
+			DT_Test_Error();
+			DT_Mdep_Free(recv_completion_reaped);
+			DT_Mdep_Free(send_completion_reaped);
+			return (false);
+		}
+		recv_completion_reaped[epnum] = 1;
+
+		/*
+		 * Check the current op to see whether we are supposed
+		 * to reap the previous send op now.
+		 */
+		if (op->reap_send_on_recv && op->server_initiated) {
+			if (op_indx <= 0)
+				/* shouldn't happen, but let's be certain */
+			{
+				DT_Tdep_PT_Printf(phead,
+						  "Internal Error: reap_send_on_recv"
+						  " but current op == #%d\n",
+						  op_indx);
+				DT_Mdep_Free(recv_completion_reaped);
+				DT_Mdep_Free(send_completion_reaped);
+				return false;
+			}
+
+			if (!DT_dto_event_reap
+			    (phead, ep_context[i].reqt_evd_hdl, poll,
+			     &dto_stat)) {
+				DT_Mdep_Free(recv_completion_reaped);
+				DT_Mdep_Free(send_completion_reaped);
+				return false;
+			}
+
+			epnum = dto_stat.user_cookie.as_64 >> 32;
+			if (epnum > num_eps) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test Error: Send (ror): Invalid endpoint completion reaped.\n"
+						  "\tEndpoint: 0x%p, Cookie: 0x"
+						  F64x ", Length: " F64u "\n",
+						  dto_stat.ep_handle,
+						  dto_stat.user_cookie.as_64,
+						  dto_stat.transfered_length);
+				DT_Test_Error();
+				DT_Mdep_Free(recv_completion_reaped);
+				DT_Mdep_Free(send_completion_reaped);
+				return false;
+			}
+
+			/*
+			 * We're reaping the last transaction, a
+			 * send completion that we skipped when it was sent.
+			 */
+			op = &ep_context[epnum].op[op_indx - 1];
+
+			dto_cookie.as_64 = ((((DAT_UINT64) epnum) << 32)
+					    |
+					    (((uintptr_t)
+					      DT_Bpool_GetBuffer(op->bp, 0))
+					     & 0xffffffffUL));
+
+			/*
+			 * If we have multiple EPs we can't guarantee the order of
+			 * completions, so disable ep_handle check
+			 */
+			if (!DT_dto_check(phead,
+					  &dto_stat,
+					  num_eps ==
+					  1 ? ep_context[i].ep_handle : NULL,
+					  op->num_segs * op->seg_size,
+					  dto_cookie, "Send-reaped-on-recv")) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test Error: send DTO problem\n");
+				DT_Test_Error();
+				DT_Mdep_Free(recv_completion_reaped);
+				DT_Mdep_Free(send_completion_reaped);
+				return false;
+			}
+
+			if (send_completion_reaped[epnum]) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test Error: Send (ror): Secondary completion seen for endpoint 0x%p (%d)\n",
+						  ep_context[epnum].ep_handle,
+						  epnum);
+				DT_Test_Error();
+				DT_Mdep_Free(recv_completion_reaped);
+				DT_Mdep_Free(send_completion_reaped);
+				return (false);
+			}
+			send_completion_reaped[epnum] = 1;
+		}
+	}
+
+	for (i = 0; i < num_eps; i++) {
+		if (recv_completion_reaped[i] == 0) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: Receive: No completion seen for endpoint 0x%p (#%d)\n",
+					  ep_context[i].ep_handle, i);
+			DT_Test_Error();
+			DT_Mdep_Free(recv_completion_reaped);
+			DT_Mdep_Free(send_completion_reaped);
+			return (false);
+		}
+	}
+
+	if (ep_context[0].op[op_indx].reap_send_on_recv
+	    && ep_context[0].op[op_indx].server_initiated) {
+		for (i = 0; i < num_eps; i++) {
+			if (send_completion_reaped[i] == 0) {
+				DT_Tdep_PT_Printf(phead,
+						  "Test Error: Send (ror): No completion seen for endpoint 0x%p (#%d)\n",
+						  ep_context[i].ep_handle, i);
+				DT_Test_Error();
+				DT_Mdep_Free(recv_completion_reaped);
+				DT_Mdep_Free(send_completion_reaped);
+				return (false);
+			}
+		}
+	}
+
+	if (repost_recv) {
+		/* repost the receive buffer */
+		if (!DT_handle_post_recv_buf
+		    (phead, ep_context, num_eps, op_indx)) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: recv re-post problem\n");
+			DT_Test_Error();
+			DT_Mdep_Free(recv_completion_reaped);
+			DT_Mdep_Free(send_completion_reaped);
+			return false;
+		}
+	}
+
+	DT_Mdep_Free(recv_completion_reaped);
+	DT_Mdep_Free(send_completion_reaped);
+	return true;
+}
+
+/* -----------------------------------------------------------
+ * Initiate an RDMA op (synchronous) on each of this thread's EPs.
+ */
+bool
+DT_handle_rdma_op(DT_Tdep_Print_Head * phead,
+		  Ep_Context_t * ep_context,
+		  unsigned int num_eps,
+		  DT_Transfer_Type opcode, int op_indx, bool poll)
+{
+	unsigned int i, j;
+	DAT_RETURN ret;
+	unsigned char *completion_reaped;
+
+	completion_reaped = DT_Mdep_Malloc(num_eps * sizeof(unsigned char));
+
+	if (!completion_reaped) {
+		return false;
+	}
+
+	/* Initiate the operation */
+	for (i = 0; i < num_eps; i++) {
+		Transaction_Test_Op_t *op = &ep_context[i].op[op_indx];
+		DAT_LMR_TRIPLET *iov = DT_Bpool_GetIOV(op->bp, 0);
+		DAT_DTO_COOKIE cookie;
+		DAT_RMR_TRIPLET rmr_triplet;
+
+		/* Prep the inputs */
+		for (j = 0; j < op->num_segs; j++) {
+			iov[j].virtual_address = (DAT_VADDR) (uintptr_t)
+			    DT_Bpool_GetBuffer(op->bp, j);
+			iov[j].segment_length = op->seg_size;
+			iov[j].lmr_context = DT_Bpool_GetLMR(op->bp, j);
+		}
+		cookie.as_64 = ((((DAT_UINT64) i) << 32)
+				| (((uintptr_t) DT_Bpool_GetBuffer(op->bp, 0)) &
+				   0xffffffffUL));
+
+		rmr_triplet.virtual_address =
+		    (DAT_VADDR) (uintptr_t) op->Rdma_Address;
+		rmr_triplet.segment_length = op->seg_size * op->num_segs;
+		rmr_triplet.rmr_context = op->Rdma_Context;
+
+		DT_Tdep_PT_Debug(3, (phead,
+				     "Call dat_ep_post_rdma_%s [" F64x ", sz="
+				     F64x ", ctxt=%x]\n",
+				     (opcode == RDMA_WRITE ? "write" : "read"),
+				     rmr_triplet.virtual_address,
+				     rmr_triplet.segment_length,
+				     rmr_triplet.rmr_context));
+
+		/* Post the operation */
+		if (opcode == RDMA_WRITE) {
+
+			ret = dat_ep_post_rdma_write(ep_context[i].ep_handle,
+						     op->num_segs,
+						     iov,
+						     cookie,
+						     &rmr_triplet,
+						     DAT_COMPLETION_DEFAULT_FLAG);
+
+		} else {	/* opcode == RDMA_READ */
+
+			ret = dat_ep_post_rdma_read(ep_context[i].ep_handle,
+						    op->num_segs,
+						    iov,
+						    cookie,
+						    &rmr_triplet,
+						    DAT_COMPLETION_DEFAULT_FLAG);
+
+		}
+		if (ret != DAT_SUCCESS) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: dat_ep_post_rdma_%s failed: %s\n",
+					  (opcode ==
+					   RDMA_WRITE ? "write" : "read"),
+					  DT_RetToString(ret));
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return (false);
+		} else {
+			DT_Tdep_PT_Debug(3, (phead,
+					     "Done dat_ep_post_rdma_%s %s\n",
+					     (opcode ==
+					      RDMA_WRITE ? "write" : "read"),
+					     " ()  Waiting ..."));
+		}
+	}
+
+	bzero((void *)completion_reaped, sizeof(unsigned char) * num_eps);
+	/* Wait for it to happen */
+	for (i = 0; i < num_eps; i++) {
+		Transaction_Test_Op_t *op;
+		DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
+		DAT_DTO_COOKIE dto_cookie;
+		unsigned int epnum;
+
+		if (!DT_dto_event_reap
+		    (phead, ep_context[i].reqt_evd_hdl, poll, &dto_stat)) {
+			DT_Mdep_Free(completion_reaped);
+			return (false);
+		}
+
+		epnum = dto_stat.user_cookie.as_64 >> 32;
+		if (epnum > num_eps) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: %s: Invalid endpoint completion reaped.\n"
+					  "\tEndpoint: 0x%p, Cookie: 0x" F64x
+					  ", Length: " F64u "\n",
+					  opcode ==
+					  RDMA_WRITE ? "RDMA/WR" : "RDMA/RD",
+					  dto_stat.ep_handle,
+					  dto_stat.user_cookie.as_64,
+					  dto_stat.transfered_length);
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return false;
+		}
+		op = &ep_context[epnum].op[op_indx];
+
+		dto_cookie.as_64 = ((((DAT_UINT64) epnum) << 32)
+				    |
+				    (((uintptr_t) DT_Bpool_GetBuffer(op->bp, 0))
+				     & 0xffffffffUL));
+
+		if (!DT_dto_check(phead,
+				  &dto_stat,
+				  ep_context[epnum].ep_handle,
+				  op->num_segs * op->seg_size,
+				  dto_cookie,
+				  (opcode ==
+				   RDMA_WRITE ? "RDMA/WR" : "RDMA/RD"))) {
+			DT_Mdep_Free(completion_reaped);
+			return (false);
+		}
+
+		if (completion_reaped[epnum]) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: %s: Secondary completion seen for endpoint 0x%p (%d)\n",
+					  opcode ==
+					  RDMA_WRITE ? "RDMA/WR" : "RDMA/RD",
+					  ep_context[epnum].ep_handle, epnum);
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return (false);
+		}
+		completion_reaped[epnum] = 1;
+
+		DT_Tdep_PT_Debug(3, (phead,
+				     "dat_ep_post_rdma_%s OK\n",
+				     (opcode ==
+				      RDMA_WRITE ? "RDMA/WR" : "RDMA/RD")));
+	}
+
+	for (i = 0; i < num_eps; i++) {
+		if (completion_reaped[i] == 0) {
+			DT_Tdep_PT_Printf(phead,
+					  "Test Error: %s: No completion seen for endpoint 0x%p (#%d)\n",
+					  opcode ==
+					  RDMA_WRITE ? "RDMA/WR" : "RDMA/RD",
+					  ep_context[i].ep_handle, i);
+			DT_Test_Error();
+			DT_Mdep_Free(completion_reaped);
+			return (false);
+		}
+	}
+
+	DT_Mdep_Free(completion_reaped);
+
+	return (true);
+}
+
+/* -----------------------------------------------------------
+ * Verify whether we (the client side) can support
+ * the requested 'T' test.
+ */
+bool DT_check_params(Per_Test_Data_t * pt_ptr, char *module)
+{
+	Transaction_Cmd_t *cmd = &pt_ptr->Params.u.Transaction_Cmd;
+	unsigned long num_recvs = 0U;
+	unsigned long num_sends = 0U;
+	unsigned long num_rdma_rd = 0U;
+	unsigned long num_rdma_wr = 0U;
+	unsigned long max_size = 0U;
+	unsigned long max_segs = 0U;
+	bool rval = true;
+	unsigned int i;
+	DT_Tdep_Print_Head *phead;
+
+	phead = pt_ptr->Params.phead;
+
+	/* Count up what's requested (including -V appended sync points) */
+	for (i = 0; i < cmd->num_ops; i++) {
+		unsigned int xfer_size;
+
+		xfer_size = cmd->op[i].num_segs * cmd->op[i].seg_size;
+		if (xfer_size > max_size) {
+			max_size = xfer_size;
+		}
+		if (cmd->op[i].num_segs > max_segs) {
+			max_segs = cmd->op[i].num_segs;
+		}
+
+		switch (cmd->op[i].transfer_type) {
+		case SEND_RECV:
+			{
+				if (cmd->op[i].server_initiated) {
+					num_recvs++;
+				} else {
+					num_sends++;
+				}
+				break;
+			}
+
+		case RDMA_READ:
+			{
+				num_rdma_rd++;
+				break;
+			}
+
+		case RDMA_WRITE:
+			{
+				num_rdma_wr++;
+				break;
+			}
+		}
+	}
+
+	/*
+	 * Now check the IA and EP attributes, and check for some of the
+	 * more obvious resource problems.  This is hardly exhaustive,
+	 * and some things will inevitably fall through to run-time.
+	 *
+	 * We don't compare
+	 *      num_rdma_rd > pt_ptr->ia_attr.max_rdma_read_per_ep
+	 *      num_rdma_wr > pt_ptr->ia_attr.max_dto_per_ep
+	 * because each thread has its own EPs, and transfers are issued
+	 * synchronously (across a thread's EPs, and ignoring -f, which allows
+	 * a per-EP pipeline depth of at most 2 and applies only to SR ops),
+	 * so dapltest actually attempts almost no pipelining on a single EP.
+	 * But we do check that pre-posted recv buffers will all fit.
+	 */
+	if (num_recvs > pt_ptr->ia_attr.max_dto_per_ep ||
+	    num_sends > pt_ptr->ia_attr.max_dto_per_ep) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: S/R: cannot supply %ld SR ops (maximum: %d)\n",
+				  module,
+				  num_recvs > num_sends ? num_recvs : num_sends,
+				  pt_ptr->ia_attr.max_dto_per_ep);
+		rval = false;
+	}
+	if (max_size > pt_ptr->ia_attr.max_lmr_block_size) {
+		DT_Tdep_PT_Printf(phead,
+				  "%s: buffer too large: 0x%lx (maximum: " F64x
+				  " bytes)\n", module, max_size,
+				  pt_ptr->ia_attr.max_lmr_block_size);
+		rval = false;
+	}
+	if (max_segs > pt_ptr->ep_attr.max_recv_iov ||
+	    max_segs > pt_ptr->ep_attr.max_request_iov) {
+		/*
+		 * In an ideal world, we'd just ask for more segments
+		 * when creating the EPs for the test, rather than
+		 * checking against default EP attributes.
+		 */
+		DT_Tdep_PT_Printf(phead,
+				  "%s: cannot use %ld segments (maxima: S %d, R %d)\n",
+				  module,
+				  max_segs,
+				  pt_ptr->ep_attr.max_request_iov,
+				  pt_ptr->ep_attr.max_recv_iov);
+		rval = false;
+	}
+
+	return (rval);
+}
+
+/* Empty function in which to set breakpoints.  */
+void DT_Test_Error(void)
+{
+	;
+}
+
+void
+DT_Transaction_Cmd_PT_Print(DT_Tdep_Print_Head * phead, Transaction_Cmd_t * cmd)
+{
+	unsigned int i;
+	DT_Tdep_PT_Printf(phead, "-------------------------------------\n");
+	DT_Tdep_PT_Printf(phead, "TransCmd.server_name              : %s\n",
+			  cmd->server_name);
+	DT_Tdep_PT_Printf(phead, "TransCmd.num_iterations           : %d\n",
+			  cmd->num_iterations);
+	DT_Tdep_PT_Printf(phead, "TransCmd.num_threads              : %d\n",
+			  cmd->num_threads);
+	DT_Tdep_PT_Printf(phead, "TransCmd.eps_per_thread           : %d\n",
+			  cmd->eps_per_thread);
+	DT_Tdep_PT_Printf(phead, "TransCmd.validate                 : %d\n",
+			  cmd->validate);
+	DT_Tdep_PT_Printf(phead, "TransCmd.dapl_name                : %s\n",
+			  cmd->dapl_name);
+	DT_Tdep_PT_Printf(phead, "TransCmd.num_ops                  : %d\n",
+			  cmd->num_ops);
+
+	for (i = 0; i < cmd->num_ops; i++) {
+		DT_Tdep_PT_Printf(phead,
+				  "TransCmd.op[%d].transfer_type      : %s %s\n",
+				  i,
+				  cmd->op[i].transfer_type ==
+				  0 ? "RDMA_READ" : cmd->op[i].transfer_type ==
+				  1 ? "RDMA_WRITE" : "SEND_RECV",
+				  cmd->op[i].
+				  server_initiated ? " (server)" : " (client)");
+		DT_Tdep_PT_Printf(phead,
+				  "TransCmd.op[%d].seg_size           : %d\n",
+				  i, cmd->op[i].seg_size);
+		DT_Tdep_PT_Printf(phead,
+				  "TransCmd.op[%d].num_segs           : %d\n",
+				  i, cmd->op[i].num_segs);
+		DT_Tdep_PT_Printf(phead,
+				  "TransCmd.op[%d].reap_send_on_recv  : %d\n",
+				  i, cmd->op[i].reap_send_on_recv);
+	}
+}
diff --git a/test/dapltest/test/dapl_util.c b/test/dapltest/test/dapl_util.c
new file mode 100644
index 0000000..39cc1a3
--- /dev/null
+++ b/test/dapltest/test/dapl_util.c
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+/*
+ * Map DAT_RETURN values to readable strings,
+ * but don't assume the values are zero-based or contiguous.
+ */
+const char *DT_RetToString(DAT_RETURN ret_value)
+{
+	const char *major_msg, *minor_msg;
+	int sz;
+	char *errmsg;
+
+	dat_strerror(ret_value, &major_msg, &minor_msg);
+
+	sz = strlen(major_msg) + strlen(minor_msg) + 2;
+/*
+ * FIXME: The callers of this function are not freeing
+ * the errmsg string. Hence there is a memory leak 
+ * (this function is likely only used on error paths, 
+ *  so the consequences may not be that dire).
+ */
+	errmsg = DT_Mdep_Malloc(sz);
+	strcpy(errmsg, major_msg);
+	strcat(errmsg, " ");
+	strcat(errmsg, minor_msg);
+
+	return errmsg;
+}
+
+/*
+ * Map DAT_RETURN values to readable strings,
+ * but don't assume the values are zero-based or contiguous.
+ */
+const char *DT_TransferTypeToString(DT_Transfer_Type type)
+{
+	static char *DT_Type[] = {
+		"RR",
+		"RW",
+		"SR"
+	};
+
+	if ((0 <= type) && (type <= 2)) {
+		return DT_Type[type];
+	} else {
+		return "Error: Unkown Transfer Type";
+	}
+}
+
+/*
+ * Map DAT_ASYNC_ERROR_CODE values to readable strings
+ */
+const char *DT_AsyncErr2Str(DAT_EVENT_NUMBER error_code)
+{
+	unsigned int i;
+	static struct {
+		const char *name;
+		DAT_RETURN value;
+	} dat_errors[] = {
+#   define DATxx(x) { # x, x }
+		DATxx(DAT_DTO_COMPLETION_EVENT),
+		    DATxx(DAT_RMR_BIND_COMPLETION_EVENT),
+		    DATxx(DAT_CONNECTION_REQUEST_EVENT),
+		    DATxx(DAT_CONNECTION_EVENT_ESTABLISHED),
+		    DATxx(DAT_CONNECTION_EVENT_PEER_REJECTED),
+		    DATxx(DAT_CONNECTION_EVENT_NON_PEER_REJECTED),
+		    DATxx(DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR),
+		    DATxx(DAT_CONNECTION_EVENT_DISCONNECTED),
+		    DATxx(DAT_CONNECTION_EVENT_BROKEN),
+		    DATxx(DAT_CONNECTION_EVENT_TIMED_OUT),
+		    DATxx(DAT_ASYNC_ERROR_EVD_OVERFLOW),
+		    DATxx(DAT_ASYNC_ERROR_IA_CATASTROPHIC),
+		    DATxx(DAT_ASYNC_ERROR_EP_BROKEN),
+		    DATxx(DAT_ASYNC_ERROR_TIMED_OUT),
+		    DATxx(DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR),
+		    DATxx(DAT_SOFTWARE_EVENT)
+#   undef DATxx
+	};
+#   define NUM_ERRORS (sizeof (dat_errors)/sizeof (dat_errors[0]))
+
+	for (i = 0; i < NUM_ERRORS; i++) {
+		if (dat_errors[i].value == error_code) {
+			return (dat_errors[i].name);
+		}
+	}
+
+	return ("Invalid_DAT_EVENT_NUMBER");
+}
+
+/*
+ * Map DAT_EVENT_CODE values to readable strings
+ */
+const char *DT_EventToSTr(DAT_EVENT_NUMBER event_code)
+{
+	unsigned int i;
+	static struct {
+		const char *name;
+		DAT_RETURN value;
+	} dat_events[] = {
+#   define DATxx(x) { # x, x }
+		DATxx(DAT_DTO_COMPLETION_EVENT),
+		    DATxx(DAT_RMR_BIND_COMPLETION_EVENT),
+		    DATxx(DAT_CONNECTION_REQUEST_EVENT),
+		    DATxx(DAT_CONNECTION_EVENT_ESTABLISHED),
+		    DATxx(DAT_CONNECTION_EVENT_PEER_REJECTED),
+		    DATxx(DAT_CONNECTION_EVENT_NON_PEER_REJECTED),
+		    DATxx(DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR),
+		    DATxx(DAT_CONNECTION_EVENT_DISCONNECTED),
+		    DATxx(DAT_CONNECTION_EVENT_BROKEN),
+		    DATxx(DAT_CONNECTION_EVENT_TIMED_OUT),
+		    DATxx(DAT_CONNECTION_EVENT_UNREACHABLE),
+		    DATxx(DAT_ASYNC_ERROR_EVD_OVERFLOW),
+		    DATxx(DAT_ASYNC_ERROR_IA_CATASTROPHIC),
+		    DATxx(DAT_ASYNC_ERROR_EP_BROKEN),
+		    DATxx(DAT_ASYNC_ERROR_TIMED_OUT),
+		    DATxx(DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR),
+		    DATxx(DAT_SOFTWARE_EVENT)
+#   undef DATxx
+	};
+#   define NUM_EVENTS (sizeof (dat_events)/sizeof (dat_events[0]))
+
+	for (i = 0; i < NUM_EVENTS; i++) {
+		if (dat_events[i].value == event_code) {
+			return (dat_events[i].name);
+		}
+	}
+
+	return ("Invalid_DAT_EVENT_NUMBER");
+}
+
+/*
+ * Map DAT_EP_STATE_CODE values to readable strings
+ */
+const char *DT_State2Str(DAT_EP_STATE state_code)
+{
+	unsigned int i;
+	static struct {
+		const char *name;
+		DAT_RETURN value;
+	} dat_state[] = {
+#   define DATxx(x) { # x, x }
+		DATxx(DAT_EP_STATE_UNCONNECTED),
+		    DATxx(DAT_EP_STATE_RESERVED),
+		    DATxx(DAT_EP_STATE_PASSIVE_CONNECTION_PENDING),
+		    DATxx(DAT_EP_STATE_ACTIVE_CONNECTION_PENDING),
+		    DATxx(DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING),
+		    DATxx(DAT_EP_STATE_CONNECTED),
+		    DATxx(DAT_EP_STATE_DISCONNECT_PENDING),
+		    DATxx(DAT_EP_STATE_ERROR)
+#   undef DATxx
+	};
+#   define NUM_STATES (sizeof (dat_state)/sizeof (dat_state[0]))
+
+	for (i = 0; i < NUM_STATES; i++) {
+		if (dat_state[i].value == state_code) {
+			return (dat_state[i].name);
+		}
+	}
+
+	return ("Invalid_DAT_STATE_NUMBER");
+}
+
+/*
+ * A couple of round-up routines (for pointers and counters)
+ * which both assume a power-of-two 'align' factor,
+ * and do the correct thing if align == 0.
+ */
+unsigned char *DT_AlignPtr(void *val, DAT_COUNT align)
+{
+	if (align) {
+#if defined(_WIN64)
+		return ((unsigned char *)
+			(((uint64_t) val + ((uint64_t) align) -
+			  1) & ~(((uint64_t) align) - 1)));
+#else
+		return ((unsigned char *)
+			(((unsigned long)val + ((unsigned long)align) -
+			  1) & ~(((unsigned long)align) - 1)));
+#endif
+	}
+	return (val);
+}
+
+DAT_COUNT DT_RoundSize(DAT_COUNT val, DAT_COUNT align)
+{
+	if (align) {
+		return (((val + align - 1) & ~(align - 1)));
+	}
+	return (val);
+}
diff --git a/test/dapltest/udapl/udapl_tdep.c b/test/dapltest/udapl/udapl_tdep.c
new file mode 100644
index 0000000..af5522c
--- /dev/null
+++ b/test/dapltest/udapl/udapl_tdep.c
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ *
+ * This Software is licensed under one of the following licenses:
+ *
+ * 1) under the terms of the "Common Public License 1.0" a copy of which is
+ *    in the file LICENSE.txt in the root directory. The license is also
+ *    available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/cpl.php.
+ *
+ * 2) under the terms of the "The BSD License" a copy of which is in the file
+ *    LICENSE2.txt in the root directory. The license is also available from
+ *    the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a 
+ *    copy of which is in the file LICENSE3.txt in the root directory. The 
+ *    license is also available from the Open Source Initiative, see
+ *    http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * Licensee has the right to choose one of the above licenses.
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice and one of the license notices.
+ *
+ * Redistributions in binary form must reproduce both the above copyright
+ * notice, one of the license notices in the documentation
+ * and/or other materials provided with the distribution.
+ */
+
+#include "dapl_proto.h"
+
+void DT_Tdep_Init(void)
+{
+	DT_Mdep_LockInit(&g_PerfTestLock);	/* For kDAPL, this is done in kdapl_module.c */
+}
+
+void DT_Tdep_End(void)
+{
+	DT_Mdep_LockDestroy(&g_PerfTestLock);	/* For kDAPL, this is done in kdapl_module.c */
+}
+
+DAT_RETURN DT_Tdep_Execute_Test(Params_t * params_ptr)
+{
+	return DT_Execute_Test(params_ptr);
+}
+
+DAT_RETURN
+DT_Tdep_lmr_create(DAT_IA_HANDLE ia_handle,
+		   DAT_MEM_TYPE mem_type,
+		   DAT_REGION_DESCRIPTION region,
+		   DAT_VLEN len,
+		   DAT_PZ_HANDLE pz_handle,
+		   DAT_MEM_PRIV_FLAGS priv_flag,
+		   DAT_LMR_HANDLE * lmr_handle_ptr,
+		   DAT_LMR_CONTEXT * lmr_context_ptr,
+		   DAT_RMR_CONTEXT * rmr_context_ptr,
+		   DAT_VLEN * reg_size_ptr, DAT_VADDR * reg_addr_ptr)
+{
+	return dat_lmr_create(ia_handle,
+			      mem_type,
+			      region,
+			      len,
+			      pz_handle,
+			      priv_flag,
+			      DAT_VA_TYPE_VA,
+			      lmr_handle_ptr,
+			      lmr_context_ptr,
+			      rmr_context_ptr, reg_size_ptr, reg_addr_ptr);
+}
+
+DAT_RETURN
+DT_Tdep_evd_create(DAT_IA_HANDLE ia_handle,
+		   DAT_COUNT evd_min_qlen,
+		   DAT_CNO_HANDLE cno_handle,
+		   DAT_EVD_FLAGS evd_flags, DAT_EVD_HANDLE * evd_handle_ptr)
+{
+	return dat_evd_create(ia_handle,
+			      evd_min_qlen,
+			      DAT_HANDLE_NULL, evd_flags, evd_handle_ptr);
+}
+
+DAT_RETURN DT_Tdep_evd_free(DAT_EVD_HANDLE evd_handle)
+{
+	return dat_evd_free(evd_handle);
+}
+
+DAT_RETURN
+DT_Tdep_evd_wait(DAT_EVD_HANDLE evd_handle,
+		 DAT_TIMEOUT timeout, DAT_EVENT * event)
+{
+	DAT_COUNT count;
+
+	return dat_evd_wait(evd_handle, timeout, 1, event, &count);
+}
+
+void DT_Tdep_PT_Printf(DT_Tdep_Print_Head * phead, const char *fmt, ...)
+{
+	char buffer[256];
+	va_list args;
+
+	va_start(args, fmt);
+	vsprintf(buffer, fmt, args);
+	va_end(args);
+
+	printf(buffer);
+}
+
+DAT_RETURN DT_Tdep_evd_dequeue(DAT_EVD_HANDLE evd_handle, DAT_EVENT * event)
+{
+	return dat_evd_dequeue(evd_handle, event);
+}
diff --git a/test/dtest/Makefile.am b/test/dtest/Makefile.am
new file mode 100755
index 0000000..a023c19
--- /dev/null
+++ b/test/dtest/Makefile.am
@@ -0,0 +1,14 @@
+bin_PROGRAMS = dtest
+dtest_SOURCES = dtest.c
+dtest_CFLAGS = -g -Wall -D_GNU_SOURCE 
+
+if EXT_TYPE_IB
+bin_PROGRAMS += dtestx
+dtestx_SOURCES = dtestx.c
+dtestx_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAT_EXTENSIONS
+dtestx_LDADD = $(top_builddir)/dat/udat/libdat2.la
+endif
+
+INCLUDES =  -I $(srcdir)/../../dat/include 
+dtest_LDADD = $(top_builddir)/dat/udat/libdat2.la
+
diff --git a/test/dtest/Makefile.in b/test/dtest/Makefile.in
new file mode 100644
index 0000000..a96c11b
--- /dev/null
+++ b/test/dtest/Makefile.in
@@ -0,0 +1,510 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = dtest$(EXEEXT) $(am__EXEEXT_1)
+ at EXT_TYPE_IB_TRUE@am__append_1 = dtestx
+subdir = test/dtest
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+ at EXT_TYPE_IB_TRUE@am__EXEEXT_1 = dtestx$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_dtest_OBJECTS = dtest-dtest.$(OBJEXT)
+dtest_OBJECTS = $(am_dtest_OBJECTS)
+dtest_DEPENDENCIES = $(top_builddir)/dat/udat/libdat2.la
+dtest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(dtest_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__dtestx_SOURCES_DIST = dtestx.c
+ at EXT_TYPE_IB_TRUE@am_dtestx_OBJECTS = dtestx-dtestx.$(OBJEXT)
+dtestx_OBJECTS = $(am_dtestx_OBJECTS)
+ at EXT_TYPE_IB_TRUE@dtestx_DEPENDENCIES =  \
+ at EXT_TYPE_IB_TRUE@	$(top_builddir)/dat/udat/libdat2.la
+dtestx_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(dtestx_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+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 = $(dtest_SOURCES) $(dtestx_SOURCES)
+DIST_SOURCES = $(dtest_SOURCES) $(am__dtestx_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+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@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+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_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+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@
+dtest_SOURCES = dtest.c
+dtest_CFLAGS = -g -Wall -D_GNU_SOURCE 
+ at EXT_TYPE_IB_TRUE@dtestx_SOURCES = dtestx.c
+ at EXT_TYPE_IB_TRUE@dtestx_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAT_EXTENSIONS
+ at EXT_TYPE_IB_TRUE@dtestx_LDADD = $(top_builddir)/dat/udat/libdat2.la
+INCLUDES = -I $(srcdir)/../../dat/include 
+dtest_LDADD = $(top_builddir)/dat/udat/libdat2.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .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 ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  test/dtest/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  test/dtest/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(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) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
+dtest$(EXEEXT): $(dtest_OBJECTS) $(dtest_DEPENDENCIES) 
+	@rm -f dtest$(EXEEXT)
+	$(dtest_LINK) $(dtest_OBJECTS) $(dtest_LDADD) $(LIBS)
+dtestx$(EXEEXT): $(dtestx_OBJECTS) $(dtestx_DEPENDENCIES) 
+	@rm -f dtestx$(EXEEXT)
+	$(dtestx_LINK) $(dtestx_OBJECTS) $(dtestx_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dtest-dtest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dtestx-dtestx.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(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@	mv -f $(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@	mv -f $(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 $@ $<
+
+dtest-dtest.o: dtest.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtest_CFLAGS) $(CFLAGS) -MT dtest-dtest.o -MD -MP -MF $(DEPDIR)/dtest-dtest.Tpo -c -o dtest-dtest.o `test -f 'dtest.c' || echo '$(srcdir)/'`dtest.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dtest-dtest.Tpo $(DEPDIR)/dtest-dtest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dtest.c' object='dtest-dtest.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtest_CFLAGS) $(CFLAGS) -c -o dtest-dtest.o `test -f 'dtest.c' || echo '$(srcdir)/'`dtest.c
+
+dtest-dtest.obj: dtest.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtest_CFLAGS) $(CFLAGS) -MT dtest-dtest.obj -MD -MP -MF $(DEPDIR)/dtest-dtest.Tpo -c -o dtest-dtest.obj `if test -f 'dtest.c'; then $(CYGPATH_W) 'dtest.c'; else $(CYGPATH_W) '$(srcdir)/dtest.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dtest-dtest.Tpo $(DEPDIR)/dtest-dtest.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dtest.c' object='dtest-dtest.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtest_CFLAGS) $(CFLAGS) -c -o dtest-dtest.obj `if test -f 'dtest.c'; then $(CYGPATH_W) 'dtest.c'; else $(CYGPATH_W) '$(srcdir)/dtest.c'; fi`
+
+dtestx-dtestx.o: dtestx.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtestx_CFLAGS) $(CFLAGS) -MT dtestx-dtestx.o -MD -MP -MF $(DEPDIR)/dtestx-dtestx.Tpo -c -o dtestx-dtestx.o `test -f 'dtestx.c' || echo '$(srcdir)/'`dtestx.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dtestx-dtestx.Tpo $(DEPDIR)/dtestx-dtestx.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dtestx.c' object='dtestx-dtestx.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtestx_CFLAGS) $(CFLAGS) -c -o dtestx-dtestx.o `test -f 'dtestx.c' || echo '$(srcdir)/'`dtestx.c
+
+dtestx-dtestx.obj: dtestx.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtestx_CFLAGS) $(CFLAGS) -MT dtestx-dtestx.obj -MD -MP -MF $(DEPDIR)/dtestx-dtestx.Tpo -c -o dtestx-dtestx.obj `if test -f 'dtestx.c'; then $(CYGPATH_W) 'dtestx.c'; else $(CYGPATH_W) '$(srcdir)/dtestx.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/dtestx-dtestx.Tpo $(DEPDIR)/dtestx-dtestx.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dtestx.c' object='dtestx-dtestx.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtestx_CFLAGS) $(CFLAGS) -c -o dtestx-dtestx.obj `if test -f 'dtestx.c'; then $(CYGPATH_W) 'dtestx.c'; else $(CYGPATH_W) '$(srcdir)/dtestx.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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; 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  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; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.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-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
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/dtest/README b/test/dtest/README
new file mode 100644
index 0000000..34eeeb9
--- /dev/null
+++ b/test/dtest/README
@@ -0,0 +1,19 @@
+simple dapl test just for initial openIB uDAPL testing...
+
+       dtest/dtest.c
+       dtest/makefile
+       dtest/dat.conf
+
+to build (default uDAPL name == IB1, ib device  ==  mthca0, port == 1)
+       edit makefile and change path (DAT_LIB) to appropriate libdat.so
+       edit dat.conf and change path to appropriate libdapl.so
+       cp dat.conf to /etc/dat.conf
+
+to run:
+       server: dtest
+       client: dtest -h hostname
+
+for verbose uDAPL and uDAT debug:
+
+       export DAPL_DBG_TYPE=0xffff
+       export DAT_DBG_TYPE=0xffff
diff --git a/test/dtest/dtest.c b/test/dtest/dtest.c
new file mode 100755
index 0000000..6ff7798
--- /dev/null
+++ b/test/dtest/dtest.c
@@ -0,0 +1,2147 @@
+/*
+ * Copyright (c) 2005-2008 Intel Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: $
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef DAPL_PROVIDER
+#undef DAPL_PROVIDER
+#endif
+
+#if defined(_WIN32) || defined(_WIN64)
+
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <io.h>
+#include <process.h>
+#include <complib/cl_types.h>
+#include "..\..\..\..\etc\user\getopt.c"
+
+#define getpid() ((int)GetCurrentProcessId())
+#define F64x "%I64x"
+
+#ifdef DBG
+#define DAPL_PROVIDER "ibnic0v2d"
+#else
+#define DAPL_PROVIDER "ibnic0v2"
+#endif
+
+#define ntohll _byteswap_uint64
+#define htonll _byteswap_uint64
+
+#else // _WIN32 || _WIN64
+
+#include <endian.h>
+#include <byteswap.h>
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <sys/mman.h>
+#include <getopt.h>
+#include <inttypes.h>
+#include <unistd.h>
+
+#define DAPL_PROVIDER "ofa-v2-ib0"
+
+#define F64x "%"PRIx64""
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define htonll(x) (x)
+#define ntohll(x) (x)
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define htonll(x)  bswap_64(x)
+#define ntohll(x)  bswap_64(x)
+#endif
+
+#endif // _WIN32 || _WIN64
+
+/* Debug: 1 == connect & close only, otherwise full-meal deal */
+#define CONNECT_ONLY 0
+
+#define MAX_POLLING_CNT 50000
+#define MAX_RDMA_RD    4
+#define MAX_PROCS      1000
+
+/* Header files needed for DAT/uDAPL */
+#include    "dat2/udat.h"
+
+/* definitions */
+#define SERVER_CONN_QUAL  45248
+#define DTO_TIMEOUT       (1000*1000*5)
+#define DTO_FLUSH_TIMEOUT (1000*1000*2)
+#define CONN_TIMEOUT      (1000*1000*10)
+#define SERVER_TIMEOUT    DAT_TIMEOUT_INFINITE
+#define RDMA_BUFFER_SIZE  (64)
+
+/* Global DAT vars */
+static DAT_IA_HANDLE h_ia = DAT_HANDLE_NULL;
+static DAT_PZ_HANDLE h_pz = DAT_HANDLE_NULL;
+static DAT_EP_HANDLE h_ep = DAT_HANDLE_NULL;
+static DAT_PSP_HANDLE h_psp = DAT_HANDLE_NULL;
+static DAT_CR_HANDLE h_cr = DAT_HANDLE_NULL;
+
+static DAT_EVD_HANDLE h_async_evd = DAT_HANDLE_NULL;
+static DAT_EVD_HANDLE h_dto_req_evd = DAT_HANDLE_NULL;
+static DAT_EVD_HANDLE h_dto_rcv_evd = DAT_HANDLE_NULL;
+static DAT_EVD_HANDLE h_cr_evd = DAT_HANDLE_NULL;
+static DAT_EVD_HANDLE h_conn_evd = DAT_HANDLE_NULL;
+static DAT_CNO_HANDLE h_dto_cno = DAT_HANDLE_NULL;
+
+/* RDMA buffers */
+static DAT_LMR_HANDLE h_lmr_send = DAT_HANDLE_NULL;
+static DAT_LMR_HANDLE h_lmr_recv = DAT_HANDLE_NULL;
+static DAT_LMR_CONTEXT lmr_context_send;
+static DAT_LMR_CONTEXT lmr_context_recv;
+static DAT_RMR_CONTEXT rmr_context_send;
+static DAT_RMR_CONTEXT rmr_context_recv;
+static DAT_VLEN registered_size_send;
+static DAT_VLEN registered_size_recv;
+static DAT_VADDR registered_addr_send;
+static DAT_VADDR registered_addr_recv;
+
+/* Initial msg receive buf, RMR exchange, and Rdma-write notification */
+#define MSG_BUF_COUNT     3
+#define MSG_IOV_COUNT     2
+static DAT_RMR_TRIPLET rmr_recv_msg[MSG_BUF_COUNT];
+static DAT_LMR_HANDLE h_lmr_recv_msg = DAT_HANDLE_NULL;
+static DAT_LMR_CONTEXT lmr_context_recv_msg;
+static DAT_RMR_CONTEXT rmr_context_recv_msg;
+static DAT_VLEN registered_size_recv_msg;
+static DAT_VADDR registered_addr_recv_msg;
+
+/* message send buffer */
+static DAT_RMR_TRIPLET rmr_send_msg;
+static DAT_LMR_HANDLE h_lmr_send_msg = DAT_HANDLE_NULL;
+static DAT_LMR_CONTEXT lmr_context_send_msg;
+static DAT_RMR_CONTEXT rmr_context_send_msg;
+static DAT_VLEN registered_size_send_msg;
+static DAT_VADDR registered_addr_send_msg;
+static DAT_EP_ATTR ep_attr;
+char hostname[256] = { 0 };
+char provider[64] = DAPL_PROVIDER;
+char addr_str[INET_ADDRSTRLEN];
+
+/* rdma pointers */
+char *rbuf = NULL;
+char *sbuf = NULL;
+int status;
+
+/* timers */
+double start, stop, total_us, total_sec;
+
+struct dt_time {
+	double total;
+	double open;
+	double reg;
+	double unreg;
+	double pzc;
+	double pzf;
+	double evdc;
+	double evdf;
+	double cnoc;
+	double cnof;
+	double epc;
+	double epf;
+	double rdma_wr;
+	double rdma_rd[MAX_RDMA_RD];
+	double rdma_rd_total;
+	double rtt;
+	double close;
+};
+
+struct dt_time time;
+
+/* defaults */
+static int failed = 0;
+static int performance_times = 0;
+static int connected = 0;
+static int burst = 10;
+static int server = 1;
+static int verbose = 0;
+static int polling = 0;
+static int poll_count = 0;
+static int rdma_wr_poll_count = 0;
+static int rdma_rd_poll_count[MAX_RDMA_RD] = { 0 };
+static int delay = 0;
+static int buf_len = RDMA_BUFFER_SIZE;
+static int use_cno = 0;
+static int recv_msg_index = 0;
+static int burst_msg_posted = 0;
+static int burst_msg_index = 0;
+
+/* forward prototypes */
+const char *DT_RetToString(DAT_RETURN ret_value);
+const char *DT_EventToSTr(DAT_EVENT_NUMBER event_code);
+void print_usage(void);
+double get_time(void);
+void init_data(void);
+
+DAT_RETURN send_msg(void *data,
+		    DAT_COUNT size,
+		    DAT_LMR_CONTEXT context,
+		    DAT_DTO_COOKIE cookie, DAT_COMPLETION_FLAGS flags);
+
+DAT_RETURN connect_ep(char *hostname, DAT_CONN_QUAL conn_id);
+void disconnect_ep(void);
+DAT_RETURN register_rdma_memory(void);
+DAT_RETURN unregister_rdma_memory(void);
+DAT_RETURN create_events(void);
+DAT_RETURN destroy_events(void);
+DAT_RETURN do_rdma_write_with_msg(void);
+DAT_RETURN do_rdma_read_with_msg(void);
+DAT_RETURN do_ping_pong_msg(void);
+
+#define LOGPRINTF if (verbose) printf
+
+void flush_evds(void)
+{
+	DAT_EVENT event;
+
+	/* Flush async error queue */
+	printf("%d ERR: Checking ASYNC EVD...\n", getpid());
+	while (dat_evd_dequeue(h_async_evd, &event) == DAT_SUCCESS) {
+		printf(" ASYNC EVD ENTRY: handle=%p reason=%d\n",
+			event.event_data.asynch_error_event_data.dat_handle,
+			event.event_data.asynch_error_event_data.reason);
+	}
+	/* Flush receive queue */
+	printf("%d ERR: Checking RECEIVE EVD...\n", getpid());
+	while (dat_evd_dequeue(h_dto_rcv_evd, &event) == DAT_SUCCESS) {
+		printf(" RCV EVD ENTRY: op=%d stat=%d ln=%d ck="F64x"\n",
+			event.event_data.dto_completion_event_data.operation,
+			event.event_data.dto_completion_event_data.status,
+			event.event_data.dto_completion_event_data.transfered_length,
+			event.event_data.dto_completion_event_data.user_cookie.as_64);
+	}
+	/* Flush request queue */
+	printf("%d ERR: Checking REQUEST EVD...\n", getpid());
+	while (dat_evd_dequeue(h_dto_req_evd, &event) == DAT_SUCCESS) {
+		printf(" REQ EVD ENTRY: op=%d stat=%d ln=%d ck="F64x"\n",
+			event.event_data.dto_completion_event_data.operation,
+			event.event_data.dto_completion_event_data.status,
+			event.event_data.dto_completion_event_data.transfered_length,
+			event.event_data.dto_completion_event_data.user_cookie.as_64);
+	}
+}
+
+int main(int argc, char **argv)
+{
+	int i, c;
+	DAT_RETURN ret;
+	DAT_EP_PARAM ep_param;
+
+	/* parse arguments */
+	while ((c = getopt(argc, argv, "tscvpb:d:B:h:P:")) != -1) {
+		switch (c) {
+		case 't':
+			performance_times = 1;
+			fflush(stdout);
+			break;
+		case 's':
+			server = 1;
+			fflush(stdout);
+			break;
+		case 'c':
+			use_cno = 1;
+			printf("%d Creating CNO for DTO EVD's\n", getpid());
+			fflush(stdout);
+			break;
+		case 'v':
+			verbose = 1;
+			printf("%d Verbose\n", getpid());
+			fflush(stdout);
+			break;
+		case 'p':
+			polling = 1;
+			printf("%d Polling\n", getpid());
+			fflush(stdout);
+			break;
+		case 'B':
+			burst = atoi(optarg);
+			break;
+		case 'd':
+			delay = atoi(optarg);
+			break;
+		case 'b':
+			buf_len = atoi(optarg);
+			break;
+		case 'h':
+			server = 0;
+			strcpy(hostname, optarg);
+			break;
+		case 'P':
+			strcpy(provider, optarg);
+			break;
+		default:
+			print_usage();
+			exit(-12);
+		}
+	}
+
+#if defined(_WIN32) || defined(_WIN64)
+	{
+		WSADATA wsaData;
+
+		i = WSAStartup(MAKEWORD(2, 2), &wsaData);
+		if (i != 0) {
+			printf("%s WSAStartup(2.2) failed? (0x%x)\n", argv[0],
+			       i);
+			fflush(stdout);
+			exit(1);
+		}
+	}
+#endif
+
+	if (!server) {
+		printf("%d Running as client - %s\n", getpid(), provider);
+	} else {
+		printf("%d Running as server - %s\n", getpid(), provider);
+	}
+	fflush(stdout);
+
+	/* allocate send and receive buffers */
+	if (((rbuf = malloc(buf_len * (burst+1))) == NULL) ||
+	    ((sbuf = malloc(buf_len * (burst+1))) == NULL)) {
+		perror("malloc");
+		exit(1);
+	}
+	memset(&time, 0, sizeof(struct dt_time));
+	LOGPRINTF("%d Allocated RDMA buffers (r:%p,s:%p) len %d \n",
+		  getpid(), rbuf, sbuf, buf_len);
+
+	/* dat_ia_open, dat_pz_create */
+	h_async_evd = DAT_HANDLE_NULL;
+	start = get_time();
+	ret = dat_ia_open(provider, 8, &h_async_evd, &h_ia);
+	stop = get_time();
+	time.open += ((stop - start) * 1.0e6);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d: Error Adaptor open: %s\n",
+			getpid(), DT_RetToString(ret));
+		exit(1);
+	} else
+		LOGPRINTF("%d Opened Interface Adaptor\n", getpid());
+
+	/* Create Protection Zone */
+	start = get_time();
+	LOGPRINTF("%d Create Protection Zone\n", getpid());
+	ret = dat_pz_create(h_ia, &h_pz);
+	stop = get_time();
+	time.pzc += ((stop - start) * 1.0e6);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error creating Protection Zone: %s\n",
+			getpid(), DT_RetToString(ret));
+		exit(1);
+	} else
+		LOGPRINTF("%d Created Protection Zone\n", getpid());
+
+	/* Register memory */
+	LOGPRINTF("%d Register RDMA memory\n", getpid());
+	ret = register_rdma_memory();
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error registering RDMA memory: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else
+		LOGPRINTF("%d Register RDMA memory done\n", getpid());
+
+	LOGPRINTF("%d Create events\n", getpid());
+	ret = create_events();
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error creating events: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else {
+		LOGPRINTF("%d Create events done\n", getpid());
+	}
+
+	/* create EP */
+	memset(&ep_attr, 0, sizeof(ep_attr));
+	ep_attr.service_type = DAT_SERVICE_TYPE_RC;
+	ep_attr.max_rdma_size = 0x10000;
+	ep_attr.qos = 0;
+	ep_attr.recv_completion_flags = 0;
+	ep_attr.max_recv_dtos = MSG_BUF_COUNT + (burst * 3);
+	ep_attr.max_request_dtos = MSG_BUF_COUNT + (burst * 3) + MAX_RDMA_RD;
+	ep_attr.max_recv_iov = MSG_IOV_COUNT;
+	ep_attr.max_request_iov = MSG_IOV_COUNT;
+	ep_attr.max_rdma_read_in = MAX_RDMA_RD;
+	ep_attr.max_rdma_read_out = MAX_RDMA_RD;
+	ep_attr.request_completion_flags = DAT_COMPLETION_DEFAULT_FLAG;
+	ep_attr.ep_transport_specific_count = 0;
+	ep_attr.ep_transport_specific = NULL;
+	ep_attr.ep_provider_specific_count = 0;
+	ep_attr.ep_provider_specific = NULL;
+
+	start = get_time();
+	ret = dat_ep_create(h_ia, h_pz, h_dto_rcv_evd,
+			    h_dto_req_evd, h_conn_evd, &ep_attr, &h_ep);
+	stop = get_time();
+	time.epc += ((stop - start) * 1.0e6);
+	time.total += time.epc;
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_ep_create: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else
+		LOGPRINTF("%d EP created %p \n", getpid(), h_ep);
+
+	/*
+	 * register message buffers, establish connection, and
+	 * exchange DMA RMR information info via messages
+	 */
+	ret = connect_ep(hostname, SERVER_CONN_QUAL);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error connect_ep: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else
+		LOGPRINTF("%d connect_ep complete\n", getpid());
+
+	/* Query EP for local and remote address information, print */
+	ret = dat_ep_query(h_ep, DAT_EP_FIELD_ALL, &ep_param);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_ep_query: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else
+		LOGPRINTF("%d EP queried %p \n", getpid(), h_ep);
+#if defined(_WIN32)
+	printf("\n%d Query EP: LOCAL addr %s port %lld\n", getpid(),
+	       inet_ntoa(((struct sockaddr_in *)
+			  ep_param.local_ia_address_ptr)->sin_addr),
+	       (ep_param.local_port_qual));
+#else
+	inet_ntop(AF_INET,
+		  &((struct sockaddr_in *)ep_param.local_ia_address_ptr)->
+		  sin_addr, addr_str, sizeof(addr_str));
+	printf("\n%d Query EP: LOCAL addr %s port " F64x "\n", getpid(),
+	       addr_str, (ep_param.local_port_qual));
+#endif
+#if defined(_WIN32)
+	printf("%d Query EP: REMOTE addr %s port %lld\n", getpid(),
+	       inet_ntoa(((struct sockaddr_in *)
+			  ep_param.local_ia_address_ptr)->sin_addr),
+	       (ep_param.remote_port_qual));
+#else
+	inet_ntop(AF_INET,
+		  &((struct sockaddr_in *)ep_param.remote_ia_address_ptr)->
+		  sin_addr, addr_str, sizeof(addr_str));
+	printf("%d Query EP: REMOTE addr %s port " F64x "\n", getpid(),
+	       addr_str, (ep_param.remote_port_qual));
+#endif
+	fflush(stdout);
+
+#if CONNECT_ONLY
+#if defined(_WIN32) || defined(_WIN64)
+	Sleep(1 * 1000);
+#else
+	sleep(1);
+#endif
+	goto cleanup;
+#endif
+
+	/*********** RDMA write data *************/
+	ret = do_rdma_write_with_msg();
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error do_rdma_write_with_msg: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else
+		LOGPRINTF("%d do_rdma_write_with_msg complete\n", getpid());
+
+	/*********** RDMA read data *************/
+	ret = do_rdma_read_with_msg();
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error do_rdma_read_with_msg: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else
+		LOGPRINTF("%d do_rdma_read_with_msg complete\n", getpid());
+
+	/*********** PING PING messages ************/
+	ret = do_ping_pong_msg();
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error do_ping_pong_msg: %s\n",
+			getpid(), DT_RetToString(ret));
+		goto cleanup;
+	} else {
+		LOGPRINTF("%d do_ping_pong_msg complete\n", getpid());
+		goto complete;
+	}
+
+cleanup:
+	flush_evds();
+	failed++;
+complete:
+
+	/* disconnect and free EP resources */
+	if (h_ep != DAT_HANDLE_NULL) {
+		/* unregister message buffers and tear down connection */
+		LOGPRINTF("%d Disconnect and Free EP %p \n", getpid(), h_ep);
+		disconnect_ep();
+
+		/* free EP */
+		LOGPRINTF("%d Free EP %p \n", getpid(), h_ep);
+		start = get_time();
+		ret = dat_ep_free(h_ep);
+		stop = get_time();
+		time.epf += ((stop - start) * 1.0e6);
+		time.total += time.epf;
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error freeing EP: %s\n",
+				getpid(), DT_RetToString(ret));
+		} else {
+			LOGPRINTF("%d Freed EP\n", getpid());
+			h_ep = DAT_HANDLE_NULL;
+		}
+	}
+
+	/* free EVDs */
+	LOGPRINTF("%d destroy events\n", getpid());
+	ret = destroy_events();
+	if (ret != DAT_SUCCESS)
+		fprintf(stderr, "%d Error destroy_events: %s\n",
+			getpid(), DT_RetToString(ret));
+	else
+		LOGPRINTF("%d destroy events done\n", getpid());
+
+	ret = unregister_rdma_memory();
+	LOGPRINTF("%d unregister_rdma_memory \n", getpid());
+	if (ret != DAT_SUCCESS)
+		fprintf(stderr, "%d Error unregister_rdma_memory: %s\n",
+			getpid(), DT_RetToString(ret));
+	else
+		LOGPRINTF("%d unregister_rdma_memory done\n", getpid());
+
+	/* Free protection domain */
+	LOGPRINTF("%d Freeing pz\n", getpid());
+	start = get_time();
+	ret = dat_pz_free(h_pz);
+	stop = get_time();
+	time.pzf += ((stop - start) * 1.0e6);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error freeing PZ: %s\n",
+			getpid(), DT_RetToString(ret));
+	} else {
+		LOGPRINTF("%d Freed pz\n", getpid());
+		h_pz = NULL;
+	}
+
+	/* close the device */
+	LOGPRINTF("%d Closing Interface Adaptor\n", getpid());
+	start = get_time();
+	ret = dat_ia_close(h_ia, DAT_CLOSE_ABRUPT_FLAG);
+	stop = get_time();
+	time.close += ((stop - start) * 1.0e6);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d: Error Adaptor close: %s\n",
+			getpid(), DT_RetToString(ret));
+	} else
+		LOGPRINTF("%d Closed Interface Adaptor\n", getpid());
+
+	/* free rdma buffers */
+	free(rbuf);
+	free(sbuf);
+
+	printf("\n%d: DAPL Test Complete. %s\n\n",
+	       getpid(), failed ? "FAILED" : "PASSED");
+
+	fflush(stderr);
+	fflush(stdout);
+
+	if (!performance_times)
+		exit(0);
+
+	printf("\n%d: DAPL Test Complete.\n\n", getpid());
+	printf("%d: Message RTT: Total=%10.2lf usec, %d bursts, itime=%10.2lf"
+	       " usec, pc=%d\n",
+	       getpid(), time.rtt, burst, time.rtt / burst, poll_count);
+	printf("%d: RDMA write:  Total=%10.2lf usec, %d bursts, itime=%10.2lf"
+	       " usec, pc=%d\n",
+	       getpid(), time.rdma_wr, burst,
+	       time.rdma_wr / burst, rdma_wr_poll_count);
+	for (i = 0; i < MAX_RDMA_RD; i++) {
+		printf("%d: RDMA read:   Total=%10.2lf usec,   %d bursts, "
+		       "itime=%10.2lf usec, pc=%d\n",
+		       getpid(), time.rdma_rd_total, MAX_RDMA_RD,
+		       time.rdma_rd[i], rdma_rd_poll_count[i]);
+	}
+	printf("%d: open:      %10.2lf usec\n", getpid(), time.open);
+	printf("%d: close:     %10.2lf usec\n", getpid(), time.close);
+	printf("%d: PZ create: %10.2lf usec\n", getpid(), time.pzc);
+	printf("%d: PZ free:   %10.2lf usec\n", getpid(), time.pzf);
+	printf("%d: LMR create:%10.2lf usec\n", getpid(), time.reg);
+	printf("%d: LMR free:  %10.2lf usec\n", getpid(), time.unreg);
+	printf("%d: EVD create:%10.2lf usec\n", getpid(), time.evdc);
+	printf("%d: EVD free:  %10.2lf usec\n", getpid(), time.evdf);
+	if (use_cno) {
+		printf("%d: CNO create:  %10.2lf usec\n", getpid(), time.cnoc);
+		printf("%d: CNO free:    %10.2lf usec\n", getpid(), time.cnof);
+	}
+	printf("%d: EP create: %10.2lf usec\n", getpid(), time.epc);
+	printf("%d: EP free:   %10.2lf usec\n", getpid(), time.epf);
+	printf("%d: TOTAL:     %10.2lf usec\n", getpid(), time.total);
+
+#if defined(_WIN32) || defined(_WIN64)
+	WSACleanup();
+#endif
+	return (0);
+}
+
+#if defined(_WIN32) || defined(_WIN64)
+
+void gettimeofday(struct timeval *t, char *jnk)
+{
+	SYSTEMTIME now;
+	GetLocalTime(&now);
+	t->tv_sec = now.wMinute * 60;
+	t->tv_sec += now.wSecond;
+	t->tv_usec = now.wMilliseconds;
+}
+
+#endif
+
+double get_time(void)
+{
+	struct timeval tp;
+
+	gettimeofday(&tp, NULL);
+	return ((double)tp.tv_sec + (double)tp.tv_usec * 1e-6);
+}
+
+void init_data(void)
+{
+	memset(rbuf, 'a', buf_len);
+	memset(sbuf, 'b', buf_len);
+}
+
+DAT_RETURN
+send_msg(void *data,
+	 DAT_COUNT size,
+	 DAT_LMR_CONTEXT context,
+	 DAT_DTO_COOKIE cookie, DAT_COMPLETION_FLAGS flags)
+{
+	DAT_LMR_TRIPLET iov;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_RETURN ret;
+
+	iov.lmr_context = context;
+#if defined(_WIN32)
+	iov.virtual_address = (DAT_VADDR) data;
+#else
+	iov.virtual_address = (DAT_VADDR) (unsigned long)data;
+#endif
+	iov.segment_length = size;
+
+	LOGPRINTF("%d calling post_send\n", getpid());
+	cookie.as_64 = 0xaaaa;
+	ret = dat_ep_post_send(h_ep, 1, &iov, cookie, flags);
+
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d: ERROR: dat_ep_post_send() %s\n",
+			getpid(), DT_RetToString(ret));
+		return ret;
+	}
+
+	if (!(flags & DAT_COMPLETION_SUPPRESS_FLAG)) {
+		if (polling) {
+			printf("%d Polling post send completion...\n",
+			       getpid());
+			while (dat_evd_dequeue(h_dto_req_evd, &event) ==
+			       DAT_QUEUE_EMPTY) ;
+		} else {
+			LOGPRINTF("%d waiting for post_send completion event\n",
+				  getpid());
+			if (use_cno) {
+				DAT_EVD_HANDLE evd = DAT_HANDLE_NULL;
+				ret =
+				    dat_cno_wait(h_dto_cno, DTO_TIMEOUT, &evd);
+				LOGPRINTF("%d cno wait return evd_handle=%p\n",
+					  getpid(), evd);
+				if (evd != h_dto_req_evd) {
+					fprintf(stderr,
+						"%d Error waiting on h_dto_cno: evd != h_dto_req_evd\n",
+						getpid());
+					return (DAT_ABORT);
+				}
+			}
+			/* use wait to dequeue */
+			ret =
+			    dat_evd_wait(h_dto_req_evd, DTO_TIMEOUT, 1, &event,
+					 &nmore);
+			if (ret != DAT_SUCCESS) {
+				fprintf(stderr,
+					"%d: ERROR: DTO dat_evd_wait() %s\n",
+					getpid(), DT_RetToString(ret));
+				return ret;
+			}
+		}
+
+		/* validate event number, len, cookie, and status */
+		if (event.event_number != DAT_DTO_COMPLETION_EVENT) {
+			fprintf(stderr, "%d: ERROR: DTO event number %s\n",
+				getpid(), DT_EventToSTr(event.event_number));
+			return (DAT_ABORT);
+		}
+
+		if ((event.event_data.dto_completion_event_data.
+		     transfered_length != size)
+		    || (event.event_data.dto_completion_event_data.user_cookie.
+			as_64 != 0xaaaa)) {
+			fprintf(stderr,
+				"%d: ERROR: DTO len %d or cookie " F64x " \n",
+				getpid(),
+				event.event_data.dto_completion_event_data.
+				transfered_length,
+				event.event_data.dto_completion_event_data.
+				user_cookie.as_64);
+			return (DAT_ABORT);
+
+		}
+		if (event.event_data.dto_completion_event_data.status !=
+		    DAT_SUCCESS) {
+			fprintf(stderr, "%d: ERROR: DTO event status %s\n",
+				getpid(), DT_RetToString(ret));
+			return (DAT_ABORT);
+		}
+	}
+
+	return DAT_SUCCESS;
+}
+
+DAT_RETURN connect_ep(char *hostname, DAT_CONN_QUAL conn_id)
+{
+	DAT_SOCK_ADDR remote_addr;
+	DAT_RETURN ret;
+	DAT_REGION_DESCRIPTION region;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_LMR_TRIPLET l_iov;
+	DAT_RMR_TRIPLET r_iov;
+	DAT_DTO_COOKIE cookie;
+	int i;
+	unsigned char *buf;
+	DAT_CR_PARAM cr_param = { 0 };
+	unsigned char pdata[48] = { 0 };
+
+	/* Register send message buffer */
+	LOGPRINTF("%d Registering send Message Buffer %p, len %d\n",
+		  getpid(), &rmr_send_msg, (int)sizeof(DAT_RMR_TRIPLET));
+	region.for_va = &rmr_send_msg;
+	ret = dat_lmr_create(h_ia,
+			     DAT_MEM_TYPE_VIRTUAL,
+			     region,
+			     sizeof(DAT_RMR_TRIPLET),
+			     h_pz,
+			     DAT_MEM_PRIV_LOCAL_WRITE_FLAG,
+			     DAT_VA_TYPE_VA,
+			     &h_lmr_send_msg,
+			     &lmr_context_send_msg,
+			     &rmr_context_send_msg,
+			     &registered_size_send_msg,
+			     &registered_addr_send_msg);
+
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error registering send msg buffer: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else
+		LOGPRINTF("%d Registered send Message Buffer %p \n",
+			  getpid(), region.for_va);
+
+	/* Register Receive buffers */
+	LOGPRINTF("%d Registering Receive Message Buffer %p\n",
+		  getpid(), rmr_recv_msg);
+	region.for_va = rmr_recv_msg;
+	ret = dat_lmr_create(h_ia,
+			     DAT_MEM_TYPE_VIRTUAL,
+			     region,
+			     sizeof(DAT_RMR_TRIPLET) * MSG_BUF_COUNT,
+			     h_pz,
+			     DAT_MEM_PRIV_LOCAL_WRITE_FLAG,
+			     DAT_VA_TYPE_VA,
+			     &h_lmr_recv_msg,
+			     &lmr_context_recv_msg,
+			     &rmr_context_recv_msg,
+			     &registered_size_recv_msg,
+			     &registered_addr_recv_msg);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error registering recv msg buffer: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else
+		LOGPRINTF("%d Registered Receive Message Buffer %p\n",
+			  getpid(), region.for_va);
+
+	for (i = 0; i < MSG_BUF_COUNT; i++) {
+		cookie.as_64 = i;
+		l_iov.lmr_context = lmr_context_recv_msg;
+#if defined(_WIN32)
+		l_iov.virtual_address = (DAT_VADDR) & rmr_recv_msg[i];
+#else
+		l_iov.virtual_address =
+		    (DAT_VADDR) (unsigned long)&rmr_recv_msg[i];
+#endif
+		l_iov.segment_length = sizeof(DAT_RMR_TRIPLET);
+
+		LOGPRINTF("%d Posting Receive Message Buffer %p\n",
+			  getpid(), &rmr_recv_msg[i]);
+		ret = dat_ep_post_recv(h_ep,
+				       1,
+				       &l_iov,
+				       cookie, DAT_COMPLETION_DEFAULT_FLAG);
+
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr,
+				"%d Error registering recv msg buffer: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else
+			LOGPRINTF("%d Registered Receive Message Buffer %p\n",
+				  getpid(), region.for_va);
+
+	}
+
+	/* setup receive rdma buffer to initial string to be overwritten */
+	strcpy((char *)rbuf, "blah, blah, blah\n");
+
+	if (server) {		/* SERVER */
+
+		/* create the service point for server listen */
+		LOGPRINTF("%d Creating service point for listen\n", getpid());
+		ret = dat_psp_create(h_ia,
+				     conn_id,
+				     h_cr_evd, DAT_PSP_CONSUMER_FLAG, &h_psp);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error dat_psp_create: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else
+			LOGPRINTF("%d dat_psp_created for server listen\n",
+				  getpid());
+
+		printf("%d Server waiting for connect request on port " F64x
+		       "\n", getpid(), conn_id);
+
+		ret = dat_evd_wait(h_cr_evd, SERVER_TIMEOUT, 1, &event, &nmore);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error dat_evd_wait: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else
+			LOGPRINTF("%d dat_evd_wait for cr_evd completed\n",
+				  getpid());
+
+		if (event.event_number != DAT_CONNECTION_REQUEST_EVENT) {
+			fprintf(stderr, "%d Error unexpected cr event : %s\n",
+				getpid(), DT_EventToSTr(event.event_number));
+			return (DAT_ABORT);
+		}
+		if ((event.event_data.cr_arrival_event_data.conn_qual !=
+		     SERVER_CONN_QUAL)
+		    || (event.event_data.cr_arrival_event_data.sp_handle.
+			psp_handle != h_psp)) {
+			fprintf(stderr, "%d Error wrong cr event data : %s\n",
+				getpid(), DT_EventToSTr(event.event_number));
+			return (DAT_ABORT);
+		}
+
+		/* use to test rdma_cma timeout logic */
+#if defined(_WIN32) || defined(_WIN64)
+		if (delay)
+			Sleep(delay * 1000);
+#else
+		if (delay)
+			sleep(delay);
+#endif
+
+		/* accept connect request from client */
+		h_cr = event.event_data.cr_arrival_event_data.cr_handle;
+		LOGPRINTF("%d Accepting connect request from client\n",
+			  getpid());
+
+		/* private data - check and send it back */
+		dat_cr_query(h_cr, DAT_CSP_FIELD_ALL, &cr_param);
+
+		buf = (unsigned char *)cr_param.private_data;
+		LOGPRINTF("%d CONN REQUEST Private Data %p[0]=%d [47]=%d\n",
+			  getpid(), buf, buf[0], buf[47]);
+		for (i = 0; i < 48; i++) {
+			if (buf[i] != i + 1) {
+				fprintf(stderr, "%d Error with CONNECT REQUEST"
+					" private data: %p[%d]=%d s/be %d\n",
+					getpid(), buf, i, buf[i], i + 1);
+				dat_cr_reject(h_cr, 0, NULL);
+				return (DAT_ABORT);
+			}
+			buf[i]++;	/* change for trip back */
+		}
+
+#ifdef TEST_REJECT_WITH_PRIVATE_DATA
+		printf("%d REJECT request with 48 bytes of private data\n",
+		       getpid());
+		ret = dat_cr_reject(h_cr, 48, cr_param.private_data);
+		printf("\n%d: DAPL Test Complete. %s\n\n",
+		       getpid(), ret ? "FAILED" : "PASSED");
+		exit(0);
+#endif
+
+		ret = dat_cr_accept(h_cr, h_ep, 48, cr_param.private_data);
+
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error dat_cr_accept: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else
+			LOGPRINTF("%d dat_cr_accept completed\n", getpid());
+	} else {		/* CLIENT */
+		struct addrinfo *target;
+		int rval;
+
+#if defined(_WIN32) || defined(_WIN64)
+		if ((rval = getaddrinfo(hostname, "ftp", NULL, &target)) != 0) {
+			printf("\n remote name resolution failed! %s\n",
+			       gai_strerror(rval));
+			exit(1);
+		}
+		rval = ((struct sockaddr_in *)target->ai_addr)->sin_addr.s_addr;
+#else
+		if (getaddrinfo(hostname, NULL, NULL, &target) != 0) {
+			perror("\n remote name resolution failed!");
+			exit(1);
+		}
+		rval = ((struct sockaddr_in *)target->ai_addr)->sin_addr.s_addr;
+#endif
+		printf("%d Server Name: %s \n", getpid(), hostname);
+		printf("%d Server Net Address: %d.%d.%d.%d port " F64x "\n",
+		       getpid(), (rval >> 0) & 0xff, (rval >> 8) & 0xff,
+		       (rval >> 16) & 0xff, (rval >> 24) & 0xff, conn_id);
+
+		remote_addr = *((DAT_IA_ADDRESS_PTR) target->ai_addr);
+		freeaddrinfo(target);
+
+		for (i = 0; i < 48; i++)	/* simple pattern in private data */
+			pdata[i] = i + 1;
+
+		LOGPRINTF("%d Connecting to server\n", getpid());
+		ret = dat_ep_connect(h_ep,
+				     &remote_addr,
+				     conn_id,
+				     CONN_TIMEOUT,
+				     48,
+				     (DAT_PVOID) pdata,
+				     0, DAT_CONNECT_DEFAULT_FLAG);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error dat_ep_connect: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else
+			LOGPRINTF("%d dat_ep_connect completed\n", getpid());
+	}
+
+	printf("%d Waiting for connect response\n", getpid());
+
+	ret = dat_evd_wait(h_conn_evd, DAT_TIMEOUT_INFINITE, 1, &event, &nmore);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_evd_wait: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else
+		LOGPRINTF("%d dat_evd_wait for h_conn_evd completed\n",
+			  getpid());
+
+#ifdef TEST_REJECT_WITH_PRIVATE_DATA
+	if (event.event_number != DAT_CONNECTION_EVENT_PEER_REJECTED) {
+		fprintf(stderr, "%d expected conn reject event : %s\n",
+			getpid(), DT_EventToSTr(event.event_number));
+		return (DAT_ABORT);
+	}
+	/* get the reject private data and validate */
+	buf = (unsigned char *)event.event_data.connect_event_data.private_data;
+	printf("%d Received REJECT with private data %p[0]=%d [47]=%d\n",
+	       getpid(), buf, buf[0], buf[47]);
+	for (i = 0; i < 48; i++) {
+		if (buf[i] != i + 2) {
+			fprintf(stderr, "%d client: Error with REJECT event"
+				" private data: %p[%d]=%d s/be %d\n",
+				getpid(), buf, i, buf[i], i + 2);
+			dat_ep_disconnect(h_ep, DAT_CLOSE_ABRUPT_FLAG);
+			return (DAT_ABORT);
+		}
+	}
+	printf("\n%d: DAPL Test Complete. PASSED\n\n", getpid());
+	exit(0);
+#endif
+
+	if (event.event_number != DAT_CONNECTION_EVENT_ESTABLISHED) {
+		fprintf(stderr, "%d Error unexpected conn event : %s\n",
+			getpid(), DT_EventToSTr(event.event_number));
+		return (DAT_ABORT);
+	}
+
+	/* check private data back from server  */
+	if (!server) {
+		buf =
+		    (unsigned char *)event.event_data.connect_event_data.
+		    private_data;
+		LOGPRINTF("%d CONN Private Data %p[0]=%d [47]=%d\n", getpid(),
+			  buf, buf[0], buf[47]);
+		for (i = 0; i < 48; i++) {
+			if (buf[i] != i + 2) {
+				fprintf(stderr, "%d Error with CONNECT event"
+					" private data: %p[%d]=%d s/be %d\n",
+					getpid(), buf, i, buf[i], i + 2);
+				dat_ep_disconnect(h_ep, DAT_CLOSE_ABRUPT_FLAG);
+				LOGPRINTF
+				    ("%d waiting for disconnect event...\n",
+				     getpid());
+				dat_evd_wait(h_conn_evd, DAT_TIMEOUT_INFINITE,
+					     1, &event, &nmore);
+				return (DAT_ABORT);
+			}
+		}
+	}
+
+	printf("\n%d CONNECTED!\n\n", getpid());
+	connected = 1;
+
+#if CONNECT_ONLY
+	return 0;
+#endif
+
+	/*
+	 *  Setup our remote memory and tell the other side about it
+	 */
+	rmr_send_msg.virtual_address = htonll((DAT_VADDR) (uintptr_t) rbuf);
+	rmr_send_msg.segment_length = htonl(RDMA_BUFFER_SIZE);
+	rmr_send_msg.rmr_context = htonl(rmr_context_recv);
+
+	printf("%d Send RMR msg to remote: r_key_ctx=0x%x,va=%p,len=0x%x\n",
+	       getpid(), rmr_context_recv, rbuf, RDMA_BUFFER_SIZE);
+
+	ret = send_msg(&rmr_send_msg,
+		       sizeof(DAT_RMR_TRIPLET),
+		       lmr_context_send_msg,
+		       cookie, DAT_COMPLETION_SUPPRESS_FLAG);
+
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error send_msg: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else
+		LOGPRINTF("%d send_msg completed\n", getpid());
+
+	/*
+	 *  Wait for remote RMR information for RDMA
+	 */
+	if (polling) {
+		printf("%d Polling for remote to send RMR data\n", getpid());
+		while (dat_evd_dequeue(h_dto_rcv_evd, &event) ==
+		       DAT_QUEUE_EMPTY) ;
+	} else {
+		printf("%d Waiting for remote to send RMR data\n", getpid());
+		if (use_cno) {
+			DAT_EVD_HANDLE evd = DAT_HANDLE_NULL;
+			ret = dat_cno_wait(h_dto_cno, DTO_TIMEOUT, &evd);
+			LOGPRINTF("%d cno wait return evd_handle=%p\n",
+				  getpid(), evd);
+			if (evd != h_dto_rcv_evd) {
+				fprintf(stderr,
+					"%d Error waiting on h_dto_cno: evd != h_dto_rcv_evd\n",
+					getpid());
+				return (DAT_ABORT);
+			}
+		}
+		/* use wait to dequeue */
+		ret =
+		    dat_evd_wait(h_dto_rcv_evd, DTO_TIMEOUT, 1, &event, &nmore);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr,
+				"%d Error waiting on h_dto_rcv_evd: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d dat_evd_wait h_dto_rcv_evd completed\n",
+				  getpid());
+		}
+	}
+
+	printf("%d remote RMR data arrived!\n", getpid());
+
+	if (event.event_number != DAT_DTO_COMPLETION_EVENT) {
+		fprintf(stderr, "%d Error unexpected DTO event : %s\n",
+			getpid(), DT_EventToSTr(event.event_number));
+		return (DAT_ABORT);
+	}
+	if ((event.event_data.dto_completion_event_data.transfered_length !=
+	     sizeof(DAT_RMR_TRIPLET)) ||
+	    (event.event_data.dto_completion_event_data.user_cookie.as_64 !=
+	     recv_msg_index)) {
+		fprintf(stderr,
+			"ERR recv event: len=%d cookie=" F64x
+			" expected %d/%d\n",
+			(int)event.event_data.dto_completion_event_data.
+			transfered_length,
+			event.event_data.dto_completion_event_data.user_cookie.
+			as_64, (int)sizeof(DAT_RMR_TRIPLET), recv_msg_index);
+		return (DAT_ABORT);
+	}
+
+	/* swap received RMR msg: network order to host order */
+	r_iov = rmr_recv_msg[recv_msg_index];
+	rmr_recv_msg[recv_msg_index].rmr_context = ntohl(r_iov.rmr_context);
+	rmr_recv_msg[recv_msg_index].virtual_address =
+	    ntohll(r_iov.virtual_address);
+	rmr_recv_msg[recv_msg_index].segment_length =
+	    ntohl(r_iov.segment_length);
+
+	printf("%d Received RMR from remote: "
+	       "r_iov: r_key_ctx=%x,va=" F64x ",len=0x%x\n",
+	       getpid(), rmr_recv_msg[recv_msg_index].rmr_context,
+	       rmr_recv_msg[recv_msg_index].virtual_address,
+	       rmr_recv_msg[recv_msg_index].segment_length);
+
+	recv_msg_index++;
+
+	return (DAT_SUCCESS);
+}
+
+void disconnect_ep(void)
+{
+	DAT_RETURN ret;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+
+	if (connected) {
+
+		/* 
+		 * Only the client needs to call disconnect. The server _should_ be able
+		 * to just wait on the EVD associated with connection events for a
+		 * disconnect request and then exit.
+		 */
+		if (!server) {
+			LOGPRINTF("%d dat_ep_disconnect\n", getpid());
+			ret = dat_ep_disconnect(h_ep, DAT_CLOSE_DEFAULT);
+			if (ret != DAT_SUCCESS) {
+				fprintf(stderr,
+					"%d Error dat_ep_disconnect: %s\n",
+					getpid(), DT_RetToString(ret));
+			} else {
+				LOGPRINTF("%d dat_ep_disconnect completed\n",
+					  getpid());
+			}
+		} else {
+			LOGPRINTF("%d Server waiting for disconnect...\n",
+				  getpid());
+		}
+
+		ret =
+		    dat_evd_wait(h_conn_evd, DAT_TIMEOUT_INFINITE, 1, &event,
+				 &nmore);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error dat_evd_wait: %s\n",
+				getpid(), DT_RetToString(ret));
+		} else {
+			LOGPRINTF("%d dat_evd_wait for h_conn_evd completed\n",
+				  getpid());
+		}
+	}
+
+	/* destroy service point */
+	if ((server) && (h_psp != DAT_HANDLE_NULL)) {
+		ret = dat_psp_free(h_psp);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error dat_psp_free: %s\n",
+				getpid(), DT_RetToString(ret));
+		} else {
+			LOGPRINTF("%d dat_psp_free completed\n", getpid());
+		}
+	}
+
+	/* Unregister Send message Buffer */
+	if (h_lmr_send_msg != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Unregister send message h_lmr %p \n", getpid(),
+			  h_lmr_send_msg);
+		ret = dat_lmr_free(h_lmr_send_msg);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr,
+				"%d Error deregistering send msg mr: %s\n",
+				getpid(), DT_RetToString(ret));
+		} else {
+			LOGPRINTF("%d Unregistered send message Buffer\n",
+				  getpid());
+			h_lmr_send_msg = NULL;
+		}
+	}
+
+	/* Unregister recv message Buffer */
+	if (h_lmr_recv_msg != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Unregister recv message h_lmr %p \n", getpid(),
+			  h_lmr_recv_msg);
+		ret = dat_lmr_free(h_lmr_recv_msg);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr,
+				"%d Error deregistering recv msg mr: %s\n",
+				getpid(), DT_RetToString(ret));
+		} else {
+			LOGPRINTF("%d Unregistered recv message Buffer\n",
+				  getpid());
+			h_lmr_recv_msg = NULL;
+		}
+	}
+	return;
+}
+
+DAT_RETURN do_rdma_write_with_msg(void)
+{
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_LMR_TRIPLET l_iov[MSG_IOV_COUNT];
+	DAT_RMR_TRIPLET r_iov;
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN ret;
+	int i;
+
+	printf("\n %d RDMA WRITE DATA with SEND MSG\n\n", getpid());
+
+	cookie.as_64 = 0x5555;
+
+	if (recv_msg_index >= MSG_BUF_COUNT)
+		return (DAT_ABORT);
+
+	/* get RMR information from previously received message */
+	r_iov = rmr_recv_msg[recv_msg_index - 1];
+
+	if (server)
+		strcpy((char *)sbuf, "server RDMA write data...");
+	else
+		strcpy((char *)sbuf, "client RDMA write data...");
+
+	for (i = 0; i < MSG_IOV_COUNT; i++) {
+		l_iov[i].lmr_context = lmr_context_send;
+		l_iov[i].segment_length = buf_len / MSG_IOV_COUNT;
+		l_iov[i].virtual_address = (DAT_VADDR) (uintptr_t)
+		    (&sbuf[l_iov[i].segment_length * i]);
+
+		LOGPRINTF("%d rdma_write iov[%d] buf=%p,len=%d\n",
+			  getpid(), i, &sbuf[l_iov[i].segment_length * i],
+			  l_iov[i].segment_length);
+	}
+
+	start = get_time();
+	for (i = 0; i < burst; i++) {
+		cookie.as_64 = 0x9999;
+		ret = dat_ep_post_rdma_write(h_ep,	// ep_handle
+					     MSG_IOV_COUNT,	// num_segments
+					     l_iov,	// LMR
+					     cookie,	// user_cookie
+					     &r_iov,	// RMR
+					     DAT_COMPLETION_SUPPRESS_FLAG);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr,
+				"%d: ERROR: dat_ep_post_rdma_write() %s\n",
+				getpid(), DT_RetToString(ret));
+			return (DAT_ABORT);
+		}
+		LOGPRINTF("%d rdma_write # %d completed\n", getpid(), i + 1);
+	}
+
+	/*
+	 *  Send RMR information a 2nd time to indicate completion
+	 *  NOTE: already swapped to network order in connect_ep
+	 */
+	printf("%d Sending RDMA WRITE completion message\n", getpid());
+
+	ret = send_msg(&rmr_send_msg,
+		       sizeof(DAT_RMR_TRIPLET),
+		       lmr_context_send_msg,
+		       cookie, DAT_COMPLETION_SUPPRESS_FLAG);
+
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error send_msg: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d send_msg completed\n", getpid());
+	}
+
+	/*
+	 *  Collect first event, write completion or the inbound recv 
+	 */
+	if (polling) {
+		while (dat_evd_dequeue(h_dto_rcv_evd, &event) ==
+		       DAT_QUEUE_EMPTY)
+			rdma_wr_poll_count++;
+	} else {
+		LOGPRINTF("%d waiting for message receive event\n", getpid());
+		if (use_cno) {
+			DAT_EVD_HANDLE evd = DAT_HANDLE_NULL;
+			ret = dat_cno_wait(h_dto_cno, DTO_TIMEOUT, &evd);
+			LOGPRINTF("%d cno wait return evd_handle=%p\n",
+				  getpid(), evd);
+			if (evd != h_dto_rcv_evd) {
+				fprintf(stderr,
+					"%d Error waiting on h_dto_cno: "
+					"evd != h_dto_rcv_evd\n", getpid());
+				return (ret);
+			}
+		}
+		/* use wait to dequeue */
+		ret =
+		    dat_evd_wait(h_dto_rcv_evd, DTO_TIMEOUT, 1, &event, &nmore);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d: ERROR: DTO dat_evd_wait() %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		}
+	}
+	stop = get_time();
+	time.rdma_wr = ((stop - start) * 1.0e6);
+
+	/* validate event number and status */
+	printf("%d inbound rdma_write; send message arrived!\n", getpid());
+	if (event.event_number != DAT_DTO_COMPLETION_EVENT) {
+		fprintf(stderr, "%d Error unexpected DTO event : %s\n",
+			getpid(), DT_EventToSTr(event.event_number));
+		return (DAT_ABORT);
+	}
+
+	if ((event.event_data.dto_completion_event_data.transfered_length !=
+	     sizeof(DAT_RMR_TRIPLET))
+	    || (event.event_data.dto_completion_event_data.user_cookie.as_64 !=
+		recv_msg_index)) {
+		fprintf(stderr,
+			"unexpected event data for receive: len=%d cookie=" F64x
+			" exp %d/%d\n",
+			(int)event.event_data.dto_completion_event_data.
+			transfered_length,
+			event.event_data.dto_completion_event_data.user_cookie.
+			as_64, (int)sizeof(DAT_RMR_TRIPLET), recv_msg_index);
+
+		return (DAT_ABORT);
+	}
+
+	/* swap received RMR msg: network order to host order */
+	r_iov = rmr_recv_msg[recv_msg_index];
+	rmr_recv_msg[recv_msg_index].virtual_address =
+	    ntohll(rmr_recv_msg[recv_msg_index].virtual_address);
+	rmr_recv_msg[recv_msg_index].segment_length =
+	    ntohl(rmr_recv_msg[recv_msg_index].segment_length);
+	rmr_recv_msg[recv_msg_index].rmr_context =
+	    ntohl(rmr_recv_msg[recv_msg_index].rmr_context);
+
+	printf("%d Received RMR from remote: "
+	       "r_iov: r_key_ctx=%x,va=" F64x ",len=0x%x\n",
+	       getpid(), rmr_recv_msg[recv_msg_index].rmr_context,
+	       rmr_recv_msg[recv_msg_index].virtual_address,
+	       rmr_recv_msg[recv_msg_index].segment_length);
+
+	LOGPRINTF("%d inbound rdma_write; send msg event SUCCESS!!\n",
+		  getpid());
+
+	printf("%d %s RDMA write buffer contains: %s\n",
+	       getpid(), server ? "SERVER:" : "CLIENT:", rbuf);
+
+	recv_msg_index++;
+
+	return (DAT_SUCCESS);
+}
+
+DAT_RETURN do_rdma_read_with_msg(void)
+{
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_LMR_TRIPLET l_iov;
+	DAT_RMR_TRIPLET r_iov;
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN ret;
+	int i;
+
+	printf("\n %d RDMA READ DATA with SEND MSG\n\n", getpid());
+
+	if (recv_msg_index >= MSG_BUF_COUNT)
+		return (DAT_ABORT);
+
+	/* get RMR information from previously received message */
+	r_iov = rmr_recv_msg[recv_msg_index - 1];
+
+	/* setup rdma read buffer to initial string to be overwritten */
+	strcpy((char *)sbuf, "blah, blah, blah\n");
+
+	if (server)
+		strcpy((char *)rbuf, "server RDMA read data...");
+	else
+		strcpy((char *)rbuf, "client RDMA read data...");
+
+	l_iov.lmr_context = lmr_context_send;
+	l_iov.virtual_address = (DAT_VADDR) (uintptr_t) sbuf;
+	l_iov.segment_length = buf_len;
+
+	for (i = 0; i < MAX_RDMA_RD; i++) {
+		cookie.as_64 = 0x9999;
+		start = get_time();
+		ret = dat_ep_post_rdma_read(h_ep,	// ep_handle
+					    1,	// num_segments
+					    &l_iov,	// LMR
+					    cookie,	// user_cookie
+					    &r_iov,	// RMR
+					    DAT_COMPLETION_DEFAULT_FLAG);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr,
+				"%d: ERROR: dat_ep_post_rdma_read() %s\n",
+				getpid(), DT_RetToString(ret));
+			return (DAT_ABORT);
+		}
+
+		if (polling) {
+			while (dat_evd_dequeue(h_dto_req_evd, &event) ==
+			       DAT_QUEUE_EMPTY)
+				rdma_rd_poll_count[i]++;
+		} else {
+			LOGPRINTF("%d waiting for rdma_read completion event\n",
+				  getpid());
+			if (use_cno) {
+				DAT_EVD_HANDLE evd = DAT_HANDLE_NULL;
+				ret =
+				    dat_cno_wait(h_dto_cno, DTO_TIMEOUT, &evd);
+				LOGPRINTF("%d cno wait return evd_handle=%p\n",
+					  getpid(), evd);
+				if (evd != h_dto_req_evd) {
+					fprintf(stderr,
+						"%d Error waiting on h_dto_cno: evd != h_dto_req_evd\n",
+						getpid());
+					return (DAT_ABORT);
+				}
+			}
+			/* use wait to dequeue */
+			ret =
+			    dat_evd_wait(h_dto_req_evd, DTO_TIMEOUT, 1, &event,
+					 &nmore);
+			if (ret != DAT_SUCCESS) {
+				fprintf(stderr,
+					"%d: ERROR: DTO dat_evd_wait() %s\n",
+					getpid(), DT_RetToString(ret));
+				return ret;
+			}
+		}
+		/* validate event number, len, cookie, and status */
+		if (event.event_number != DAT_DTO_COMPLETION_EVENT) {
+			fprintf(stderr, "%d: ERROR: DTO event number %s\n",
+				getpid(), DT_EventToSTr(event.event_number));
+			return (DAT_ABORT);
+		}
+		if ((event.event_data.dto_completion_event_data.
+		     transfered_length != buf_len)
+		    || (event.event_data.dto_completion_event_data.user_cookie.
+			as_64 != 0x9999)) {
+			fprintf(stderr,
+				"%d: ERROR: DTO len %d or cookie " F64x "\n",
+				getpid(),
+				event.event_data.dto_completion_event_data.
+				transfered_length,
+				event.event_data.dto_completion_event_data.
+				user_cookie.as_64);
+			return (DAT_ABORT);
+		}
+		if (event.event_data.dto_completion_event_data.status !=
+		    DAT_SUCCESS) {
+			fprintf(stderr, "%d: ERROR: DTO event status %s\n",
+				getpid(), DT_RetToString(ret));
+			return (DAT_ABORT);
+		}
+		stop = get_time();
+		time.rdma_rd[i] = ((stop - start) * 1.0e6);
+		time.rdma_rd_total += time.rdma_rd[i];
+
+		LOGPRINTF("%d rdma_read # %d completed\n", getpid(), i + 1);
+	}
+
+	/*
+	 *  Send RMR information a 3rd time to indicate completion
+	 *  NOTE: already swapped to network order in connect_ep
+	 */
+	printf("%d Sending RDMA read completion message\n", getpid());
+
+	ret = send_msg(&rmr_send_msg,
+		       sizeof(DAT_RMR_TRIPLET),
+		       lmr_context_send_msg,
+		       cookie, DAT_COMPLETION_SUPPRESS_FLAG);
+
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error send_msg: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d send_msg completed\n", getpid());
+	}
+
+	/*
+	 *  Collect first event, write completion or the inbound recv with immed
+	 */
+	printf("%d Waiting for inbound message....\n", getpid());
+	if (polling) {
+		while (dat_evd_dequeue(h_dto_rcv_evd, &event) ==
+		       DAT_QUEUE_EMPTY) ;
+	} else {
+		LOGPRINTF("%d waiting for message receive event\n", getpid());
+		if (use_cno) {
+			DAT_EVD_HANDLE evd = DAT_HANDLE_NULL;
+			ret = dat_cno_wait(h_dto_cno, DTO_TIMEOUT, &evd);
+			LOGPRINTF("%d cno wait return evd_handle=%p\n",
+				  getpid(), evd);
+			if (evd != h_dto_rcv_evd) {
+				fprintf(stderr,
+					"%d Error waiting on h_dto_cno: evd != h_dto_rcv_evd\n",
+					getpid());
+				return (ret);
+			}
+		}
+		/* use wait to dequeue */
+		ret =
+		    dat_evd_wait(h_dto_rcv_evd, DTO_TIMEOUT, 1, &event, &nmore);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d: ERROR: DTO dat_evd_wait() %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		}
+	}
+
+	/* validate event number and status */
+	printf("%d inbound rdma_read; send message arrived!\n", getpid());
+	if (event.event_number != DAT_DTO_COMPLETION_EVENT) {
+		fprintf(stderr, "%d Error unexpected DTO event : %s\n",
+			getpid(), DT_EventToSTr(event.event_number));
+		return (DAT_ABORT);
+	}
+
+	if ((event.event_data.dto_completion_event_data.transfered_length !=
+	     sizeof(DAT_RMR_TRIPLET))
+	    || (event.event_data.dto_completion_event_data.user_cookie.as_64 !=
+		recv_msg_index)) {
+
+		fprintf(stderr,
+			"unexpected event data for receive: len=%d cookie=" F64x
+			" exp %d/%d\n",
+			(int)event.event_data.dto_completion_event_data.
+			transfered_length,
+			event.event_data.dto_completion_event_data.user_cookie.
+			as_64, (int)sizeof(DAT_RMR_TRIPLET), recv_msg_index);
+
+		return (DAT_ABORT);
+	}
+
+	/* swap received RMR msg: network order to host order */
+	r_iov = rmr_recv_msg[recv_msg_index];
+	rmr_recv_msg[recv_msg_index].virtual_address =
+	    ntohll(rmr_recv_msg[recv_msg_index].virtual_address);
+	rmr_recv_msg[recv_msg_index].segment_length =
+	    ntohl(rmr_recv_msg[recv_msg_index].segment_length);
+	rmr_recv_msg[recv_msg_index].rmr_context =
+	    ntohl(rmr_recv_msg[recv_msg_index].rmr_context);
+
+	printf("%d Received RMR from remote: "
+	       "r_iov: r_key_ctx=%x,va=" F64x ",len=0x%x\n",
+	       getpid(), rmr_recv_msg[recv_msg_index].rmr_context,
+	       rmr_recv_msg[recv_msg_index].virtual_address,
+	       rmr_recv_msg[recv_msg_index].segment_length);
+
+	LOGPRINTF("%d inbound rdma_write; send msg event SUCCESS!!\n",
+		  getpid());
+
+	printf("%d %s RCV RDMA read buffer contains: %s\n",
+	       getpid(), server ? "SERVER:" : "CLIENT:", sbuf);
+
+	recv_msg_index++;
+
+	return (DAT_SUCCESS);
+}
+
+DAT_RETURN do_ping_pong_msg()
+{
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_DTO_COOKIE cookie;
+	DAT_LMR_TRIPLET l_iov;
+	DAT_RETURN ret;
+	int i;
+	char *snd_buf;
+	char *rcv_buf;
+
+	printf("\n %d PING DATA with SEND MSG\n\n", getpid());
+
+	snd_buf = sbuf;
+	rcv_buf = rbuf;
+
+	/* pre-post all buffers */
+	for (i = 0; i < burst; i++) {
+		burst_msg_posted++;
+		cookie.as_64 = i;
+		l_iov.lmr_context = lmr_context_recv;
+		l_iov.virtual_address = (DAT_VADDR) (uintptr_t) rcv_buf;
+		l_iov.segment_length = buf_len;
+
+		LOGPRINTF("%d Pre-posting Receive Message Buffers %p\n",
+			  getpid(), rcv_buf);
+
+		ret = dat_ep_post_recv(h_ep,
+				       1,
+				       &l_iov,
+				       cookie, DAT_COMPLETION_DEFAULT_FLAG);
+
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr,
+				"%d Error posting recv msg buffer: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Posted Receive Message Buffer %p\n",
+				  getpid(), rcv_buf);
+		}
+
+		/* next buffer */
+		rcv_buf += buf_len;
+	}
+#if defined(_WIN32) || defined(_WIN64)
+	Sleep(1000);
+#else
+	sleep(1);
+#endif
+
+	/* Initialize recv_buf and index to beginning */
+	rcv_buf = rbuf;
+	burst_msg_index = 0;
+
+	/* client ping 0x55, server pong 0xAA in first byte */
+	start = get_time();
+	for (i = 0; i < burst; i++) {
+		/* walk the send and recv buffers */
+		if (!server) {
+			*snd_buf = 0x55;
+
+			LOGPRINTF("%d %s SND buffer %p contains: 0x%x len=%d\n",
+				  getpid(), server ? "SERVER:" : "CLIENT:",
+				  snd_buf, *snd_buf, buf_len);
+
+			ret = send_msg(snd_buf,
+				       buf_len,
+				       lmr_context_send,
+				       cookie, DAT_COMPLETION_SUPPRESS_FLAG);
+
+			if (ret != DAT_SUCCESS) {
+				fprintf(stderr, "%d Error send_msg: %s\n",
+					getpid(), DT_RetToString(ret));
+				return (ret);
+			} else {
+				LOGPRINTF("%d send_msg completed\n", getpid());
+			}
+		}
+
+		/* Wait for recv message */
+		if (polling) {
+			poll_count = 0;
+			LOGPRINTF("%d Polling for message receive event\n",
+				  getpid());
+			while (dat_evd_dequeue(h_dto_rcv_evd, &event) ==
+			       DAT_QUEUE_EMPTY)
+				poll_count++;
+		} else {
+			LOGPRINTF("%d waiting for message receive event\n",
+				  getpid());
+			if (use_cno) {
+				DAT_EVD_HANDLE evd = DAT_HANDLE_NULL;
+				ret =
+				    dat_cno_wait(h_dto_cno, DTO_TIMEOUT, &evd);
+				LOGPRINTF("%d cno wait return evd_handle=%p\n",
+					  getpid(), evd);
+				if (evd != h_dto_rcv_evd) {
+					fprintf(stderr,
+						"%d Error waiting on h_dto_cno: evd != h_dto_rcv_evd\n",
+						getpid());
+					return (ret);
+				}
+			}
+			/* use wait to dequeue */
+			ret =
+			    dat_evd_wait(h_dto_rcv_evd, DTO_TIMEOUT, 1, &event,
+					 &nmore);
+			if (ret != DAT_SUCCESS) {
+				fprintf(stderr,
+					"%d: ERROR: DTO dat_evd_wait() %s\n",
+					getpid(), DT_RetToString(ret));
+				return (ret);
+			}
+		}
+		/* start timer after first message arrives on server */
+		if (i == 0) {
+			start = get_time();
+		}
+		/* validate event number and status */
+		LOGPRINTF("%d inbound message; message arrived!\n", getpid());
+		if (event.event_number != DAT_DTO_COMPLETION_EVENT) {
+			fprintf(stderr, "%d Error unexpected DTO event : %s\n",
+				getpid(), DT_EventToSTr(event.event_number));
+			return (DAT_ABORT);
+		}
+		if ((event.event_data.dto_completion_event_data.
+		     transfered_length != buf_len)
+		    || (event.event_data.dto_completion_event_data.user_cookie.
+			as_64 != burst_msg_index)) {
+			fprintf(stderr,
+				"ERR: recv event: len=%d cookie=" F64x
+				" exp %d/%d\n",
+				(int)event.event_data.dto_completion_event_data.
+				transfered_length,
+				event.event_data.dto_completion_event_data.
+				user_cookie.as_64, (int)buf_len,
+				(int)burst_msg_index);
+
+			return (DAT_ABORT);
+		}
+
+		LOGPRINTF("%d %s RCV buffer %p contains: 0x%x len=%d\n",
+			  getpid(), server ? "SERVER:" : "CLIENT:",
+			  rcv_buf, *rcv_buf, buf_len);
+
+		burst_msg_index++;
+
+		/* If server, change data and send it back to client */
+		if (server) {
+			*snd_buf = 0xaa;
+
+			LOGPRINTF("%d %s SND buffer %p contains: 0x%x len=%d\n",
+				  getpid(), server ? "SERVER:" : "CLIENT:",
+				  snd_buf, *snd_buf, buf_len);
+
+			ret = send_msg(snd_buf,
+				       buf_len,
+				       lmr_context_send,
+				       cookie, DAT_COMPLETION_SUPPRESS_FLAG);
+
+			if (ret != DAT_SUCCESS) {
+				fprintf(stderr, "%d Error send_msg: %s\n",
+					getpid(), DT_RetToString(ret));
+				return (ret);
+			} else {
+				LOGPRINTF("%d send_msg completed\n", getpid());
+			}
+		}
+
+		/* next buffers */
+		rcv_buf += buf_len;
+		snd_buf += buf_len;
+	}
+	stop = get_time();
+	time.rtt = ((stop - start) * 1.0e6);
+
+	return (DAT_SUCCESS);
+}
+
+/* Register RDMA Receive buffer */
+DAT_RETURN register_rdma_memory(void)
+{
+	DAT_RETURN ret;
+	DAT_REGION_DESCRIPTION region;
+
+	region.for_va = rbuf;
+	start = get_time();
+	ret = dat_lmr_create(h_ia,
+			     DAT_MEM_TYPE_VIRTUAL,
+			     region,
+			     buf_len * (burst+1),
+			     h_pz,
+			     DAT_MEM_PRIV_ALL_FLAG,
+			     DAT_VA_TYPE_VA,
+			     &h_lmr_recv,
+			     &lmr_context_recv,
+			     &rmr_context_recv,
+			     &registered_size_recv, &registered_addr_recv);
+	stop = get_time();
+	time.reg += ((stop - start) * 1.0e6);
+	time.total += time.reg;
+
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr,
+			"%d Error registering Receive RDMA buffer: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d Registered Receive RDMA Buffer %p\n",
+			  getpid(), region.for_va);
+	}
+
+	/* Register RDMA Send buffer */
+	region.for_va = sbuf;
+	ret = dat_lmr_create(h_ia,
+			     DAT_MEM_TYPE_VIRTUAL,
+			     region,
+			     buf_len * (burst + 1),
+			     h_pz,
+			     DAT_MEM_PRIV_ALL_FLAG,
+			     DAT_VA_TYPE_VA,
+			     &h_lmr_send,
+			     &lmr_context_send,
+			     &rmr_context_send,
+			     &registered_size_send, &registered_addr_send);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error registering send RDMA buffer: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d Registered Send RDMA Buffer %p\n",
+			  getpid(), region.for_va);
+	}
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * Unregister RDMA memory
+ */
+DAT_RETURN unregister_rdma_memory(void)
+{
+	DAT_RETURN ret;
+
+	/* Unregister Recv Buffer */
+	if (h_lmr_recv != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Unregister h_lmr %p \n", getpid(), h_lmr_recv);
+		start = get_time();
+		ret = dat_lmr_free(h_lmr_recv);
+		stop = get_time();
+		time.unreg += ((stop - start) * 1.0e6);
+		time.total += time.unreg;
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error deregistering recv mr: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Unregistered Recv Buffer\n", getpid());
+			h_lmr_recv = NULL;
+		}
+	}
+
+	/* Unregister Send Buffer */
+	if (h_lmr_send != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Unregister h_lmr %p \n", getpid(), h_lmr_send);
+		ret = dat_lmr_free(h_lmr_send);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error deregistering send mr: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Unregistered send Buffer\n", getpid());
+			h_lmr_send = NULL;
+		}
+	}
+	return DAT_SUCCESS;
+}
+
+ /*
+  * Create CNO, CR, CONN, and DTO events
+  */
+DAT_RETURN create_events(void)
+{
+	DAT_RETURN ret;
+	DAT_EVD_PARAM param;
+
+	/* create CNO */
+	if (use_cno) {
+		start = get_time();
+#if defined(_WIN32) || defined(_WIN64)
+		{
+			DAT_OS_WAIT_PROXY_AGENT pa = { NULL, NULL };
+			ret = dat_cno_create(h_ia, pa, &h_dto_cno);
+		}
+#else
+		ret =
+		    dat_cno_create(h_ia, DAT_OS_WAIT_PROXY_AGENT_NULL,
+				   &h_dto_cno);
+#endif
+		stop = get_time();
+		time.cnoc += ((stop - start) * 1.0e6);
+		time.total += time.cnoc;
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error dat_cno_create: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d cr_evd created, %p\n", getpid(),
+				  h_dto_cno);
+		}
+	}
+
+	/* create cr EVD */
+	start = get_time();
+	ret =
+	    dat_evd_create(h_ia, 10, DAT_HANDLE_NULL, DAT_EVD_CR_FLAG,
+			   &h_cr_evd);
+	stop = get_time();
+	time.evdc += ((stop - start) * 1.0e6);
+	time.total += time.evdc;
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_evd_create: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d cr_evd created %p\n", getpid(), h_cr_evd);
+	}
+
+	/* create conn EVD */
+	ret = dat_evd_create(h_ia,
+			     10,
+			     DAT_HANDLE_NULL,
+			     DAT_EVD_CONNECTION_FLAG, &h_conn_evd);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_evd_create: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d con_evd created %p\n", getpid(), h_conn_evd);
+	}
+
+	/* create dto SND EVD, with CNO if use_cno was set */
+	ret = dat_evd_create(h_ia,
+			     (MSG_BUF_COUNT + MAX_RDMA_RD + burst) * 2,
+			     h_dto_cno, DAT_EVD_DTO_FLAG, &h_dto_req_evd);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_evd_create REQ: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d dto_req_evd created %p\n", getpid(),
+			  h_dto_req_evd);
+	}
+
+	/* create dto RCV EVD, with CNO if use_cno was set */
+	ret = dat_evd_create(h_ia,
+			     MSG_BUF_COUNT + burst,
+			     h_dto_cno, DAT_EVD_DTO_FLAG, &h_dto_rcv_evd);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_evd_create RCV: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else {
+		LOGPRINTF("%d dto_rcv_evd created %p\n", getpid(),
+			  h_dto_rcv_evd);
+	}
+
+	/* query DTO req EVD and check size */
+	ret = dat_evd_query(h_dto_req_evd, DAT_EVD_FIELD_EVD_QLEN, &param);
+	if (ret != DAT_SUCCESS) {
+		fprintf(stderr, "%d Error dat_evd_query request evd: %s\n",
+			getpid(), DT_RetToString(ret));
+		return (ret);
+	} else if (param.evd_qlen < (MSG_BUF_COUNT + MAX_RDMA_RD + burst) * 2) {
+		fprintf(stderr, "%d Error dat_evd qsize too small: %d < %d\n",
+			getpid(), param.evd_qlen,
+			(MSG_BUF_COUNT + MAX_RDMA_RD + burst) * 2);
+		return (ret);
+	}
+
+	LOGPRINTF("%d dto_req_evd QLEN - requested %d and actual %d\n",
+		  getpid(), (MSG_BUF_COUNT + MAX_RDMA_RD + burst) * 2,
+		  param.evd_qlen);
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * Destroy CR, CONN, CNO, and DTO events
+ */
+
+DAT_RETURN destroy_events(void)
+{
+	DAT_RETURN ret;
+
+	/* free cr EVD */
+	if (h_cr_evd != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Free cr EVD %p \n", getpid(), h_cr_evd);
+		ret = dat_evd_free(h_cr_evd);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error freeing cr EVD: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Freed cr EVD\n", getpid());
+			h_cr_evd = DAT_HANDLE_NULL;
+		}
+	}
+
+	/* free conn EVD */
+	if (h_conn_evd != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Free conn EVD %p \n", getpid(), h_conn_evd);
+		ret = dat_evd_free(h_conn_evd);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error freeing conn EVD: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Freed conn EVD\n", getpid());
+			h_conn_evd = DAT_HANDLE_NULL;
+		}
+	}
+
+	/* free RCV dto EVD */
+	if (h_dto_rcv_evd != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Free RCV dto EVD %p \n", getpid(), h_dto_rcv_evd);
+		start = get_time();
+		ret = dat_evd_free(h_dto_rcv_evd);
+		stop = get_time();
+		time.evdf += ((stop - start) * 1.0e6);
+		time.total += time.evdf;
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error freeing dto EVD: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Freed dto EVD\n", getpid());
+			h_dto_rcv_evd = DAT_HANDLE_NULL;
+		}
+	}
+
+	/* free REQ dto EVD */
+	if (h_dto_req_evd != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Free REQ dto EVD %p \n", getpid(), h_dto_req_evd);
+		ret = dat_evd_free(h_dto_req_evd);
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error freeing dto EVD: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Freed dto EVD\n", getpid());
+			h_dto_req_evd = DAT_HANDLE_NULL;
+		}
+	}
+
+	/* free CNO */
+	if (h_dto_cno != DAT_HANDLE_NULL) {
+		LOGPRINTF("%d Free dto CNO %p \n", getpid(), h_dto_cno);
+		start = get_time();
+		ret = dat_cno_free(h_dto_cno);
+		stop = get_time();
+		time.cnof += ((stop - start) * 1.0e6);
+		time.total += time.cnof;
+		if (ret != DAT_SUCCESS) {
+			fprintf(stderr, "%d Error freeing dto CNO: %s\n",
+				getpid(), DT_RetToString(ret));
+			return (ret);
+		} else {
+			LOGPRINTF("%d Freed dto CNO\n", getpid());
+			h_dto_cno = DAT_HANDLE_NULL;
+		}
+	}
+	return DAT_SUCCESS;
+}
+
+/*
+ * Map DAT_RETURN values to readable strings,
+ * but don't assume the values are zero-based or contiguous.
+ */
+char errmsg[512] = { 0 };
+const char *DT_RetToString(DAT_RETURN ret_value)
+{
+	const char *major_msg, *minor_msg;
+
+	dat_strerror(ret_value, &major_msg, &minor_msg);
+
+	strcpy(errmsg, major_msg);
+	strcat(errmsg, " ");
+	strcat(errmsg, minor_msg);
+
+	return errmsg;
+}
+
+/*
+ * Map DAT_EVENT_CODE values to readable strings
+ */
+const char *DT_EventToSTr(DAT_EVENT_NUMBER event_code)
+{
+	unsigned int i;
+	static struct {
+		const char *name;
+		DAT_RETURN value;
+	} dat_events[] = {
+#   define DATxx(x) { # x, x }
+		DATxx(DAT_DTO_COMPLETION_EVENT),
+		    DATxx(DAT_RMR_BIND_COMPLETION_EVENT),
+		    DATxx(DAT_CONNECTION_REQUEST_EVENT),
+		    DATxx(DAT_CONNECTION_EVENT_ESTABLISHED),
+		    DATxx(DAT_CONNECTION_EVENT_PEER_REJECTED),
+		    DATxx(DAT_CONNECTION_EVENT_NON_PEER_REJECTED),
+		    DATxx(DAT_CONNECTION_EVENT_ACCEPT_COMPLETION_ERROR),
+		    DATxx(DAT_CONNECTION_EVENT_DISCONNECTED),
+		    DATxx(DAT_CONNECTION_EVENT_BROKEN),
+		    DATxx(DAT_CONNECTION_EVENT_TIMED_OUT),
+		    DATxx(DAT_CONNECTION_EVENT_UNREACHABLE),
+		    DATxx(DAT_ASYNC_ERROR_EVD_OVERFLOW),
+		    DATxx(DAT_ASYNC_ERROR_IA_CATASTROPHIC),
+		    DATxx(DAT_ASYNC_ERROR_EP_BROKEN),
+		    DATxx(DAT_ASYNC_ERROR_TIMED_OUT),
+		    DATxx(DAT_ASYNC_ERROR_PROVIDER_INTERNAL_ERROR),
+		    DATxx(DAT_SOFTWARE_EVENT)
+#   undef DATxx
+	};
+#   define NUM_EVENTS (sizeof(dat_events)/sizeof(dat_events[0]))
+
+	for (i = 0; i < NUM_EVENTS; i++) {
+		if (dat_events[i].value == event_code) {
+			return (dat_events[i].name);
+		}
+	}
+
+	return ("Invalid_DAT_EVENT_NUMBER");
+}
+
+void print_usage(void)
+{
+	printf("\n DAPL USAGE \n\n");
+	printf("s: server\n");
+	printf("t: performance times\n");
+	printf("c: use cno\n");
+	printf("v: verbose\n");
+	printf("p: polling\n");
+	printf("d: delay before accept\n");
+	printf("b: buf length to allocate\n");
+	printf("B: burst count, rdma and msgs \n");
+	printf("h: hostname/address of server, specified on client\n");
+	printf("P: provider name (default = OpenIB-cma)\n");
+	printf("\n");
+}
+
diff --git a/test/dtest/dtestx.c b/test/dtest/dtestx.c
new file mode 100755
index 0000000..2d062f1
--- /dev/null
+++ b/test/dtest/dtestx.c
@@ -0,0 +1,1298 @@
+/*
+ * Copyright (c) 2007-2008 Intel Corporation.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id: $
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#if defined(_WIN32) || defined(_WIN64)
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <io.h>
+#include <process.h>
+#include <complib/cl_types.h>
+#include "..\..\..\..\etc\user\getopt.c"
+#define __BYTE_ORDER __LITTLE_ENDIAN
+
+#define F64x "%I64x"
+#define F64u "%I64u"
+#define DAPL_PROVIDER "ibnic0v2"
+#else
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <inttypes.h>
+#include <string.h>
+#include <unistd.h>
+
+#define DAPL_PROVIDER "ofa-v2-ib0"
+#define F64x "%"PRIx64""
+#define F64u "%"PRIu64""
+
+#endif
+
+#include "dat2/udat.h"
+#include "dat2/dat_ib_extensions.h"
+
+int disconnect_ep(void);
+
+#define _OK(status, str) \
+{\
+	const char  *maj_msg, *min_msg;\
+	if (status != DAT_SUCCESS) {\
+		dat_strerror(status, &maj_msg, &min_msg);\
+		fprintf(stderr, str " returned %s : %s\n", maj_msg, min_msg);\
+		dat_ia_close(ia, DAT_CLOSE_DEFAULT);\
+		exit(1);\
+	} else if (verbose) {\
+		printf("dtestx: %s success\n",str);\
+	}\
+}
+
+#define _OK2(status, str)\
+{\
+	const char  *maj_msg, *min_msg;\
+	if (status != DAT_SUCCESS) {\
+		dat_strerror(status, &maj_msg, &min_msg);\
+		fprintf(stderr, str " returned %s : %s\n", maj_msg, min_msg);\
+		dat_ia_close(ia, DAT_CLOSE_DEFAULT);\
+		exit(1);\
+	} else if (verbose) {\
+		printf("dtestx: %s\n",str);\
+	}\
+}
+
+/* byte swap helpers from Complib */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define ntoh16(x) (uint16_t)( \
+        (((uint16_t)(x) & 0x00FF) << 8) | \
+        (((uint16_t)(x) & 0xFF00) >> 8))
+#define hton16(x) ntoh16(x)
+#define ntoh32(x) (uint32_t)( \
+        (((uint32_t)(x) & 0x000000FF) << 24)| \
+        (((uint32_t)(x) & 0x0000FF00) << 8) | \
+        (((uint32_t)(x) & 0x00FF0000) >> 8) | \
+        (((uint32_t)(x) & 0xFF000000) >> 24))
+#define hton32(x) ntoh32(x)
+#define ntoh64(x) (uint64_t)( \
+        (((uint64_t)x & 0x00000000000000FFULL) << 56) | \
+        (((uint64_t)x & 0x000000000000FF00ULL) << 40) | \
+        (((uint64_t)x & 0x0000000000FF0000ULL) << 24) | \
+        (((uint64_t)x & 0x00000000FF000000ULL) << 8 ) | \
+        (((uint64_t)x & 0x000000FF00000000ULL) >> 8 ) | \
+        (((uint64_t)x & 0x0000FF0000000000ULL) >> 24) | \
+        (((uint64_t)x & 0x00FF000000000000ULL) >> 40) | \
+        (((uint64_t)x & 0xFF00000000000000ULL) >> 56))
+#define hton64(x) ntoh64(x)
+#elif __BYTE_ORDER == __BIG_ENDIAN
+#define hton16(x) (x)
+#define ntoh16(x) (x)
+#define hton32(x) (x)
+#define ntoh32(x) (x)
+#define hton64(x) (x)
+#define ntoh64(x) (x)
+#endif				/* __BYTE_ORDER == __BIG_ENDIAN */
+
+#define MIN(a, b) ((a < b) ? (a) : (b))
+#define MAX(a, b) ((a > b) ? (a) : (b))
+
+#define DTO_TIMEOUT       (1000*1000*5)
+#define CONN_TIMEOUT      (1000*1000*30)
+#define SERVER_TIMEOUT    (DAT_TIMEOUT_INFINITE)
+#define CLIENT_ID		31111
+#define SERVER_ID		31112
+#define BUF_SIZE		256
+#define BUF_SIZE_ATOMIC		8
+#define REG_MEM_COUNT		10
+#define SND_RDMA_BUF_INDEX	0
+#define RCV_RDMA_BUF_INDEX	1
+#define SEND_BUF_INDEX		2
+#define RECV_BUF_INDEX		3
+#define MAX_EP_COUNT		8
+
+DAT_VADDR *atomic_buf;
+DAT_LMR_HANDLE lmr_atomic;
+DAT_LMR_CONTEXT lmr_atomic_context;
+DAT_RMR_CONTEXT rmr_atomic_context;
+DAT_VLEN reg_atomic_size;
+DAT_VADDR reg_atomic_addr;
+DAT_LMR_HANDLE lmr[REG_MEM_COUNT * MAX_EP_COUNT];
+DAT_LMR_CONTEXT lmr_context[REG_MEM_COUNT * MAX_EP_COUNT];
+DAT_RMR_TRIPLET rmr[REG_MEM_COUNT * MAX_EP_COUNT];
+DAT_RMR_CONTEXT rmr_context[REG_MEM_COUNT * MAX_EP_COUNT];
+DAT_VLEN reg_size[REG_MEM_COUNT * MAX_EP_COUNT];
+DAT_VADDR reg_addr[REG_MEM_COUNT * MAX_EP_COUNT];
+DAT_RMR_TRIPLET *buf[REG_MEM_COUNT * MAX_EP_COUNT];
+DAT_EP_HANDLE ep[MAX_EP_COUNT];
+DAT_EVD_HANDLE async_evd = DAT_HANDLE_NULL;
+DAT_IA_HANDLE ia = DAT_HANDLE_NULL;
+DAT_PZ_HANDLE pz = DAT_HANDLE_NULL;
+DAT_EVD_HANDLE cr_evd = DAT_HANDLE_NULL;
+DAT_EVD_HANDLE con_evd = DAT_HANDLE_NULL;
+DAT_EVD_HANDLE dto_evd = DAT_HANDLE_NULL;
+DAT_PSP_HANDLE psp = DAT_HANDLE_NULL;
+int server = 1;
+int remote_host = 0;
+int ud_test = 0;
+int multi_eps = 0;
+int buf_size = BUF_SIZE;
+int msg_size = sizeof(DAT_RMR_TRIPLET);
+char provider[64] = DAPL_PROVIDER;
+char hostname[256] = { 0 };
+DAT_IB_ADDR_HANDLE remote_ah[MAX_EP_COUNT];
+int eps = 1;
+int verbose = 0;
+int counters = 0;
+int counters_ok = 0;
+
+#define LOGPRINTF if (verbose) printf
+
+void print_usage(void)
+{
+	printf("\n dtestx usage \n\n");
+	printf("v: verbose\n");
+	printf("p: print counters\n");
+	printf("u  unreliable datagram test\n");
+	printf("U: unreliable datagram test, UD endpoint count\n");
+	printf("m  unreliable datagram test, multiple Server endpoints\n");
+	printf("b: buf length to allocate\n");
+	printf("h: hostname/address of Server, client and UDP server\n");
+	printf("c: Client\n");
+	printf("s: Server, default\n");
+	printf("P: provider name (default = ofa-v2-ib0)\n");
+	printf("\n");
+}
+
+#if defined(_WIN32) || defined(_WIN64)
+static void sleep(int secs)
+{
+	Sleep(secs * 1000);
+}
+
+#define _WSACleanup() WSACleanup()
+#else
+#define	_WSACleanup()
+#endif
+
+void
+send_msg(void *data,
+	 DAT_COUNT size,
+	 DAT_LMR_CONTEXT context,
+	 DAT_DTO_COOKIE cookie, DAT_COMPLETION_FLAGS flags)
+{
+	DAT_LMR_TRIPLET iov;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_RETURN status;
+	int i, ep_idx = 0, ah_idx = 0;
+	DAT_DTO_COMPLETION_EVENT_DATA *dto_event =
+	    &event.event_data.dto_completion_event_data;
+
+	iov.lmr_context = context;
+	iov.virtual_address = (DAT_VADDR) (uintptr_t) data;
+	iov.segment_length = (DAT_VLEN) size;
+
+	for (i = 0; i < eps; i++) {
+		if (ud_test) {
+			/* 
+			 * Client and Server: ep[0] and ah[0] on single 
+			 * and ep[i] on multiple (-m) endpoint options. 
+			 */
+			if (multi_eps) {
+				ep_idx = i;
+				ah_idx = server ? 0 : i;
+			}
+			printf("%s sending on ep=%p to remote_ah: ah=%p"
+			       " qpn=0x%x addr=%s\n",
+			       server ? "Server" : "Client", ep[ep_idx],
+			       remote_ah[ah_idx].ah,
+			       remote_ah[ah_idx].qpn,
+			       inet_ntoa(((struct sockaddr_in *)
+					  &remote_ah[ah_idx].ia_addr)->
+					 sin_addr));
+
+			/* client expects all data in on first EP */
+			status = dat_ib_post_send_ud(ep[ep_idx],
+						     1,
+						     &iov,
+						     &remote_ah[ah_idx],
+						     cookie, flags);
+
+		} else {
+			status = dat_ep_post_send(ep[0], 1, &iov,
+						  cookie, flags);
+		}
+		_OK(status, "dat_ep_post_send");
+
+		if (!(flags & DAT_COMPLETION_SUPPRESS_FLAG)) {
+			status = dat_evd_wait(dto_evd, DTO_TIMEOUT,
+					      1, &event, &nmore);
+			_OK(status, "dat_evd_wait after dat_ep_post_send");
+
+			if (event.event_number != DAT_DTO_COMPLETION_EVENT &&
+			    ud_test && event.event_number != DAT_IB_DTO_EVENT) {
+				printf("unexpected event waiting post_send "
+				       "completion - 0x%x\n",
+				       event.event_number);
+				exit(1);
+			}
+			_OK(dto_event->status, "event status for post_send");
+		}
+	}
+}
+
+/* RC - Server only, UD - Server and Client, one per EP */
+void process_cr(int idx)
+{
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_RETURN status;
+	int pdata;
+	DAT_CR_HANDLE cr = DAT_HANDLE_NULL;
+	DAT_CONN_QUAL exp_qual = server ? SERVER_ID : CLIENT_ID;
+	DAT_CR_PARAM cr_param;
+	DAT_CR_ARRIVAL_EVENT_DATA *cr_event =
+	    &event.event_data.cr_arrival_event_data;
+
+	LOGPRINTF("%s waiting for connect[%d] request\n",
+		  server ? "Server" : "Client", idx);
+
+	status = dat_evd_wait(cr_evd, SERVER_TIMEOUT, 1, &event, &nmore);
+	_OK(status, "CR dat_evd_wait");
+
+	if (event.event_number != DAT_CONNECTION_REQUEST_EVENT &&
+	    (ud_test && event.event_number !=
+	     DAT_IB_UD_CONNECTION_REQUEST_EVENT)) {
+		printf("unexpected event,!conn req: 0x%x\n",
+		       event.event_number);
+		exit(1);
+	}
+
+	if ((cr_event->conn_qual != exp_qual) ||
+	    (cr_event->sp_handle.psp_handle != psp)) {
+		printf("wrong cr event data\n");
+		exit(1);
+	}
+
+	cr = cr_event->cr_handle;
+	status = dat_cr_query(cr, DAT_CSP_FIELD_ALL, &cr_param);
+	_OK(status, "dat_cr_query");
+
+	/* use private data to select EP */
+	pdata = ntoh32(*((int *)cr_param.private_data));
+
+	LOGPRINTF("%s recvd pdata=0x%x, send pdata=0x%x\n",
+		  server ? "Server" : "Client", pdata,
+		  *(int *)cr_param.private_data);
+
+	status = dat_cr_accept(cr, ep[pdata], 4, cr_param.private_data);
+	_OK(status, "dat_cr_accept");
+
+	printf("%s accepted CR on EP[%d]=%p\n",
+	       server ? "Server" : "Client", pdata, ep[pdata]);
+}
+
+/* RC - Client and Server: 1, UD - Client: 1 per EP, Server: 2 per EP's */
+void process_conn(int idx)
+{
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_RETURN status;
+	int pdata;
+	DAT_IB_EXTENSION_EVENT_DATA *ext_event = (DAT_IB_EXTENSION_EVENT_DATA *)
+	    & event.event_extension_data[0];
+	DAT_CONNECTION_EVENT_DATA *conn_event =
+	    &event.event_data.connect_event_data;
+
+	LOGPRINTF("%s waiting for connect[%d] establishment\n",
+		  server ? "Server" : "Client", idx);
+
+	status = dat_evd_wait(con_evd, CONN_TIMEOUT, 1, &event, &nmore);
+	_OK(status, "CONN dat_evd_wait");
+
+	LOGPRINTF("%s got connect[%d] event, pdata %p sz=%d\n",
+		  server ? "Server" : "Client", idx,
+		  conn_event->private_data, conn_event->private_data_size);
+
+	/* Waiting on CR's or CONN_EST */
+	if (event.event_number != DAT_CONNECTION_EVENT_ESTABLISHED &&
+	    (ud_test && event.event_number !=
+	     DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED)) {
+		printf("unexpected event, !conn established: 0x%x\n",
+		       event.event_number);
+		exit(1);
+	}
+
+	/* RC or PASSIVE CONN_EST we are done */
+	if (!ud_test)
+		return;
+
+	/* store each remote_ah according to remote EP index */
+	pdata = ntoh32(*((int *)conn_event->private_data));
+	LOGPRINTF(" Client got private data=0x%x\n", pdata);
+
+	/* UD, get AH for sends. 
+	 * NOTE: bi-directional AH resolution results in a CONN_EST
+	 * for both outbound connect and inbound CR.
+	 * Use Active CONN_EST which includes server's CR
+	 * pdata for remote_ah idx to send on and ignore PASSIVE CONN_EST.
+	 *
+	 * DAT_IB_UD_PASSIVE_REMOTE_AH == passive side CONN_EST
+	 * DAT_IB_UD_REMOTE_AH == active side CONN_EST
+	 */
+	if (ext_event->type == DAT_IB_UD_REMOTE_AH) {
+		remote_ah[pdata] = ext_event->remote_ah;
+		printf("remote_ah[%d]: ah=%p, qpn=0x%x "
+		       "addr=%s\n",
+		       pdata, remote_ah[pdata].ah,
+		       remote_ah[pdata].qpn, inet_ntoa(((struct sockaddr_in *)
+							&remote_ah[pdata].
+							ia_addr)->sin_addr));
+
+	} else if (ext_event->type != DAT_IB_UD_PASSIVE_REMOTE_AH) {
+		printf("unexpected UD ext_event type: 0x%x\n", ext_event->type);
+		exit(1);
+	}
+}
+
+int connect_ep(char *hostname)
+{
+	DAT_SOCK_ADDR remote_addr;
+	DAT_EP_ATTR ep_attr;
+	DAT_RETURN status;
+	DAT_REGION_DESCRIPTION region;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_LMR_TRIPLET iov;
+	DAT_RMR_TRIPLET *r_iov;
+	DAT_DTO_COOKIE cookie;
+	DAT_CONN_QUAL conn_qual;
+	DAT_BOOLEAN in, out;
+	int i, ii, pdata, ctx;
+	DAT_PROVIDER_ATTR prov_attrs;
+	DAT_DTO_COMPLETION_EVENT_DATA *dto_event =
+	    &event.event_data.dto_completion_event_data;
+
+	status = dat_ia_open(provider, 8, &async_evd, &ia);
+	_OK(status, "dat_ia_open");
+
+	memset(&prov_attrs, 0, sizeof(prov_attrs));
+	status = dat_ia_query(ia, NULL, 0, NULL,
+			      DAT_PROVIDER_FIELD_ALL, &prov_attrs);
+	_OK(status, "dat_ia_query");
+
+	/* Print provider specific attributes */
+	for (i = 0; i < prov_attrs.num_provider_specific_attr; i++) {
+		LOGPRINTF(" Provider Specific Attribute[%d] %s=%s\n",
+			  i, prov_attrs.provider_specific_attr[i].name,
+			  prov_attrs.provider_specific_attr[i].value);
+
+		/* check for counter support */
+		status = strcmp(prov_attrs.provider_specific_attr[i].name,
+				"DAT_COUNTERS");
+		if (!status)
+			counters_ok = 1;
+	}
+
+	/* make sure provider supports counters */
+	if ((counters) && (!counters_ok)) {
+		printf("Disable dat_query_counters:"
+		       " Provider not built with counters\n");
+		counters = 0;
+	}
+
+	status = dat_pz_create(ia, &pz);
+	_OK(status, "dat_pz_create");
+
+	status = dat_evd_create(ia, eps * 2, DAT_HANDLE_NULL, DAT_EVD_CR_FLAG,
+				&cr_evd);
+	_OK(status, "dat_evd_create CR");
+	status = dat_evd_create(ia, eps * 2, DAT_HANDLE_NULL,
+				DAT_EVD_CONNECTION_FLAG, &con_evd);
+	_OK(status, "dat_evd_create CR");
+	status = dat_evd_create(ia, eps * 10, DAT_HANDLE_NULL, DAT_EVD_DTO_FLAG,
+				&dto_evd);
+	_OK(status, "dat_evd_create DTO");
+
+	memset(&ep_attr, 0, sizeof(ep_attr));
+	if (ud_test) {
+		msg_size += 40;
+		ep_attr.service_type = DAT_IB_SERVICE_TYPE_UD;
+		ep_attr.max_message_size = buf_size;
+		ep_attr.max_rdma_read_in = 0;
+		ep_attr.max_rdma_read_out = 0;
+	} else {
+		ep_attr.service_type = DAT_SERVICE_TYPE_RC;
+		ep_attr.max_rdma_size = 0x10000;
+		ep_attr.max_rdma_read_in = 4;
+		ep_attr.max_rdma_read_out = 4;
+	}
+	ep_attr.qos = 0;
+	ep_attr.recv_completion_flags = 0;
+	ep_attr.max_recv_dtos = eps * 10;
+	ep_attr.max_request_dtos = eps * 10;
+	ep_attr.max_recv_iov = 1;
+	ep_attr.max_request_iov = 1;
+	ep_attr.request_completion_flags = DAT_COMPLETION_DEFAULT_FLAG;
+	ep_attr.ep_transport_specific_count = 0;
+	ep_attr.ep_transport_specific = NULL;
+	ep_attr.ep_provider_specific_count = 0;
+	ep_attr.ep_provider_specific = NULL;
+
+	for (i = 0; i < eps; i++) {
+		status = dat_ep_create(ia, pz, dto_evd, dto_evd,
+				       con_evd, &ep_attr, &ep[i]);
+		_OK(status, "dat_ep_create");
+		LOGPRINTF(" create_ep[%d]=%p\n", i, ep[i]);
+	}
+
+	for (i = 0; i < REG_MEM_COUNT * eps; i++) {
+		buf[i] = (DAT_RMR_TRIPLET *) malloc(buf_size);
+		region.for_va = buf[i];
+		status = dat_lmr_create(ia,
+					DAT_MEM_TYPE_VIRTUAL,
+					region,
+					buf_size,
+					pz,
+					DAT_MEM_PRIV_ALL_FLAG |
+					DAT_IB_MEM_PRIV_REMOTE_ATOMIC,
+					DAT_VA_TYPE_VA,
+					&lmr[i],
+					&lmr_context[i],
+					&rmr_context[i],
+					&reg_size[i], &reg_addr[i]);
+		_OK(status, "dat_lmr_create");
+	}
+
+	/* register atomic return buffer for original data */
+	atomic_buf = (DAT_UINT64 *) malloc(BUF_SIZE_ATOMIC);
+	region.for_va = atomic_buf;
+	status = dat_lmr_create(ia,
+				DAT_MEM_TYPE_VIRTUAL,
+				region,
+				BUF_SIZE_ATOMIC,
+				pz,
+				DAT_MEM_PRIV_ALL_FLAG |
+				DAT_IB_MEM_PRIV_REMOTE_ATOMIC,
+				DAT_VA_TYPE_VA,
+				&lmr_atomic,
+				&lmr_atomic_context,
+				&rmr_atomic_context,
+				&reg_atomic_size, &reg_atomic_addr);
+	_OK(status, "dat_lmr_create atomic");
+
+	for (ii = 0; ii < eps; ii++) {
+		for (i = RECV_BUF_INDEX; i < REG_MEM_COUNT; i++) {
+			int ep_idx = 0;
+			cookie.as_64 = (ii * REG_MEM_COUNT) + i;
+			iov.lmr_context = lmr_context[(ii * REG_MEM_COUNT) + i];
+			iov.virtual_address =
+			    (DAT_VADDR) (uintptr_t) buf[(ii * REG_MEM_COUNT) +
+							i];
+			iov.segment_length = buf_size;
+			LOGPRINTF(" post_recv (%p) on ep[%d]=%p\n",
+				  buf[(ii * REG_MEM_COUNT) + i], ii, ep[ii]);
+			/* ep[0], unless testing Server and multi EP's */
+			if (server && multi_eps) {
+				ep_idx = ii;
+				cookie.as_64 = i;
+			}
+			status = dat_ep_post_recv(ep[ep_idx],
+						  1,
+						  &iov,
+						  cookie,
+						  DAT_COMPLETION_DEFAULT_FLAG);
+			_OK(status, "dat_ep_post_recv");
+		}
+	}
+	/* setup receive buffer to initial string to be overwritten */
+	strcpy((char *)buf[RCV_RDMA_BUF_INDEX], "blah, blah, blah\n");
+
+	/* ud can resolve_ah and connect both ways, same EP */
+	if (server || (!server && ud_test)) {
+		if (server) {
+			conn_qual = SERVER_ID;
+			strcpy((char *)buf[SND_RDMA_BUF_INDEX], "Server data");
+		} else {
+			conn_qual = CLIENT_ID;
+			strcpy((char *)buf[SND_RDMA_BUF_INDEX], "Client data");
+		}
+		status = dat_psp_create(ia,
+					conn_qual,
+					cr_evd, DAT_PSP_CONSUMER_FLAG, &psp);
+		_OK(status, "dat_psp_create");
+
+		/* Server always waits for first CR from Client */
+		if (server)
+			process_cr(0);
+
+	}
+
+	/* ud can resolve_ah and connect both ways */
+	if (!server || (server && ud_test)) {
+		struct addrinfo *target;
+
+		if (getaddrinfo(hostname, NULL, NULL, &target) != 0) {
+			printf("Error getting remote address.\n");
+			exit(1);
+		}
+
+		printf("Remote %s Name: %s \n",
+		       server ? "Client" : "Server", hostname);
+		printf("Remote %s Net Address: %s\n",
+		       server ? "Client" : "Server",
+		       inet_ntoa(((struct sockaddr_in *)
+				  target->ai_addr)->sin_addr));
+
+		remote_addr = *((DAT_IA_ADDRESS_PTR) target->ai_addr);
+		freeaddrinfo(target);
+		strcpy((char *)buf[SND_RDMA_BUF_INDEX], "Client written data");
+
+		/* one Client EP, multiple Server EPs, same conn_qual 
+		 * use private data to select EP on Server 
+		 */
+		for (i = 0; i < eps; i++) {
+			/* pdata selects Server EP, 
+			 * support both muliple Server and single EP's 
+			 */
+			if (multi_eps)
+				pdata = hton32(i);
+			else
+				pdata = 0;	/* just use first EP */
+
+			status = dat_ep_connect(ep[0],
+						&remote_addr,
+						(server ? CLIENT_ID :
+						 SERVER_ID), CONN_TIMEOUT, 4,
+						(DAT_PVOID) & pdata, 0,
+						DAT_CONNECT_DEFAULT_FLAG);
+			_OK(status, "dat_ep_connect");
+		}
+	}
+
+	/* UD: process CR's starting with 2nd on server, 1st for client */
+	if (ud_test) {
+		for (i = (server ? 1 : 0); i < eps; i++)
+			process_cr(i);
+	}
+
+	/* RC and UD: process CONN EST events */
+	for (i = 0; i < eps; i++)
+		process_conn(i);
+
+	/* UD: CONN EST events for CONN's and CR's */
+	if (ud_test) {
+		for (i = 0; i < eps; i++)
+			process_conn(i);
+	}
+
+	printf("Connected! %d endpoints\n", eps);
+
+	/*
+	 *  Setup our remote memory and tell the other side about it
+	 *  Swap to network order.
+	 */
+	r_iov = (DAT_RMR_TRIPLET *) buf[SEND_BUF_INDEX];
+	r_iov->rmr_context = hton32(rmr_context[RCV_RDMA_BUF_INDEX]);
+	r_iov->virtual_address =
+	    hton64((DAT_VADDR) (uintptr_t) buf[RCV_RDMA_BUF_INDEX]);
+	r_iov->segment_length = hton32(buf_size);
+
+	printf("Send RMR message: r_key_ctx=0x%x,va=" F64x ",len=0x%x\n",
+	       hton32(r_iov->rmr_context),
+	       hton64(r_iov->virtual_address), hton32(r_iov->segment_length));
+
+	send_msg(buf[SEND_BUF_INDEX],
+		 sizeof(DAT_RMR_TRIPLET),
+		 lmr_context[SEND_BUF_INDEX],
+		 cookie, DAT_COMPLETION_SUPPRESS_FLAG);
+
+	dat_ep_get_status(ep[0], NULL, &in, &out);
+	printf("EP[0] status: posted buffers: Req=%d, Rcv=%d\n", in, out);
+
+	/*
+	 *  Wait for their RMR
+	 */
+	for (i = 0, ctx = 0; i < eps; i++, ctx++) {
+		/* expected cookie, recv buf idx in every mem pool */
+		ctx = (ctx % REG_MEM_COUNT) ? ctx : ctx + RECV_BUF_INDEX;
+		LOGPRINTF("Waiting for remote to send RMR data\n");
+
+		status = dat_evd_wait(dto_evd, DTO_TIMEOUT, 1, &event, &nmore);
+		_OK(status, "dat_evd_wait after dat_ep_post_send");
+
+		if ((event.event_number != DAT_DTO_COMPLETION_EVENT) &&
+		    (ud_test && event.event_number != DAT_IB_DTO_EVENT)) {
+			printf("unexpected event waiting for RMR context "
+			       "- 0x%x\n", event.event_number);
+			exit(1);
+		}
+		_OK(dto_event->status, "event status for post_recv");
+
+		/* careful when checking cookies:
+		 * Client - receiving multi messages on a single EP 
+		 * Server - not receiving on multiple EP's
+		 */
+		if (!server || (server && !multi_eps)) {
+			if (dto_event->transfered_length != msg_size ||
+			    dto_event->user_cookie.as_64 != ctx) {
+				printf("unexpected event data on recv: len=%d"
+				       " cookie=" F64x " expected %d/%d\n",
+				       (int)dto_event->transfered_length,
+				       dto_event->user_cookie.as_64,
+				       msg_size, ctx);
+				exit(1);
+			}
+			/* Server - receiving one message each across many EP's */
+		} else {
+			if (dto_event->transfered_length != msg_size ||
+			    dto_event->user_cookie.as_64 != RECV_BUF_INDEX) {
+				printf("unexpected event data on recv: len=%d"
+				       "cookie=" F64x " expected %d/%d\n",
+				       (int)dto_event->transfered_length,
+				       dto_event->user_cookie.as_64,
+				       msg_size, RECV_BUF_INDEX);
+				exit(1);
+			}
+		}
+
+		/* swap RMR,address info to host order */
+		if (!server || (server && !multi_eps))
+			r_iov = (DAT_RMR_TRIPLET *) buf[ctx];
+		else
+			r_iov =
+			    (DAT_RMR_TRIPLET *) buf[(i * REG_MEM_COUNT) +
+						    RECV_BUF_INDEX];
+
+		if (ud_test)
+			r_iov = (DAT_RMR_TRIPLET *) ((char *)r_iov + 40);
+
+		r_iov->rmr_context = ntoh32(r_iov->rmr_context);
+		r_iov->virtual_address = ntoh64(r_iov->virtual_address);
+		r_iov->segment_length = ntoh32(r_iov->segment_length);
+
+		printf("Recv RMR message: r_iov(%p):"
+		       " r_key_ctx=%x,va=" F64x ",len=0x%x on EP=%p\n",
+		       r_iov, r_iov->rmr_context,
+		       r_iov->virtual_address,
+		       r_iov->segment_length, dto_event->ep_handle);
+	}
+	return (0);
+}
+
+int disconnect_ep(void)
+{
+	DAT_RETURN status;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	int i;
+
+	if (!ud_test) {
+		status = dat_ep_disconnect(ep[0], DAT_CLOSE_DEFAULT);
+		_OK2(status, "dat_ep_disconnect");
+
+		status = dat_evd_wait(con_evd, DAT_TIMEOUT_INFINITE, 1,
+				      &event, &nmore);
+		_OK(status, "dat_evd_wait");
+	}
+	if (psp) {
+		status = dat_psp_free(psp);
+		_OK2(status, "dat_psp_free");
+	}
+	for (i = 0; i < REG_MEM_COUNT * eps; i++) {
+		status = dat_lmr_free(lmr[i]);
+		_OK2(status, "dat_lmr_free");
+	}
+	if (lmr_atomic) {
+		status = dat_lmr_free(lmr_atomic);
+		_OK2(status, "dat_lmr_free_atomic");
+	}
+	for (i = 0; i < eps; i++) {
+		if (counters) {	/* examples of query and print */
+			int ii;
+			DAT_UINT64 ep_cntrs[DCNT_EP_ALL_COUNTERS];
+
+			dat_query_counters(ep[i], DCNT_EP_ALL_COUNTERS,
+					   ep_cntrs, 0);
+			printf(" EP[%d] Cntrs:", i);
+			for (ii = 0; ii < DCNT_EP_ALL_COUNTERS; ii++)
+				printf(" " F64u "", ep_cntrs[ii]);
+			printf("\n");
+			dat_print_counters(ep[i], DCNT_EP_ALL_COUNTERS, 0);
+		}
+		status = dat_ep_free(ep[i]);
+		_OK2(status, "dat_ep_free");
+	}
+	if (counters) {		/* examples of query and print */
+		int ii;
+		DAT_UINT64 evd_cntrs[DCNT_EVD_ALL_COUNTERS];
+
+		dat_query_counters(dto_evd, DCNT_EVD_ALL_COUNTERS,
+				   evd_cntrs, 0);
+		printf(" DTO_EVD Cntrs:");
+		for (ii = 0; ii < DCNT_EVD_ALL_COUNTERS; ii++)
+			printf(" " F64u "", evd_cntrs[ii]);
+		printf("\n");
+		dat_print_counters(dto_evd, DCNT_EVD_ALL_COUNTERS, 0);
+
+		dat_query_counters(con_evd, DCNT_EVD_ALL_COUNTERS,
+				   evd_cntrs, 0);
+		printf(" CONN_EVD Cntrs:");
+		for (ii = 0; ii < DCNT_EVD_ALL_COUNTERS; ii++)
+			printf(" " F64u "", evd_cntrs[ii]);
+		printf("\n");
+		dat_print_counters(con_evd, DCNT_EVD_ALL_COUNTERS, 0);
+
+		dat_query_counters(cr_evd, DCNT_EVD_ALL_COUNTERS, evd_cntrs, 0);
+		printf(" CR_EVD Cntrs:");
+		for (ii = 0; ii < DCNT_EVD_ALL_COUNTERS; ii++)
+			printf(" " F64u "", evd_cntrs[ii]);
+		printf("\n");
+		dat_print_counters(cr_evd, DCNT_EVD_ALL_COUNTERS, 0);
+	}
+	status = dat_evd_free(dto_evd);
+	_OK2(status, "dat_evd_free DTO");
+
+	status = dat_evd_free(con_evd);
+	_OK2(status, "dat_evd_free CON");
+
+	status = dat_evd_free(cr_evd);
+	_OK2(status, "dat_evd_free CR");
+
+	status = dat_pz_free(pz);
+	_OK2(status, "dat_pz_free");
+
+	if (counters) {		/* examples of query and print */
+		int ii;
+		DAT_UINT64 ia_cntrs[DCNT_IA_ALL_COUNTERS];
+
+		dat_query_counters(ia, DCNT_IA_ALL_COUNTERS, ia_cntrs, 0);
+		printf(" IA Cntrs:");
+		for (ii = 0; ii < DCNT_IA_ALL_COUNTERS; ii++)
+			printf(" " F64u "", ia_cntrs[ii]);
+		printf("\n");
+		dat_print_counters(ia, DCNT_IA_ALL_COUNTERS, 0);
+	}
+	status = dat_ia_close(ia, DAT_CLOSE_DEFAULT);
+	_OK2(status, "dat_ia_close");
+
+	return (0);
+}
+
+int do_immediate()
+{
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_LMR_TRIPLET iov;
+	DAT_RMR_TRIPLET r_iov;
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN status;
+	DAT_UINT32 immed_data;
+	DAT_UINT32 immed_data_recv = 0;
+	DAT_DTO_COMPLETION_EVENT_DATA *dto_event =
+	    &event.event_data.dto_completion_event_data;
+	DAT_IB_EXTENSION_EVENT_DATA *ext_event =
+	    (DAT_IB_EXTENSION_EVENT_DATA *) & event.event_extension_data[0];
+
+	printf("\nDoing RDMA WRITE IMMEDIATE DATA\n");
+
+	if (server) {
+		immed_data = 0x1111;
+	} else {
+		immed_data = 0x7777;
+	}
+
+	cookie.as_64 = 0x5555;
+
+	/* RMR info already swapped back to host order in connect_ep */
+	r_iov = *buf[RECV_BUF_INDEX];
+
+	iov.lmr_context = lmr_context[SND_RDMA_BUF_INDEX];
+	iov.virtual_address = (DAT_VADDR) (uintptr_t) buf[SND_RDMA_BUF_INDEX];
+	iov.segment_length = buf_size;
+
+	cookie.as_64 = 0x9999;
+
+	status = dat_ib_post_rdma_write_immed(ep[0],	// ep_handle
+					      1,	// segments
+					      &iov,	// LMR
+					      cookie,	// user_cookie
+					      &r_iov,	// RMR
+					      immed_data,
+					      DAT_COMPLETION_DEFAULT_FLAG);
+	_OK(status, "dat_ib_post_rdma_write_immed");
+
+	/*
+	 *  Collect first event, write completion or inbound recv with immed
+	 */
+	status = dat_evd_wait(dto_evd, DTO_TIMEOUT, 1, &event, &nmore);
+	_OK(status, "dat_evd_wait after dat_ib_post_rdma_write");
+	if (event.event_number != DAT_IB_DTO_EVENT) {
+		printf("unexpected event #0x%x waiting for WR-IMMED #0x%x\n",
+		       event.event_number, DAT_IB_DTO_EVENT);
+		exit(1);
+	}
+
+	if (nmore)
+		printf("%s() nmore %d\n", __FUNCTION__, nmore);
+	_OK(dto_event->status, "DTO event status");
+	if (ext_event->type == DAT_IB_RDMA_WRITE_IMMED) {
+		if ((dto_event->transfered_length != buf_size) ||
+		    (dto_event->user_cookie.as_64 != 0x9999)) {
+			printf
+			    ("unexpected event data for rdma_write_immed: len=%d "
+			     "cookie=0x%x\n", (int)dto_event->transfered_length,
+			     (int)dto_event->user_cookie.as_64);
+			exit(1);
+		}
+	} else if (ext_event->type == DAT_IB_RDMA_WRITE_IMMED_DATA) {
+		if ((dto_event->transfered_length != buf_size) ||
+		    (dto_event->user_cookie.as_64 != RECV_BUF_INDEX + 1)) {
+			printf
+			    ("unexpected event data of immediate write: len=%d "
+			     "cookie=" F64x " expected %d/%d\n",
+			     (int)dto_event->transfered_length,
+			     dto_event->user_cookie.as_64, (int)sizeof(int),
+			     RECV_BUF_INDEX + 1);
+			exit(1);
+		}
+
+		/* get immediate data from event */
+		immed_data_recv = ext_event->val.immed.data;
+	} else {
+		printf("unexpected extension type for event - 0x%x, 0x%x\n",
+		       event.event_number, ext_event->type);
+		exit(1);
+	}
+
+	/*
+	 * Collect second event, write completion or inbound recv with immed
+	 */
+	status = dat_evd_wait(dto_evd, DTO_TIMEOUT, 1, &event, &nmore);
+	_OK(status, "dat_evd_wait after dat_ib_post_rdma_write");
+	if (event.event_number != DAT_IB_DTO_EVENT) {
+		printf("unexpected event # waiting for WR-IMMED - 0x%x\n",
+		       event.event_number);
+		exit(1);
+	}
+
+	_OK(dto_event->status, "event status");
+	if (ext_event->type == DAT_IB_RDMA_WRITE_IMMED) {
+		if ((dto_event->transfered_length != buf_size) ||
+		    (dto_event->user_cookie.as_64 != 0x9999)) {
+			printf
+			    ("unexpected event data for rdma_write_immed: len=%d "
+			     "cookie=0x%x\n", (int)dto_event->transfered_length,
+			     (int)dto_event->user_cookie.as_64);
+			exit(1);
+		}
+	} else if (ext_event->type == DAT_IB_RDMA_WRITE_IMMED_DATA) {
+		if ((dto_event->transfered_length != buf_size) ||
+		    (dto_event->user_cookie.as_64 != RECV_BUF_INDEX + 1)) {
+			printf
+			    ("unexpected event data of immediate write: len=%d "
+			     "cookie=" F64x " expected %d/%d\n",
+			     (int)dto_event->transfered_length,
+			     dto_event->user_cookie.as_64, (int)sizeof(int),
+			     RECV_BUF_INDEX + 1);
+			exit(1);
+		}
+
+		/* get immediate data from event */
+		immed_data_recv = ext_event->val.immed.data;
+	} else {
+		printf("unexpected extension type for event - 0x%x, 0x%x\n",
+		       event.event_number, ext_event->type);
+		exit(1);
+	}
+
+	if ((server) && (immed_data_recv != 0x7777)) {
+		printf("ERROR: Server: unexpected imm_data_recv 0x%x/0x%x\n",
+		       0x7777, immed_data_recv);
+		exit(1);
+	} else if ((!server) && (immed_data_recv != 0x1111)) {
+		printf("ERROR: Client: unexpected imm_data_recv 0x%x/0x%x\n",
+		       0x1111, immed_data_recv);
+		exit(1);
+	}
+
+	if (server)
+		printf("Server received immed_data=0x%x\n", immed_data_recv);
+	else
+		printf("Client received immed_data=0x%x\n", immed_data_recv);
+
+	printf("rdma buffer %p contains: %s\n",
+	       buf[RCV_RDMA_BUF_INDEX], (char *)buf[RCV_RDMA_BUF_INDEX]);
+
+	printf("\n RDMA_WRITE_WITH_IMMEDIATE_DATA test - PASSED\n");
+	return (0);
+}
+
+int do_cmp_swap()
+{
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN status;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_LMR_TRIPLET l_iov;
+	DAT_RMR_TRIPLET r_iov;
+	volatile DAT_UINT64 *target = (DAT_UINT64 *) buf[RCV_RDMA_BUF_INDEX];
+	DAT_DTO_COMPLETION_EVENT_DATA *dto_event =
+	    &event.event_data.dto_completion_event_data;
+	DAT_IB_EXTENSION_EVENT_DATA *ext_event =
+	    (DAT_IB_EXTENSION_EVENT_DATA *) & event.event_extension_data[0];
+
+	printf("\nDoing CMP and SWAP\n");
+
+	/* RMR info already swapped back to host order in connect_ep */
+	r_iov = *buf[RECV_BUF_INDEX];
+
+	l_iov.lmr_context = lmr_atomic_context;
+	l_iov.virtual_address = (DAT_UINT64) (uintptr_t) atomic_buf;
+	l_iov.segment_length = BUF_SIZE_ATOMIC;
+
+	cookie.as_64 = 3333;
+
+	if (server) {
+		*target = 0x12345;
+		sleep(1);
+		/* Server does not compare and should not swap */
+		printf("dtx svr - starting cmp_swap\n");
+		status = dat_ib_post_cmp_and_swap(ep[0],
+						  (DAT_UINT64) 0x654321,
+						  (DAT_UINT64) 0x6789A,
+						  &l_iov,
+						  cookie,
+						  &r_iov,
+						  DAT_COMPLETION_DEFAULT_FLAG);
+		printf("dtx svr - done cmp_swap, chk status\n");
+	} else {
+		*target = 0x54321;
+		sleep(1);
+		printf("dtx cli - starting cmp_swap\n");
+		/* Client does compare and should swap */
+		status = dat_ib_post_cmp_and_swap(ep[0],
+						  (DAT_UINT64) 0x12345,
+						  (DAT_UINT64) 0x98765,
+						  &l_iov,
+						  cookie,
+						  &r_iov,
+						  DAT_COMPLETION_DEFAULT_FLAG);
+		printf("dtx cli - done cmp_swap, chk status\n");
+	}
+	_OK(status, "dat_ib_post_cmp_and_swap");
+	status = dat_evd_wait(dto_evd, DTO_TIMEOUT, 1, &event, &nmore);
+	_OK(status, "dat_evd_wait for compare and swap");
+	if (event.event_number != DAT_IB_DTO_EVENT) {
+		printf("unexpected event after post_cmp_and_swap: 0x%x\n",
+		       event.event_number);
+		exit(1);
+	}
+
+	_OK(dto_event->status, "event status for CMP and SWAP");
+	if (ext_event->type != DAT_IB_CMP_AND_SWAP) {
+		printf("unexpected event data of cmp_swap: type=%d cookie=%d "
+		       "original " F64x "\n",
+		       (int)ext_event->type,
+		       (int)dto_event->user_cookie.as_64, *atomic_buf);
+		exit(1);
+	}
+
+	sleep(2);		/* wait for other side to complete swap */
+
+	if (server) {
+		printf("Server got original data        = " F64x ", expected "
+		       "0x54321\n", *atomic_buf);
+		printf("Client final result (on Server) = " F64x ", expected "
+		       "0x98765\n", *target);
+
+		if (*atomic_buf != 0x54321 || *target != 0x98765) {
+			printf("ERROR: Server CMP_SWAP\n");
+			exit(1);
+		}
+	} else {
+		printf("Client got original data        = " F64x ", expected "
+		       "0x12345\n", *atomic_buf);
+		printf("Server final result (on Client) = 0x" F64x ", expected "
+		       "0x54321\n", *target);
+
+		if (*atomic_buf != 0x12345 || *target != 0x54321) {
+			printf("ERROR: Client CMP_SWAP\n");
+			exit(1);
+		}
+	}
+	printf("\n CMP_SWAP test - PASSED\n");
+	return (0);
+}
+
+int do_fetch_add()
+{
+	DAT_DTO_COOKIE cookie;
+	DAT_RETURN status;
+	DAT_EVENT event;
+	DAT_COUNT nmore;
+	DAT_LMR_TRIPLET l_iov;
+	DAT_RMR_TRIPLET r_iov;
+	volatile DAT_UINT64 *target = (DAT_UINT64 *) buf[RCV_RDMA_BUF_INDEX];
+	DAT_DTO_COMPLETION_EVENT_DATA *dto_event =
+	    &event.event_data.dto_completion_event_data;
+	DAT_IB_EXTENSION_EVENT_DATA *ext_event =
+	    (DAT_IB_EXTENSION_EVENT_DATA *) & event.event_extension_data[0];
+
+	printf("\nDoing FETCH and ADD\n");
+
+	/* RMR info already swapped back to host order in connect_ep */
+	r_iov = *buf[RECV_BUF_INDEX];
+
+	l_iov.lmr_context = lmr_atomic_context;
+	l_iov.virtual_address = (DAT_UINT64) (uintptr_t) atomic_buf;
+	l_iov.segment_length = BUF_SIZE_ATOMIC;
+
+	cookie.as_64 = 0x7777;
+	if (server) {
+		/* Wait for Client to finish cmp_swap */
+		while (*target != 0x98765)
+			sleep(1);
+		*target = 0x10;
+		sleep(1);
+		status = dat_ib_post_fetch_and_add(ep[0],
+						   (DAT_UINT64) 0x100,
+						   &l_iov,
+						   cookie,
+						   &r_iov,
+						   DAT_COMPLETION_DEFAULT_FLAG);
+	} else {
+		/* Wait for Server, no swap so nothing to check */
+		*target = 0x100;
+		sleep(1);
+		status = dat_ib_post_fetch_and_add(ep[0],
+						   (DAT_UINT64) 0x10,
+						   &l_iov,
+						   cookie,
+						   &r_iov,
+						   DAT_COMPLETION_DEFAULT_FLAG);
+	}
+	_OK(status, "dat_ib_post_fetch_and_add");
+	status = dat_evd_wait(dto_evd, DTO_TIMEOUT, 1, &event, &nmore);
+	_OK(status, "dat_evd_wait for fetch and add");
+	if (event.event_number != DAT_IB_DTO_EVENT) {
+		printf("unexpected event after post_fetch_and_add: 0x%x\n",
+		       event.event_number);
+		exit(1);
+	}
+
+	_OK(dto_event->status, "event status for FETCH and ADD");
+	if (ext_event->type != DAT_IB_FETCH_AND_ADD) {
+		printf("unexpected event data of fetch and add : type=%d "
+		       "cookie=%d original%d\n",
+		       (int)ext_event->type,
+		       (int)dto_event->user_cookie.as_64, (int)*atomic_buf);
+		exit(1);
+	}
+
+	if (server) {
+		printf("Client original data (on Server) = " F64x ", expected "
+		       "0x100\n", *atomic_buf);
+	} else {
+		printf("Server original data (on Client) = " F64x ", expected "
+		       "0x10\n", *atomic_buf);
+	}
+
+	sleep(1);
+
+	if (server) {
+		status = dat_ib_post_fetch_and_add(ep[0],
+						   (DAT_UINT64) 0x100,
+						   &l_iov,
+						   cookie,
+						   &r_iov,
+						   DAT_COMPLETION_DEFAULT_FLAG);
+	} else {
+		status = dat_ib_post_fetch_and_add(ep[0],
+						   (DAT_UINT64) 0x10,
+						   &l_iov,
+						   cookie,
+						   &r_iov,
+						   DAT_COMPLETION_DEFAULT_FLAG);
+	}
+
+	status = dat_evd_wait(dto_evd, DTO_TIMEOUT, 1, &event, &nmore);
+	_OK(status, "dat_evd_wait for second fetch and add");
+	if (event.event_number != DAT_IB_DTO_EVENT) {
+		printf("unexpected event after second post_fetch_and_add: "
+		       "0x%x\n", event.event_number);
+		exit(1);
+	}
+
+	_OK(dto_event->status, "event status for second FETCH and ADD");
+	if (ext_event->type != DAT_IB_FETCH_AND_ADD) {
+		printf("unexpected event data of second fetch and add : "
+		       "type=%d cookie=%d original%p\n",
+		       (int)ext_event->type,
+		       (int)dto_event->user_cookie.as_64, atomic_buf);
+		exit(1);
+	}
+
+	sleep(1);		/* wait for other side to complete fetch_add */
+
+	if (server) {
+		printf("Server got original data         = " F64x ", expected "
+		       "0x200\n", *atomic_buf);
+		printf("Client final result (on Server)  = " F64x ", expected "
+		       "0x30\n", *target);
+
+		if (*atomic_buf != 0x200 || *target != 0x30) {
+			printf("ERROR: Server FETCH_ADD\n");
+			exit(1);
+		}
+	} else {
+		printf("Server side original data        = " F64x ", expected "
+		       "0x20\n", *atomic_buf);
+		printf("Server final result (on Client)  = " F64x ", expected "
+		       "0x300\n", *target);
+
+		if (*atomic_buf != 0x20 || *target != 0x300) {
+			printf("ERROR: Server FETCH_ADD\n");
+			exit(1);
+		}
+	}
+	printf("\n FETCH_ADD test - PASSED\n");
+	return (0);
+}
+
+int main(int argc, char **argv)
+{
+	int rc;
+
+	/* parse arguments */
+	while ((rc = getopt(argc, argv, "csvumpU:h:b:P:")) != -1) {
+		switch (rc) {
+		case 'u':
+			ud_test = 1;
+			eps = MAX_EP_COUNT / 2;
+			break;
+		case 'm':
+			multi_eps = 1;
+			break;
+		case 'c':
+			server = 0;
+			break;
+		case 's':
+			server = 1;
+			break;
+		case 'p':
+			counters = 1;
+			break;
+		case 'h':
+			remote_host = 1;
+			strcpy(hostname, optarg);
+			break;
+		case 'b':
+			buf_size = atoi(optarg);
+			break;
+		case 'U':
+			ud_test = 1;
+			eps = MIN(atoi(optarg), MAX_EP_COUNT);
+			break;
+		case 'P':
+			strcpy(provider, optarg);
+			break;
+		case 'v':
+			verbose = 1;
+			break;
+		default:
+			print_usage();
+			exit(-12);
+		}
+	}
+
+#if defined(_WIN32) || defined(_WIN64)
+	{
+		WSADATA wsaData;
+		int i;
+
+		i = WSAStartup(MAKEWORD(2, 2), &wsaData);
+		if (i != 0) {
+			printf("%s WSAStartup(2.2) fail? (0x%x)\n", argv[0], i);
+			fflush(stdout);
+			exit(1);
+		}
+	}
+#endif
+	/* for non UD tests, -h is always client */
+	if (remote_host && !ud_test)
+		server = 0;
+
+	if (!server) {
+		printf("\nRunning as Client - %s %s %d endpoint(s)\n",
+		       provider, ud_test ? "UD test" : "", eps);
+	} else {
+		printf("\nRunning as Server - %s %s %d endpoint(s)\n",
+		       provider, ud_test ? "UD test" : "", eps);
+	}
+
+	/*
+	 * connect
+	 */
+	if (connect_ep(hostname)) {
+		_WSACleanup();
+		exit(1);
+	}
+	if (ud_test)
+		goto bail;
+
+	if (do_immediate()) {
+		_WSACleanup();
+		exit(1);
+	}
+	if (do_cmp_swap()) {
+		_WSACleanup();
+		exit(1);
+	}
+	if (do_fetch_add()) {
+		_WSACleanup();
+		exit(1);
+	}
+      bail:
+	rc = disconnect_ep();
+	_WSACleanup();
+
+	if (!rc)
+		printf("\n IB extension test - %s test PASSED\n\n",
+		       ud_test ? "UD" : "immed/atomic");
+	return rc;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/dapl.git



More information about the Pkg-ofed-commits mailing list