[Pkg-ofed-commits] [compat-dapl] 01/02: Imported Upstream version 1.2.19-OFED-1.5.2

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Fri Jul 18 18:24:33 UTC 2014


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

ana pushed a commit to branch master
in repository compat-dapl.

commit 4768cb21386c159b257f1da6f0f7078be9398ed2
Author: Ana Guerrero López <ana at ekaia.org>
Date:   Fri Jul 18 20:23:08 2014 +0200

    Imported Upstream version 1.2.19-OFED-1.5.2
---
 AUTHORS                                          |    16 +
 COPYING                                          |    28 +
 ChangeLog                                        |  2044 ++
 LICENSE.txt                                      |   235 +
 LICENSE2.txt                                     |    30 +
 LICENSE3.txt                                     |   340 +
 Makefile.am                                      |   426 +
 Makefile.in                                      |  3250 +++
 README                                           |   413 +
 aclocal.m4                                       |  7261 +++++++
 config.h.in                                      |    58 +
 config/compile                                   |   142 +
 config/config.guess                              |  1411 ++
 config/config.sub                                |  1500 ++
 config/depcomp                                   |   530 +
 config/install-sh                                |   323 +
 config/ltmain.sh                                 |  6911 +++++++
 config/missing                                   |   360 +
 configure                                        | 21740 +++++++++++++++++++++
 configure.in                                     |   102 +
 dapl.spec                                        |   204 +
 dapl.spec.in                                     |   204 +
 dapl/common/dapl_adapter_util.h                  |   278 +
 dapl/common/dapl_cno_util.c                      |   261 +
 dapl/common/dapl_cno_util.h                      |    66 +
 dapl/common/dapl_cookie.c                        |   396 +
 dapl/common/dapl_cookie.h                        |    76 +
 dapl/common/dapl_cr_accept.c                     |   252 +
 dapl/common/dapl_cr_callback.c                   |   588 +
 dapl/common/dapl_cr_handoff.c                    |    67 +
 dapl/common/dapl_cr_query.c                      |   104 +
 dapl/common/dapl_cr_reject.c                     |   142 +
 dapl/common/dapl_cr_util.c                       |   110 +
 dapl/common/dapl_cr_util.h                       |    58 +
 dapl/common/dapl_debug.c                         |   118 +
 dapl/common/dapl_ep_connect.c                    |   371 +
 dapl/common/dapl_ep_create.c                     |   343 +
 dapl/common/dapl_ep_create_with_srq.c            |   368 +
 dapl/common/dapl_ep_disconnect.c                 |   190 +
 dapl/common/dapl_ep_dup_connect.c                |   130 +
 dapl/common/dapl_ep_free.c                       |   212 +
 dapl/common/dapl_ep_get_status.c                 |   121 +
 dapl/common/dapl_ep_modify.c                     |   710 +
 dapl/common/dapl_ep_post_rdma_read.c             |   106 +
 dapl/common/dapl_ep_post_rdma_write.c            |   105 +
 dapl/common/dapl_ep_post_recv.c                  |   127 +
 dapl/common/dapl_ep_post_send.c                  |   101 +
 dapl/common/dapl_ep_query.c                      |   128 +
 dapl/common/dapl_ep_recv_query.c                 |    99 +
 dapl/common/dapl_ep_reset.c                      |   112 +
 dapl/common/dapl_ep_set_watermark.c              |   100 +
 dapl/common/dapl_ep_util.c                       |   590 +
 dapl/common/dapl_ep_util.h                       |    85 +
 dapl/common/dapl_evd_connection_callb.c          |   235 +
 dapl/common/dapl_evd_cq_async_error_callb.c      |    96 +
 dapl/common/dapl_evd_dequeue.c                   |   146 +
 dapl/common/dapl_evd_dto_callb.c                 |   168 +
 dapl/common/dapl_evd_free.c                      |   141 +
 dapl/common/dapl_evd_post_se.c                   |   104 +
 dapl/common/dapl_evd_qp_async_error_callb.c      |   146 +
 dapl/common/dapl_evd_resize.c                    |   144 +
 dapl/common/dapl_evd_un_async_error_callb.c      |    98 +
 dapl/common/dapl_evd_util.c                      |  1411 ++
 dapl/common/dapl_evd_util.h                      |   154 +
 dapl/common/dapl_get_consumer_context.c          |   102 +
 dapl/common/dapl_get_handle_type.c               |    89 +
 dapl/common/dapl_hash.c                          |   538 +
 dapl/common/dapl_hash.h                          |   109 +
 dapl/common/dapl_hca_util.c                      |   194 +
 dapl/common/dapl_hca_util.h                      |    60 +
 dapl/common/dapl_ia_close.c                      |    97 +
 dapl/common/dapl_ia_open.c                       |   515 +
 dapl/common/dapl_ia_query.c                      |   232 +
 dapl/common/dapl_ia_util.c                       |  1248 ++
 dapl/common/dapl_ia_util.h                       |   158 +
 dapl/common/dapl_init.h                          |    57 +
 dapl/common/dapl_llist.c                         |   384 +
 dapl/common/dapl_lmr_free.c                      |   140 +
 dapl/common/dapl_lmr_query.c                     |    90 +
 dapl/common/dapl_lmr_sync_rdma_read.c            |    85 +
 dapl/common/dapl_lmr_sync_rdma_write.c           |    85 +
 dapl/common/dapl_lmr_util.c                      |    98 +
 dapl/common/dapl_lmr_util.h                      |    63 +
 dapl/common/dapl_mr_util.c                       |   115 +
 dapl/common/dapl_mr_util.h                       |    96 +
 dapl/common/dapl_name_service.c                  |   286 +
 dapl/common/dapl_name_service.h                  |    61 +
 dapl/common/dapl_provider.c                      |   478 +
 dapl/common/dapl_provider.h                      |   108 +
 dapl/common/dapl_psp_create.c                    |   213 +
 dapl/common/dapl_psp_create_any.c                |   220 +
 dapl/common/dapl_psp_free.c                      |   155 +
 dapl/common/dapl_psp_query.c                     |   104 +
 dapl/common/dapl_pz_create.c                     |   105 +
 dapl/common/dapl_pz_free.c                       |    89 +
 dapl/common/dapl_pz_query.c                      |    91 +
 dapl/common/dapl_pz_util.c                       |   116 +
 dapl/common/dapl_pz_util.h                       |    51 +
 dapl/common/dapl_ring_buffer_util.c              |   356 +
 dapl/common/dapl_ring_buffer_util.h              |    78 +
 dapl/common/dapl_rmr_bind.c                      |   335 +
 dapl/common/dapl_rmr_create.c                    |   107 +
 dapl/common/dapl_rmr_free.c                      |    96 +
 dapl/common/dapl_rmr_query.c                     |    96 +
 dapl/common/dapl_rmr_util.c                      |    88 +
 dapl/common/dapl_rmr_util.h                      |    86 +
 dapl/common/dapl_rsp_create.c                    |   218 +
 dapl/common/dapl_rsp_free.c                      |   162 +
 dapl/common/dapl_rsp_query.c                     |   103 +
 dapl/common/dapl_set_consumer_context.c          |    90 +
 dapl/common/dapl_sp_util.c                       |   308 +
 dapl/common/dapl_sp_util.h                       |    63 +
 dapl/common/dapl_srq_create.c                    |   159 +
 dapl/common/dapl_srq_free.c                      |   133 +
 dapl/common/dapl_srq_post_recv.c                 |   130 +
 dapl/common/dapl_srq_query.c                     |   101 +
 dapl/common/dapl_srq_resize.c                    |   112 +
 dapl/common/dapl_srq_set_lw.c                    |   101 +
 dapl/common/dapl_srq_util.c                      |   149 +
 dapl/common/dapl_srq_util.h                      |    54 +
 dapl/common/dapl_timer_util.c                    |   337 +
 dapl/common/dapl_timer_util.h                    |    47 +
 dapl/include/dapl.h                              |  1164 ++
 dapl/include/dapl_debug.h                        |   140 +
 dapl/include/dapl_ipoib_names.h                  |   262 +
 dapl/include/dapl_vendor.h                       |   116 +
 dapl/openib_cma/dapl_ib_cm.c                     |  1270 ++
 dapl/openib_cma/dapl_ib_cq.c                     |   576 +
 dapl/openib_cma/dapl_ib_dto.h                    |   306 +
 dapl/openib_cma/dapl_ib_mem.c                    |   391 +
 dapl/openib_cma/dapl_ib_qp.c                     |   331 +
 dapl/openib_cma/dapl_ib_util.c                   |   951 +
 dapl/openib_cma/dapl_ib_util.h                   |   341 +
 dapl/openib_scm/dapl_ib_cm.c                     |  1482 ++
 dapl/openib_scm/dapl_ib_cq.c                     |   622 +
 dapl/openib_scm/dapl_ib_dto.h                    |   311 +
 dapl/openib_scm/dapl_ib_mem.c                    |   393 +
 dapl/openib_scm/dapl_ib_qp.c                     |   416 +
 dapl/openib_scm/dapl_ib_util.c                   |   577 +
 dapl/openib_scm/dapl_ib_util.h                   |   382 +
 dapl/udapl/dapl_cno_create.c                     |   105 +
 dapl/udapl/dapl_cno_free.c                       |    90 +
 dapl/udapl/dapl_cno_modify_agent.c               |    83 +
 dapl/udapl/dapl_cno_query.c                      |    92 +
 dapl/udapl/dapl_cno_wait.c                       |   133 +
 dapl/udapl/dapl_evd_clear_unwaitable.c           |    82 +
 dapl/udapl/dapl_evd_create.c                     |   194 +
 dapl/udapl/dapl_evd_disable.c                    |    80 +
 dapl/udapl/dapl_evd_enable.c                     |    94 +
 dapl/udapl/dapl_evd_modify_cno.c                 |   117 +
 dapl/udapl/dapl_evd_query.c                      |   114 +
 dapl/udapl/dapl_evd_set_unwaitable.c             |   104 +
 dapl/udapl/dapl_evd_wait.c                       |   284 +
 dapl/udapl/dapl_init.c                           |   311 +
 dapl/udapl/dapl_lmr_create.c                     |   531 +
 dapl/udapl/libdaplcma.map                        |     6 +
 dapl/udapl/libdaplscm.map                        |     6 +
 dapl/udapl/linux/dapl_osd.c                      |   644 +
 dapl/udapl/linux/dapl_osd.h                      |   567 +
 dat/common/dat_api.c                             |  1151 ++
 dat/common/dat_dictionary.c                      |   472 +
 dat/common/dat_dictionary.h                      |   112 +
 dat/common/dat_dr.c                              |   381 +
 dat/common/dat_dr.h                              |   103 +
 dat/common/dat_init.c                            |   161 +
 dat/common/dat_init.h                            |    95 +
 dat/common/dat_sr.c                              |   477 +
 dat/common/dat_sr.h                              |   104 +
 dat/common/dat_strerror.c                        |   630 +
 dat/include/dat/dat.h                            |  1244 ++
 dat/include/dat/dat_error.h                      |   358 +
 dat/include/dat/dat_platform_specific.h          |   208 +
 dat/include/dat/dat_redirection.h                |   723 +
 dat/include/dat/dat_registry.h                   |   100 +
 dat/include/dat/dat_vendor_specific.h            |    73 +
 dat/include/dat/udat.h                           |   380 +
 dat/include/dat/udat_config.h                    |    73 +
 dat/include/dat/udat_redirection.h               |   299 +
 dat/include/dat/udat_vendor_specific.h           |    70 +
 dat/udat/libdat.map                              |    77 +
 dat/udat/linux/dat_osd.c                         |   183 +
 dat/udat/linux/dat_osd.h                         |   404 +
 dat/udat/udat.c                                  |   448 +
 dat/udat/udat_api.c                              |   290 +
 dat/udat/udat_sr_parser.c                        |  1463 ++
 dat/udat/udat_sr_parser.h                        |    63 +
 man/dapltest1.1                                  |   390 +
 man/dat.conf.5                                   |    62 +
 man/dtest1.1                                     |    78 +
 test/dapltest/Makefile.am                        |    57 +
 test/dapltest/Makefile.in                        |  1257 ++
 test/dapltest/README                             |   293 +
 test/dapltest/cmd/dapl_fft_cmd.c                 |   354 +
 test/dapltest/cmd/dapl_getopt.c                  |   181 +
 test/dapltest/cmd/dapl_limit_cmd.c               |   235 +
 test/dapltest/cmd/dapl_main.c                    |   137 +
 test/dapltest/cmd/dapl_netaddr.c                 |   144 +
 test/dapltest/cmd/dapl_params.c                  |   305 +
 test/dapltest/cmd/dapl_performance_cmd.c         |   320 +
 test/dapltest/cmd/dapl_qos_util.c                |    65 +
 test/dapltest/cmd/dapl_quit_cmd.c                |   142 +
 test/dapltest/cmd/dapl_server_cmd.c              |   123 +
 test/dapltest/cmd/dapl_transaction_cmd.c         |   500 +
 test/dapltest/common/dapl_endian.c               |   104 +
 test/dapltest/common/dapl_global.c               |    36 +
 test/dapltest/common/dapl_performance_cmd_util.c |    64 +
 test/dapltest/common/dapl_quit_cmd_util.c        |    40 +
 test/dapltest/common/dapl_transaction_cmd_util.c |    65 +
 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               |   669 +
 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        |   605 +
 test/dapltest/mdep/linux/dapl_mdep_user.h        |   188 +
 test/dapltest/test/dapl_bpool.c                  |   389 +
 test/dapltest/test/dapl_client.c                 |   637 +
 test/dapltest/test/dapl_client_info.c            |    57 +
 test/dapltest/test/dapl_cnxn.c                   |    77 +
 test/dapltest/test/dapl_execute.c                |   102 +
 test/dapltest/test/dapl_fft_connmgt.c            |   126 +
 test/dapltest/test/dapl_fft_endpoint.c           |   296 +
 test/dapltest/test/dapl_fft_hwconn.c             |   229 +
 test/dapltest/test/dapl_fft_mem.c                |   253 +
 test/dapltest/test/dapl_fft_pz.c                 |   272 +
 test/dapltest/test/dapl_fft_queryinfo.c          |   664 +
 test/dapltest/test/dapl_fft_test.c               |    92 +
 test/dapltest/test/dapl_fft_util.c               |   382 +
 test/dapltest/test/dapl_limit.c                  |  1542 ++
 test/dapltest/test/dapl_memlist.c                |   140 +
 test/dapltest/test/dapl_performance_client.c     |   522 +
 test/dapltest/test/dapl_performance_server.c     |   412 +
 test/dapltest/test/dapl_performance_stats.c      |   399 +
 test/dapltest/test/dapl_performance_util.c       |   680 +
 test/dapltest/test/dapl_quit_util.c              |    44 +
 test/dapltest/test/dapl_server.c                 |   886 +
 test/dapltest/test/dapl_server_info.c            |    51 +
 test/dapltest/test/dapl_test_data.c              |    58 +
 test/dapltest/test/dapl_test_util.c              |   714 +
 test/dapltest/test/dapl_thread.c                 |   134 +
 test/dapltest/test/dapl_transaction_stats.c      |   176 +
 test/dapltest/test/dapl_transaction_test.c       |  2026 ++
 test/dapltest/test/dapl_transaction_util.c       |   804 +
 test/dapltest/test/dapl_util.c                   |   242 +
 test/dapltest/udapl/udapl_tdep.c                 |   131 +
 test/dtest/Makefile.am                           |     5 +
 test/dtest/Makefile.in                           |   472 +
 test/dtest/README                                |    19 +
 test/dtest/dtest.c                               |  1826 ++
 270 files changed, 113699 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..7c609ba
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,16 @@
+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
+ Anthony Topper
+ Steve Wise 
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..35ba319
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+# Copyright (c) 2005 Voltaire Inc.  All rights reserved.
+# Copyright (c) 2005-2010 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. 
+#
+# 2) under the terms of the "The BSD License" a copy of which is in the file
+#    LICENSE2.txt in the root directory. 
+#
+# 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. 
+#
+# 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..4f895e8
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2044 @@
+commit 53ec06871c4eeffc431b262ff5ddac0196f6ffe3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Aug 2 09:41:07 2010 -0700
+
+    common, cma: disconnect and cleanup CR linkings after DTO error on EP
+    
+    Add a cleanup to remove CR from SP and EP
+    during DTO errors in dapli_evd_cqe_to_event.
+    Initiate a provider disconnect request since
+    the QP error is independent of CM processing.
+    
+    dapl_sp_remove_ep needs to remove cr_ptr
+    reference from EP before freeing cr object.
+    
+    rescind commit a1038414a55e05673cbfab284516e2b5fae04
+    
+    Provider disconnect should not wait on disconnect
+    event. Let consumer choose decide to wait on
+    event or go ahead and destroy if taking too long.
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit eed4af0d26515bf714979a64ed8804fa593da535
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jul 12 12:39:33 2010 -0700
+
+    Release 1.2.18
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 520a1038414a55e05673cbfab284516e2b5fae04
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jul 7 11:31:44 2010 -0700
+
+    common: race conditions with DTO error, disconnect and dapl_reset_ep
+    
+    Add locking to dapl_ep_reset to avoid race condition with disconnect events
+    and DTO errors. During DTO errors in cqe_to_event call there is
+    no need for manual disconnect processing. During disconnect
+    phase the CMA provider should wait while DISCONNECT_PENDING.
+    The EP could move directly to UNCONNECTED state with dapl_reset_ep().
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit ac5b18461dab6feca1ff339e8ca972e831c554db
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jul 6 15:54:13 2010 -0700
+
+    common: add new dapl_os_sleep_usec() function
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit c81ff5b89f5951f38c493d3c2e39f7e54c8a65c6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 30 12:13:53 2010 -0700
+
+    configure: need a false conditional for verbs attr.link_layer member check
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit e3309c2db15dd2573e40a141eedc74e1b992a7ba
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon May 24 16:43:00 2010 -0700
+
+    Release 1.2.17
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit cc9834ee7da9a85a2c938a5c26d6abd9176f1a86
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon May 24 16:37:03 2010 -0700
+
+    config: add conditional check for new verbs port_attr.link_layer
+    
+    Check for link_layer type ETHERNET and set global for GID
+    configuration on modify QP.
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 68e15b652d86081f24c4d9ad521430ba19809016
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon May 24 10:24:51 2010 -0700
+
+    cma, scm: new provider entries for Mellanox RDMA over Ethernet device for uDAPL v1.2
+    
+    Add options for netdev eth2 and eth3 for cma and for device mlx4_0 port 1 and 2 for scm
+    
+    OpenIB-cma-roe-eth2 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "eth2 0" ""
+    OpenIB-cma-roe-eth3 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 "eth3 0" ""
+    OpenIB-scm-roe-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 "mlx4_0 1" ""
+    OpenIB-scm-roe-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 "mlx4_0 2" ""
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 28d1a1ae45649211dafd52b0ce756891eefdbe5e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 9 13:46:34 2010 -0700
+
+    cma: memory leak of verbs CQ and completion channels created during dat_ia_open
+    
+    check/cleanup CQ and completion channels during dat_ia_close
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 128040a9c934d6d83c34af33b154a1d1aba405d9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 9 13:44:15 2010 -0700
+
+    cma: memory leak of FD's (pipe) created during dat_evd_create
+    
+    Add checking for pipe FD's during destroy and clean them up with close.
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 74295e8e58e8e9ebef80e3f14448dcb11d14db0c
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Feb 23 16:17:18 2010 -0800
+
+    Release 1.2.16-1
+    
+    dapl.spec.in changelog date needs updated to 2010
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 83d430412bb99497bf8cdf0292ae25d9ea601e89
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Feb 23 16:04:42 2010 -0800
+
+    Release 1.2.16-1
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit b41458d2d97647e003a48388e9166ab504e1d136
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Feb 3 11:15:56 2010 -0800
+
+    Update Copyright file and include the 3 license files in distribution
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit f72e5cb77f65c5b45c8b426995dfb358d65fd025
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 22 15:36:45 2010 -0800
+
+    cma: max sge incorrectly decremented during ibv_device_query
+    
+    During dat_ia_query, the provider was incorrectly decrementing
+    reported max sge by 1 if inline data was set. Remove adjustment.
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit d3e8a9224f0d2f0deb4349e643f1e65d9e3cec1e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Nov 24 11:09:35 2009 -0800
+
+    Release 1.2.15-1
+    
+    update spec file
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit bab90f50d51348c1120d4386d728fb2f645e3fdb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Nov 24 11:01:16 2009 -0800
+
+    Release 1.2.15
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit bc36aedeb2b4bde89e7797ff13e6764f3f024b21
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Nov 24 11:00:04 2009 -0800
+
+    dtest, dapltest: conflict with dapl-2 utils package, change to dapl1, dapltest1
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 5bffc073ec56291cdfbdf91f42ef02c08232036a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Nov 24 10:57:31 2009 -0800
+
+    scm: fix compiler warning, unused variable
+    
+    Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
+
+commit 06e497e4c68641f4e32d11f32d6fba68ecfb31f5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 31 05:43:23 2009 -0800
+
+    Release 1.2.14
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit b2c945de6910fb35cf0aed0c305907984bb7b36f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 31 05:21:59 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 87f90aefbc0301eb8870052bfd7592df07fd9f97
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Mar 16 13:18:11 2009 -0800
+
+    Release 1.2.13
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit ecc570938e1ceb848e8d1a9ee93c4a33bc0a6f69
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Mar 12 12:11:36 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 7c1b44c4d7613619bec75543c63cc670cbc9455b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 16 08:31: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 5d2200fe9cd57d6ec3bd139d13c758cde5344ccb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 16 08:21:14 2009 -0800
+
+    dapl common: add debug output during thread create failure
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit f0cf00dc4020ebe2f88784d77ee5a4ba6b3fe392
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jan 16 08:15:56 2009 -0800
+
+    dtest/dapltest: use $(top_builddir) for .la files during test builds
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 1eadd9a1bb0f15209e8adc45f8f27e8ad388c0f3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Nov 26 07:13:49 2008 -0800
+
+    Release 1.2.12
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 713aa2c4d3240e209dba3fc69ed14a9752e9d903
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Oct 27 08:48:39 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 3ac47bf78c594a581b2dd85ee69cb579c1a8d47b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Oct 17 11:02:48 2008 -0700
+
+    dat.conf: add ipath and ehca socket cm entries for v1.2.
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 199d196eba33f42d31a23af4b24f49dd9a440ed2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Oct 14 11:56:50 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 2b7a3d5831f6707106cfb6c82fd00aa9d29a5c07
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Oct 3 08:02:42 2008 -0700
+
+    Release 1.2.11
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 0480c0c77988379cd125b4e9c90a2e2629fe8b19
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Oct 3 05:40:33 2008 -0700
+
+    dat.conf: add OpenIB-iwarp entry for iwarp devices
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 492e82a582debe5fc460c5a8e69727eaabaebcd6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Oct 3 05:30:29 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 7ef6ffee2f03ed9db5839430a6e7cfd4204e8bef
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Oct 1 08:18:04 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 0f84c5abba2552b20a33ef4029bb08b37037bb6c
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Sep 26 08:54:48 2008 -0700
+
+    Revert "Release 1.2.11"
+    
+    This reverts commit 536622b9a13d35902718d7bb6636fe8fe68dd4c4.
+    
+    need to add more fixes to release package.
+
+commit 536622b9a13d35902718d7bb6636fe8fe68dd4c4
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Sep 24 12:09:40 2008 -0700
+
+    Release 1.2.11
+    
+    Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit f8cffc13d43ea4a951363a0b578252c397c8bac7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Sep 24 08:33:53 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 ec8e8ac767d7f3aeaa6ac53ed77ddc0d47600df5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 15:52:12 2008 -0700
+
+    Release 1.2.10
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 68a166aa7ebf8944164c4befc91c437068db7633
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 15:41:27 2008 -0700
+
+    dapl providers: fix compiler warnings in cma and scm providers
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 4395c6e8464d8ad370e334755963820ddc6b0242
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 15:40:23 2008 -0700
+
+    dapl build: add correct CFLAGS for GNU
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit c8cfd1bf88875b5a08f5fa1c7cd4bb0199208ec2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 15:39:10 2008 -0700
+
+    dat: fix compiler warnings in dat common code
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 8465842ed0a52e3c3b87f52ed4b2d0bc8f4ba430
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 15:38:26 2008 -0700
+
+    dapl: fix compiler warnings in common code
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 531e98d42d7cad64a211c075718ba68e9507fa2b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Sep 1 15:36:31 2008 -0700
+
+    dtest/dapltest: fix compiler warnings
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 31d4c9d85fa0aa601399a40a6f9f7f5321c775e2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Aug 21 12:54:30 2008 -0700
+
+    Release 1.2.9
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 8f57d86cb9107c0c1ec230891d58e832995c4912
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:55:02 2008 -0700
+
+    dapl scm: fix corner case that delivers duplicate disconnect events
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 94d398c8bd87c9d9285627fa721177b0a7dfa0f9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:54:13 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 abf93abd4044c78b79c35a193882a50e19c10247
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:53:44 2008 -0700
+
+    dapl: add debug messages during async and overflow events
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 68bb6efc0befcf5edf811a1257f59e5c522c2d64
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Aug 20 18:53:14 2008 -0700
+
+    dapltest: add check for duplicate disconnect events in transaction test
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 82ecd33739492a5b976d688805eac03e4b9e3d23
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Aug 14 11:18:50 2008 -0700
+
+    dapl scm: better cm debug output in non-debug builds
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 70bf3d963f7052e4c7ebeae0a1ddcd6802865e5a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Aug 12 12:24:58 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 b620ebfe7ba9b1366f05866705dcadae4f0ca148
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Aug 12 10:07:39 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 8569f3d3ceadfa4cd671d814379156b2f111db8f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Aug 12 09:59:05 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 1faef0a0c433c8da7b736ae55da2210cae289cf5
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Aug 12 09:54: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 19904b77ccd86b67ab9d83289af7d518f4ba21e1
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Aug 4 14:13:58 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 d037cb57c702249567ab0131a9f24e184bacf7e9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Jul 31 14:14:37 2008 -0700
+
+    build/install: dat.conf entry removal did not remove corrupted v1 entry.
+    
+    entry removal for v1 entries should match first field with OpenIB-* and ignore rest.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 41d77d57e3d0dd93a69c534f8a6ddcb81a775971
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jul 18 07:46:36 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 3723aec69a78331be8d81f68e29a7ae6533aafd2
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 23 15:26:15 2008 -0700
+
+    dapl: remove needless terminating 0 in dto_op_str functions.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit b8b9d88b89584552804060d12eea421ab41109f0
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 23 12:35:42 2008 -0700
+
+    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 2a456aac5648a5c986367f5435fc941be9381291
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 23 10:53:48 2008 -0700
+
+    Release 1.2.8
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 313757d64db0c3cb58fe22da1ba90b9d40ce54e3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Jun 19 13:30:18 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 c5cf40833da0aee2f3fb22f6d4f59afff14423be
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jun 13 13:13:26 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 b15c81295bac5cc9a2eb42840ffc7ee6a71284f7
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jun 13 13:04:25 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 704a7b86ea9d361874a493e7d90bda6e221cf764
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Jun 11 11:11:48 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.
+
+commit dedca5db14bbafb16d598967ffc2f73d1ef15e4e
+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 54657b0bf7391b27429ec8749b940bf714681096
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jun 16 14:48:28 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 66cc8e98f9f88825b6ce5d95c932f20be779df0e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Jun 10 08:55:30 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 7a9b58d6c50fc0a357de540ec3eb2ab2e07f8779
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue May 20 13:18:28 2008 -0700
+
+    Release 1.2.7
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 8369ccc8105c0eb0f8eaf29cd9e637d0f2cb60d6
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue May 20 12:48:00 2008 -0700
+
+    dtest: fix build issue with Redhat EL5.1
+    
+    need include files/definitions for sleep, getpid, gettimeofday
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 09ba72914b563769b60a302675088e6f8f80a3de
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon May 12 10:00:07 2008 -0700
+
+    dapl: Fix long delays with the cma provider open call when DNS is not configured 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 d8f139049c79141430be473763cfed09734bb8a1
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon May 12 09:59:07 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 75ab840f28f9c2a02da4adbf18e443bc68b6582a
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 30 14:49:33 2008 -0700
+
+    Release 1.2.6
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit 536f392ff9287b3c499c0ed146d0bf6707736891
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 30 13:51:58 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 bc9a8eb422e0df280653f9aef585e7bf4576b5c9
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 30 13:27:52 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 09206355182c348d56ecdf31c253e047451aede1
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 29 16:15:24 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 c9691600658c4584272775d7a2780f0dc33f44be
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 28 10:14:35 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 9c6592a2b149499fd8121ede63c5a1cfc5c2fd37
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 28 08:40:51 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 350ba0919296a8718982437660bd0344e058470e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 25 15:12:14 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 d678da79a04e4f919b1f364cf0872fc20f47340d
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Apr 24 11:50:00 2008 -0700
+
+    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 fc6cfc9e535953dfba263d3bb2eac83426cde7ef
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Apr 22 12:55:27 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 ae675ba1153813f6ce21e95729e55cde996c1749
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Apr 14 13:10:30 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 9e2d497a5d5ed10d0b9d3f32814047779c3ed180
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Apr 11 11:38:02 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 d75138dce76a7321d13736a036d7d611ca08665e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Apr 9 16:45:53 2008 -0700
+
+    dat/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.
+    
+    Add logging by default if library load fails.
+    
+    Signed-off by: Arlin Davis ardavis at ichips.intel.com
+
+commit f7e2bdf7cbc9de00bd65548b6e0eff1b7f912e6b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 18 15:11:07 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 b25be7a7c1a082fc308d24bf0b32f26c6933e607
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Fri Mar 14 14:30:20 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 e207b23e8af9ea2ac88d197778b126367cad4402
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Fri Mar 14 14:30:15 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 fffc7265d2e171ef211c8d739c84747ac6736244
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Tue Mar 11 09:24:51 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 c5401f5be3ff7c15226393a5ff94fd300dec19b1
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Fri Mar 7 09:37:41 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 0f9279ebf21cc2e1bfef72324c810603cea7a609
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Mar 6 15:40:12 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 54425ad4ecad595f93f71e5ed1f099a8d22cc010
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Sat Feb 23 21:02:05 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 a15336180f91fb57c3141c9b30a328c08b4d8315
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 16:49: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 d38d9207a1192bb19a554240e7a4aaed9c919e5f
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:17:35 2008 -0800
+
+    Fix gethostname handling
+    Guarantee NUL termination if hostname gets truncated.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 19c3e4f6ae13f616c4d0fc17112cf5a3e70b11d8
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:17:29 2008 -0800
+
+    Fix memory leak in error path
+    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 572dcc58fdacae573bbb876eddc68a9f159ef8c3
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:17:24 2008 -0800
+
+    Fix memory leak.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit c0c1db03c3cbe267a7da0b7171c62c29b0eaaad7
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:17:19 2008 -0800
+
+    Fix memory leak in error path.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit eee765b8691776b459e0196e3530d24e4fde1627
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:17:14 2008 -0800
+
+    Fix memory leak
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit f9263be18bb0b9faf749aaa6ee02b3bb3f575ad0
+Author: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+Date:   Tue Feb 19 03:17:09 2008 -0800
+
+    DAPL v1: Fix Memory Leak
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit 93eafe464227375d162e1fc764c2df5eab1ad50f
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Feb 15 10:07:05 2008 -0800
+
+    Release 1.2.5
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 42a35b64ac29bfba7234e972a21c2e9f8a84eb68
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Feb 15 09:59:48 2008 -0800
+
+    uDAPL cma v1: turn down dbg noise level on rejects
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 90f37d26411edb2dfd60d2675fb6451c5f775f1e
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Feb 15 09:44:57 2008 -0800
+
+    dapltest v1: change default provider name to OpenIB-cma
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit d62fe0b86777b22e291e0109abe9ff71c858e0d8
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:34:27 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 37203569035d0617f44fb2e99dd815f5f8664398
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:33:04 2008 -0800
+
+    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 2a01b067574e85c98d850ca24a269c5f621f618b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:31:46 2008 -0800
+
+    uDAT: Make sure we stay within bounds when manipulating the ia handle.
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit db3bbe1ea048b9c8cd0e1ceccb2711af64aaf655
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:30:43 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 6a3315dcf803bd0e77d006724150587ae97b2aa3
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:28:56 2008 -0800
+
+    dtest: Fix typo in memset
+    
+    Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
+
+commit a5f51de7e5fe539165d26d56e5c38df8ec388f39
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Thu Feb 14 09:25:43 2008 -0800
+
+    uDAPL cma provider: add src/dst addr to reject debug messages
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit df520f14b0bf32c106114d4792994531033f065b
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 11 15:43:18 2008 -0800
+
+    udapl OFA provider: set listen backlog to default cma backlog max.
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 06a6975aa2d2ec68c961e0d9973398429902dcfb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Feb 11 14:50:51 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 fa12e078ddbe433b5602c59a48003728ee345c27
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jan 28 14:03:30 2008 -0800
+
+    Release 1.2.4  ChangeLog
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 7f309a9fc7a6a9eac33d387066614e4dd1fccebb
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jan 28 14:01:40 2008 -0800
+
+    Release 1.2.4
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 06cfd739d16fb8d461f4cbc7e6343c7cafb15bae
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Mon Jan 28 14:00:47 2008 -0800
+
+    openib_cma: fix cm responder/initiator exchange
+                cleanup destroy_conn code
+    
+    Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
+
+commit 643b54e309b2b2ba9185082073c2487d21a74c57
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Wed Oct 31 10:59:30 2007 -0800
+
+    Update Changelog
+
+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 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 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 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 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 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 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 230767742b8287490373c09d1bd346337b375b48
+Author: Arlin Davis <arlin.r.davis at intel.com>
+Date:   Fri Jun 22 11:48:20 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 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 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 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 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/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..b69ef80
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,235 @@
+Common Public License 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON 
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF 
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+     a) in the case of the initial Contributor, the initial code and
+     documentation distributed under this Agreement, and
+
+     b) in the case of each subsequent Contributor:
+
+     i) changes to the Program, and
+
+     ii) additions to the Program;
+
+     where such changes and/or additions to the Program originate from
+     and are distributed by that particular Contributor. A Contribution
+     'originates' from a Contributor if it was added to the Program by
+     such Contributor itself or anyone acting on such Contributor's
+     behalf.  Contributions do not include additions to the Program
+     which: (i) are separate modules of software distributed in
+     conjunction with the Program under their own license agreement, and
+     (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program. 
+
+"Licensed Patents " mean patent claims licensable by a Contributor 
+which are necessarily infringed by the use or sale of its Contribution 
+alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this 
+Agreement. 
+
+"Recipient" means anyone who receives the Program under this Agreement, 
+including all Contributors. 
+
+2. GRANT OF RIGHTS
+
+     a) Subject to the terms of this Agreement, each Contributor hereby
+     grants Recipient a non-exclusive, worldwide, royalty-free copyright
+     license to reproduce, prepare derivative works of, publicly
+     display, publicly perform, distribute and sublicense the
+     Contribution of such Contributor, if any, and such derivative
+     works, in source code and object code form.
+
+     b) Subject to the terms of this Agreement, each Contributor hereby
+     grants Recipient a non-exclusive, worldwide, royalty-free patent
+     license under Licensed Patents to make, use, sell, offer to sell,
+     import and otherwise transfer the Contribution of such Contributor,
+     if any, in source code and object code form. This patent license
+     shall apply to the combination of the Contribution and the Program
+     if, at the time the Contribution is added by the Contributor, such
+     addition of the Contribution causes such combination to be covered
+     by the Licensed Patents. The patent license shall not apply to any
+     other combinations which include the Contribution. No hardware per
+     se is licensed hereunder.
+
+     c) Recipient understands that although each Contributor grants the
+     licenses to its Contributions set forth herein, no assurances are
+     provided by any Contributor that the Program does not infringe the
+     patent or other intellectual property rights of any other
+     entity. Each Contributor disclaims any liability to Recipient for
+     claims brought by any other entity based on infringement of
+     intellectual property rights or otherwise. As a condition to
+     exercising the rights and licenses granted hereunder, each
+     Recipient hereby assumes sole responsibility to secure any other
+     intellectual property rights needed, if any. For example, if a
+     third party patent license is required to allow Recipient to
+     distribute the Program, it is Recipient's responsibility to acquire
+     that license before distributing the Program.
+
+     d) Each Contributor represents that to its knowledge it has
+     sufficient copyright rights in its Contribution, if any, to grant
+     the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS 
+
+A Contributor may choose to distribute the Program in object code form 
+under its own license agreement, provided that: 
+
+     a) it complies with the terms and conditions of this Agreement; and
+
+     b) its license agreement:
+
+     i) effectively disclaims on behalf of all Contributors all
+     warranties and conditions, express and implied, including
+     warranties or conditions of title and non-infringement, and implied
+     warranties or conditions of merchantability and fitness for a
+     particular purpose;
+
+     ii) effectively excludes on behalf of all Contributors all
+     liability for damages, including direct, indirect, special,
+     incidental and consequential damages, such as lost profits;
+
+     iii) states that any provisions which differ from this Agreement
+     are offered by that Contributor alone and not by any other party;
+     and
+
+     iv) states that source code for the Program is available from such
+     Contributor, and informs licensees how to obtain it in a reasonable
+     manner on or through a medium customarily used for software
+     exchange.  
+
+When the Program is made available in source code form:
+
+     a) it must be made available under this Agreement; and
+
+     b) a copy of this Agreement must be included with each copy of the
+     Program.
+
+Contributors may not remove or alter any copyright notices contained 
+within the Program.
+
+Each Contributor must identify itself as the originator of its 
+Contribution, if any, in a manner that reasonably allows subsequent 
+Recipients to identify the originator of the Contribution. 
+
+4. COMMERCIAL DISTRIBUTION 
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors. Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the
+Program in a commercial product offering. The obligations in this
+section do not apply to any claims or Losses relating to any actual or
+alleged intellectual property infringement. In order to qualify, an
+Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial
+Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS 
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY 
+WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR 
+FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible 
+for determining the appropriateness of using and distributing the 
+Program and assumes all risks associated with its exercise of rights 
+under this Agreement, including but not limited to the risks and costs 
+of program errors, compliance with applicable laws, damage to or loss 
+of data, programs or equipment, and unavailability or interruption of 
+operations. 
+
+6. DISCLAIMER OF LIABILITY 
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR 
+ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING 
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF 
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR 
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED 
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under 
+applicable law, it shall not affect the validity or enforceability of 
+the remainder of the terms of this Agreement, and without further 
+action by the parties hereto, such provision shall be reformed to the 
+minimum extent necessary to make such provision valid and enforceable. 
+
+If Recipient institutes patent litigation against a Contributor with 
+respect to a patent applicable to software (including a cross-claim or 
+counterclaim in a lawsuit), then any patent licenses granted by that 
+Contributor to such Recipient under this Agreement shall terminate as 
+of the date such litigation is filed. In addition, if Recipient 
+institutes patent litigation against any entity (including a cross-
+claim or counterclaim in a lawsuit) alleging that the Program itself 
+(excluding combinations of the Program with other software or hardware) 
+infringes such Recipient's patent(s), then such Recipient's rights 
+granted under Section 2(b) shall terminate as of the date such 
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails 
+to comply with any of the material terms or conditions of this 
+Agreement and does not cure such failure in a reasonable period of time 
+after becoming aware of such noncompliance. If all Recipient's rights 
+under this Agreement terminate, Recipient agrees to cease use and 
+distribution of the Program as soon as reasonably practicable. However, 
+Recipient's obligations under this Agreement and any licenses granted 
+by Recipient relating to the Program shall continue and survive. 
+
+Everyone is permitted to copy and distribute copies of this Agreement, 
+but in order to avoid inconsistency the Agreement is copyrighted and 
+may only be modified in the following manner. The Agreement Steward 
+reserves the right to publish new versions (including revisions) of 
+this Agreement from time to time. No one other than the Agreement 
+Steward has the right to modify this Agreement. IBM is the initial 
+Agreement Steward. IBM may assign the responsibility to serve as the 
+Agreement Steward to a suitable separate entity. Each new version of 
+the Agreement will be given a distinguishing version number. The 
+Program (including Contributions) may always be distributed subject to 
+the version of the Agreement under which it was received. In addition, 
+after a new version of the Agreement is published, Contributor may 
+elect to distribute the Program (including its Contributions) under the 
+new version. Except as expressly stated in Sections 2(a) and 2(b) 
+above, Recipient receives no rights or licenses to the intellectual 
+property of any Contributor under this Agreement, whether expressly, by 
+implication, estoppel or otherwise. All rights in the Program not 
+expressly granted under this Agreement are reserved. 
+
+This Agreement is governed by the laws of the State of New York and the 
+intellectual property laws of the United States of America. No party to 
+this Agreement will bring a legal action under this Agreement more than 
+one year after the cause of action arose. Each party waives its rights 
+to a jury trial in any resulting litigation.
+
diff --git a/LICENSE2.txt b/LICENSE2.txt
new file mode 100644
index 0000000..04c1839
--- /dev/null
+++ b/LICENSE2.txt
@@ -0,0 +1,30 @@
+Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+
+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.
+
+	Neither the name of the Network Appliance, Inc. nor the names of
+	its contributors may be used to endorse or promote products
+	derived from this software without specific prior written
+	permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/LICENSE3.txt b/LICENSE3.txt
new file mode 100644
index 0000000..0ecbca2
--- /dev/null
+++ b/LICENSE3.txt
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+GNU GENERAL PUBLIC LICENSE
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+a) You must cause the modified files to carry prominent notices
+stating that you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in
+whole or in part contains or is derived from the Program or any
+part thereof, to be licensed as a whole at no charge to all third
+parties under the terms of this License.
+
+c) If the modified program normally reads commands interactively
+when run, you must cause it, when started running for such
+interactive use in the most ordinary way, to print or display an
+announcement including an appropriate copyright notice and a
+notice that there is no warranty (or else, saying that you provide
+a warranty) and that users may redistribute the program under
+these conditions, and telling the user how to view a copy of this
+License. (Exception: if the Program itself is interactive but
+does not normally print such an announcement, your work based on
+the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable
+source code, which must be distributed under the terms of Sections
+1 and 2 above on a medium customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three
+years, to give any third party, for a charge no more than your
+cost of physically performing source distribution, a complete
+machine-readable copy of the corresponding source code, to be
+distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+
+c) Accompany it with the information you received as to the offer
+to distribute corresponding source code. (This alternative is
+allowed only for noncommercial distribution and only if you
+received the program in object code or executable form with such
+an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+<one line to give the program's name and a brief idea of what it does.>
+Copyright (C) <year> <name of author>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+`Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+<signature of Ty Coon>, 1 April 1989
+Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..124d913
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,426 @@
+# $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 DEFINE_ATTR_LINK_LAYER
+XFLAGS = -DDEFINE_ATTR_LINK_LAYER
+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)
+dapllibcmadir = $(libdir)
+dapllibscmdir = $(libdir)
+
+datlib_LTLIBRARIES = dat/udat/libdat.la
+dapllibcma_LTLIBRARIES = dapl/udapl/libdaplcma.la
+dapllibscm_LTLIBRARIES = dapl/udapl/libdaplscm.la
+
+dat_udat_libdat_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) \
+				-I$(srcdir)/dat/include/ -I$(srcdir)/dat/udat/ \
+				-I$(srcdir)/dat/udat/linux -I$(srcdir)/dat/common/ 
+
+dapl_udapl_libdaplcma_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) \
+				-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 
+
+dapl_udapl_libdaplscm_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
+
+		
+if HAVE_LD_VERSION_SCRIPT
+    dat_version_script = -Wl,--version-script=$(srcdir)/dat/udat/libdat.map
+    daplcma_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaplcma.map
+    daplscm_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaplscm.map
+else
+    dat_version_script =
+    daplofa_version_script =
+    daplscm_version_script =
+endif
+
+#
+# uDAT: libdat.so
+#
+dat_udat_libdat_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_libdat_la_LDFLAGS = -version-info 1:2:0 $(dat_version_script) -ldl 
+
+#
+# uDAPL OpenIB uCMA version: libdaplcma.so
+#
+dapl_udapl_libdaplcma_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/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_udapl_libdaplcma_la_LDFLAGS = -version-info 1:2:0 $(daplcma_version_script) \
+				   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+				   -lpthread -libverbs -lrdmacm 
+				
+#
+# uDAPL OpenFabrics Socket CM version: libdaplscm.so
+#
+dapl_udapl_libdaplscm_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/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_udapl_libdaplscm_la_LDFLAGS = -version-info 1:2:0 $(daplscm_version_script) \
+                                   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+                                   -lpthread -libverbs
+
+libdatincludedir = $(includedir)/dat
+
+libdatinclude_HEADERS = dat/include/dat/dat.h \
+			dat/include/dat/dat_error.h \
+			dat/include/dat/dat_platform_specific.h \
+			dat/include/dat/dat_redirection.h \
+			dat/include/dat/dat_registry.h \
+			dat/include/dat/dat_vendor_specific.h \
+			dat/include/dat/udat_config.h \
+			dat/include/dat/udat.h \
+			dat/include/dat/udat_redirection.h \
+			dat/include/dat/udat_vendor_specific.h 
+		
+man_MANS = man/dtest1.1 man/dapltest1.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/dat/dat.h \
+	     dat/include/dat/dat_error.h \
+	     dat/include/dat/dat_platform_specific.h \
+	     dat/include/dat/dat_redirection.h \
+	     dat/include/dat/dat_registry.h \
+	     dat/include/dat/dat_vendor_specific.h \
+	     dat/include/dat/udat_config.h \
+	     dat/include/dat/udat.h \
+	     dat/include/dat/udat_redirection.h \
+	     dat/include/dat/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_scm/dapl_ib_dto.h \
+	     dapl/openib_scm/dapl_ib_util.h \
+	     dat/udat/libdat.map \
+	     dapl/udapl/libdaplcma.map \
+             dapl/udapl/libdaplscm.map \
+	     dapl.spec.in \
+	     LICENSE.txt \
+	     LICENSE2.txt \
+	     LICENSE3.txt \
+	     $(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 \
+		echo "exec-hook"; \
+		sed -e '/OpenIB-.*/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$OpenIBdapl; \
+		cp /tmp/$$$$OpenIBdapl $(DESTDIR)$(sysconfdir)/dat.conf; \
+	fi; \
+	echo OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib0 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo OpenIB-cma-1 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib1 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mthca0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mthca0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-ipath0-1 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 '"ipath0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-ipath0-2 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 '"ipath0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-ehca0-2 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 '"ehca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-iwarp u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-cma-roe-eth2 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-cma-roe-eth3 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth3 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-scm-roe-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-scm-roe-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf;
+
+uninstall-hook:
+	if test -e $(DESTDIR)$(sysconfdir)/dat.conf; then \
+		sed -e '/OpenIB-.* u1/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$OpenIBdapl; \
+		cp /tmp/$$$$OpenIBdapl $(DESTDIR)$(sysconfdir)/dat.conf; \
+	fi;
+	
+SUBDIRS = . test/dtest test/dapltest
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..6495495
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,3250 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# $Id: $
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+# 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
+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 \
+	config/compile config/config.guess config/config.sub \
+	config/depcomp config/install-sh config/ltmain.sh \
+	config/missing
+subdir = .
+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 configure.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)$(dapllibcmadir)" \
+	"$(DESTDIR)$(dapllibscmdir)" "$(DESTDIR)$(datlibdir)" \
+	"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \
+	"$(DESTDIR)$(libdatincludedir)"
+dapllibcmaLTLIBRARIES_INSTALL = $(INSTALL)
+dapllibscmLTLIBRARIES_INSTALL = $(INSTALL)
+datlibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(dapllibcma_LTLIBRARIES) $(dapllibscm_LTLIBRARIES) \
+	$(datlib_LTLIBRARIES)
+dapl_udapl_libdaplcma_la_LIBADD =
+am_dapl_udapl_libdaplcma_la_OBJECTS =  \
+	dapl_udapl_libdaplcma_la-dapl_init.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_cno_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.lo \
+	dapl_udapl_libdaplcma_la-dapl_cno_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_cno_wait.lo \
+	dapl_udapl_libdaplcma_la-dapl_cno_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_lmr_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_wait.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_disable.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_enable.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.lo \
+	dapl_udapl_libdaplcma_la-dapl_osd.lo \
+	dapl_udapl_libdaplcma_la-dapl_cookie.lo \
+	dapl_udapl_libdaplcma_la-dapl_cr_accept.lo \
+	dapl_udapl_libdaplcma_la-dapl_cr_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_cr_reject.lo \
+	dapl_udapl_libdaplcma_la-dapl_cr_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_cr_callback.lo \
+	dapl_udapl_libdaplcma_la-dapl_cr_handoff.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_connect.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_disconnect.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_reset.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_get_status.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_modify.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_write.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_post_recv.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_post_send.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_dequeue.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_post_se.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_resize.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_qp_async_error_callb.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_un_async_error_callb.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.lo \
+	dapl_udapl_libdaplcma_la-dapl_evd_dto_callb.lo \
+	dapl_udapl_libdaplcma_la-dapl_get_consumer_context.lo \
+	dapl_udapl_libdaplcma_la-dapl_get_handle_type.lo \
+	dapl_udapl_libdaplcma_la-dapl_hash.lo \
+	dapl_udapl_libdaplcma_la-dapl_hca_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_ia_close.lo \
+	dapl_udapl_libdaplcma_la-dapl_ia_open.lo \
+	dapl_udapl_libdaplcma_la-dapl_ia_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_ia_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_llist.lo \
+	dapl_udapl_libdaplcma_la-dapl_lmr_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_lmr_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_lmr_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.lo \
+	dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_write.lo \
+	dapl_udapl_libdaplcma_la-dapl_mr_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_provider.lo \
+	dapl_udapl_libdaplcma_la-dapl_sp_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_psp_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_psp_create_any.lo \
+	dapl_udapl_libdaplcma_la-dapl_psp_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_psp_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_pz_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_pz_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_pz_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_pz_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_rmr_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_rmr_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_rmr_bind.lo \
+	dapl_udapl_libdaplcma_la-dapl_rmr_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_rmr_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_rsp_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_rsp_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_rsp_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_cno_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_set_consumer_context.lo \
+	dapl_udapl_libdaplcma_la-dapl_ring_buffer_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_name_service.lo \
+	dapl_udapl_libdaplcma_la-dapl_timer_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_recv_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_ep_set_watermark.lo \
+	dapl_udapl_libdaplcma_la-dapl_srq_create.lo \
+	dapl_udapl_libdaplcma_la-dapl_srq_free.lo \
+	dapl_udapl_libdaplcma_la-dapl_srq_query.lo \
+	dapl_udapl_libdaplcma_la-dapl_srq_resize.lo \
+	dapl_udapl_libdaplcma_la-dapl_srq_post_recv.lo \
+	dapl_udapl_libdaplcma_la-dapl_srq_set_lw.lo \
+	dapl_udapl_libdaplcma_la-dapl_srq_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_debug.lo \
+	dapl_udapl_libdaplcma_la-dapl_ib_util.lo \
+	dapl_udapl_libdaplcma_la-dapl_ib_cq.lo \
+	dapl_udapl_libdaplcma_la-dapl_ib_qp.lo \
+	dapl_udapl_libdaplcma_la-dapl_ib_cm.lo \
+	dapl_udapl_libdaplcma_la-dapl_ib_mem.lo
+dapl_udapl_libdaplcma_la_OBJECTS =  \
+	$(am_dapl_udapl_libdaplcma_la_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
+dapl_udapl_libdaplscm_la_LIBADD =
+am_dapl_udapl_libdaplscm_la_OBJECTS =  \
+	dapl_udapl_libdaplscm_la-dapl_init.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_cno_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.lo \
+	dapl_udapl_libdaplscm_la-dapl_cno_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_cno_wait.lo \
+	dapl_udapl_libdaplscm_la-dapl_cno_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_lmr_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_wait.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_disable.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_enable.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.lo \
+	dapl_udapl_libdaplscm_la-dapl_osd.lo \
+	dapl_udapl_libdaplscm_la-dapl_cookie.lo \
+	dapl_udapl_libdaplscm_la-dapl_cr_accept.lo \
+	dapl_udapl_libdaplscm_la-dapl_cr_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_cr_reject.lo \
+	dapl_udapl_libdaplscm_la-dapl_cr_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_cr_callback.lo \
+	dapl_udapl_libdaplscm_la-dapl_cr_handoff.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_connect.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_disconnect.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_reset.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_get_status.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_modify.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_write.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_post_recv.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_post_send.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_dequeue.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_post_se.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_resize.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_qp_async_error_callb.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_un_async_error_callb.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.lo \
+	dapl_udapl_libdaplscm_la-dapl_evd_dto_callb.lo \
+	dapl_udapl_libdaplscm_la-dapl_get_consumer_context.lo \
+	dapl_udapl_libdaplscm_la-dapl_get_handle_type.lo \
+	dapl_udapl_libdaplscm_la-dapl_hash.lo \
+	dapl_udapl_libdaplscm_la-dapl_hca_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_ia_close.lo \
+	dapl_udapl_libdaplscm_la-dapl_ia_open.lo \
+	dapl_udapl_libdaplscm_la-dapl_ia_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_ia_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_llist.lo \
+	dapl_udapl_libdaplscm_la-dapl_lmr_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_lmr_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_lmr_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.lo \
+	dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_write.lo \
+	dapl_udapl_libdaplscm_la-dapl_mr_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_provider.lo \
+	dapl_udapl_libdaplscm_la-dapl_sp_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_psp_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_psp_create_any.lo \
+	dapl_udapl_libdaplscm_la-dapl_psp_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_psp_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_pz_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_pz_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_pz_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_pz_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_rmr_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_rmr_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_rmr_bind.lo \
+	dapl_udapl_libdaplscm_la-dapl_rmr_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_rmr_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_rsp_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_rsp_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_rsp_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_cno_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_set_consumer_context.lo \
+	dapl_udapl_libdaplscm_la-dapl_ring_buffer_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_name_service.lo \
+	dapl_udapl_libdaplscm_la-dapl_timer_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_recv_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_ep_set_watermark.lo \
+	dapl_udapl_libdaplscm_la-dapl_srq_create.lo \
+	dapl_udapl_libdaplscm_la-dapl_srq_free.lo \
+	dapl_udapl_libdaplscm_la-dapl_srq_query.lo \
+	dapl_udapl_libdaplscm_la-dapl_srq_resize.lo \
+	dapl_udapl_libdaplscm_la-dapl_srq_post_recv.lo \
+	dapl_udapl_libdaplscm_la-dapl_srq_set_lw.lo \
+	dapl_udapl_libdaplscm_la-dapl_srq_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_debug.lo \
+	dapl_udapl_libdaplscm_la-dapl_ib_util.lo \
+	dapl_udapl_libdaplscm_la-dapl_ib_cq.lo \
+	dapl_udapl_libdaplscm_la-dapl_ib_qp.lo \
+	dapl_udapl_libdaplscm_la-dapl_ib_cm.lo \
+	dapl_udapl_libdaplscm_la-dapl_ib_mem.lo
+dapl_udapl_libdaplscm_la_OBJECTS =  \
+	$(am_dapl_udapl_libdaplscm_la_OBJECTS)
+dat_udat_libdat_la_LIBADD =
+am_dat_udat_libdat_la_OBJECTS = dat_udat_libdat_la-udat.lo \
+	dat_udat_libdat_la-udat_api.lo \
+	dat_udat_libdat_la-udat_sr_parser.lo \
+	dat_udat_libdat_la-dat_osd.lo dat_udat_libdat_la-dat_api.lo \
+	dat_udat_libdat_la-dat_dictionary.lo \
+	dat_udat_libdat_la-dat_strerror.lo \
+	dat_udat_libdat_la-dat_init.lo dat_udat_libdat_la-dat_dr.lo \
+	dat_udat_libdat_la-dat_sr.lo
+dat_udat_libdat_la_OBJECTS = $(am_dat_udat_libdat_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+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 --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(dapl_udapl_libdaplcma_la_SOURCES) \
+	$(dapl_udapl_libdaplscm_la_SOURCES) \
+	$(dat_udat_libdat_la_SOURCES)
+DIST_SOURCES = $(dapl_udapl_libdaplcma_la_SOURCES) \
+	$(dapl_udapl_libdaplscm_la_SOURCES) \
+	$(dat_udat_libdat_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+man1dir = $(mandir)/man1
+man5dir = $(mandir)/man5
+NROFF = nroff
+MANS = $(man_MANS)
+libdatincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(libdatinclude_HEADERS)
+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@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_FALSE = @DEBUG_FALSE@
+DEBUG_TRUE = @DEBUG_TRUE@
+DEFINE_ATTR_LINK_LAYER_FALSE = @DEFINE_ATTR_LINK_LAYER_FALSE@
+DEFINE_ATTR_LINK_LAYER_TRUE = @DEFINE_ATTR_LINK_LAYER_TRUE@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HAVE_LD_VERSION_SCRIPT_FALSE = @HAVE_LD_VERSION_SCRIPT_FALSE@
+HAVE_LD_VERSION_SCRIPT_TRUE = @HAVE_LD_VERSION_SCRIPT_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OS_RHEL4_FALSE = @OS_RHEL4_FALSE@
+OS_RHEL4_TRUE = @OS_RHEL4_TRUE@
+OS_RHEL5_FALSE = @OS_RHEL5_FALSE@
+OS_RHEL5_TRUE = @OS_RHEL5_TRUE@
+OS_SUSE11_FALSE = @OS_SUSE11_FALSE@
+OS_SUSE11_TRUE = @OS_SUSE11_TRUE@
+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@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+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 DEFINE_ATTR_LINK_LAYER_TRUE@XFLAGS = -DDEFINE_ATTR_LINK_LAYER
+ 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)
+dapllibcmadir = $(libdir)
+dapllibscmdir = $(libdir)
+datlib_LTLIBRARIES = dat/udat/libdat.la
+dapllibcma_LTLIBRARIES = dapl/udapl/libdaplcma.la
+dapllibscm_LTLIBRARIES = dapl/udapl/libdaplscm.la
+dat_udat_libdat_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) \
+				-I$(srcdir)/dat/include/ -I$(srcdir)/dat/udat/ \
+				-I$(srcdir)/dat/udat/linux -I$(srcdir)/dat/common/ 
+
+dapl_udapl_libdaplcma_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) \
+				-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 
+
+dapl_udapl_libdaplscm_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
+
+ at HAVE_LD_VERSION_SCRIPT_FALSE@dat_version_script = 
+ at HAVE_LD_VERSION_SCRIPT_TRUE@dat_version_script = -Wl,--version-script=$(srcdir)/dat/udat/libdat.map
+ at HAVE_LD_VERSION_SCRIPT_TRUE@daplcma_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaplcma.map
+ at HAVE_LD_VERSION_SCRIPT_FALSE@daplscm_version_script = 
+ at HAVE_LD_VERSION_SCRIPT_TRUE@daplscm_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaplscm.map
+ at HAVE_LD_VERSION_SCRIPT_FALSE@daplofa_version_script = 
+
+#
+# uDAT: libdat.so
+#
+dat_udat_libdat_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_libdat_la_LDFLAGS = -version-info 1:2:0 $(dat_version_script) -ldl 
+
+#
+# uDAPL OpenIB uCMA version: libdaplcma.so
+#
+dapl_udapl_libdaplcma_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/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_udapl_libdaplcma_la_LDFLAGS = -version-info 1:2:0 $(daplcma_version_script) \
+				   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+				   -lpthread -libverbs -lrdmacm 
+
+
+#
+# uDAPL OpenFabrics Socket CM version: libdaplscm.so
+#
+dapl_udapl_libdaplscm_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/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_udapl_libdaplscm_la_LDFLAGS = -version-info 1:2:0 $(daplscm_version_script) \
+                                   -Wl,-init,dapl_init -Wl,-fini,dapl_fini \
+                                   -lpthread -libverbs
+
+libdatincludedir = $(includedir)/dat
+libdatinclude_HEADERS = dat/include/dat/dat.h \
+			dat/include/dat/dat_error.h \
+			dat/include/dat/dat_platform_specific.h \
+			dat/include/dat/dat_redirection.h \
+			dat/include/dat/dat_registry.h \
+			dat/include/dat/dat_vendor_specific.h \
+			dat/include/dat/udat_config.h \
+			dat/include/dat/udat.h \
+			dat/include/dat/udat_redirection.h \
+			dat/include/dat/udat_vendor_specific.h 
+
+man_MANS = man/dtest1.1 man/dapltest1.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/dat/dat.h \
+	     dat/include/dat/dat_error.h \
+	     dat/include/dat/dat_platform_specific.h \
+	     dat/include/dat/dat_redirection.h \
+	     dat/include/dat/dat_registry.h \
+	     dat/include/dat/dat_vendor_specific.h \
+	     dat/include/dat/udat_config.h \
+	     dat/include/dat/udat.h \
+	     dat/include/dat/udat_redirection.h \
+	     dat/include/dat/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_scm/dapl_ib_dto.h \
+	     dapl/openib_scm/dapl_ib_util.h \
+	     dat/udat/libdat.map \
+	     dapl/udapl/libdaplcma.map \
+             dapl/udapl/libdaplscm.map \
+	     dapl.spec.in \
+	     LICENSE.txt \
+	     LICENSE2.txt \
+	     LICENSE3.txt \
+	     $(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) --foreign '; \
+	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(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) 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-dapllibcmaLTLIBRARIES: $(dapllibcma_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(dapllibcmadir)" || $(mkdir_p) "$(DESTDIR)$(dapllibcmadir)"
+	@list='$(dapllibcma_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(dapllibcmaLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(dapllibcmadir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(dapllibcmaLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(dapllibcmadir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-dapllibcmaLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(dapllibcma_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(dapllibcmadir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(dapllibcmadir)/$$p"; \
+	done
+
+clean-dapllibcmaLTLIBRARIES:
+	-test -z "$(dapllibcma_LTLIBRARIES)" || rm -f $(dapllibcma_LTLIBRARIES)
+	@list='$(dapllibcma_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-dapllibscmLTLIBRARIES: $(dapllibscm_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(dapllibscmdir)" || $(mkdir_p) "$(DESTDIR)$(dapllibscmdir)"
+	@list='$(dapllibscm_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(dapllibscmLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(dapllibscmdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(dapllibscmLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(dapllibscmdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-dapllibscmLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(dapllibscm_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(dapllibscmdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(dapllibscmdir)/$$p"; \
+	done
+
+clean-dapllibscmLTLIBRARIES:
+	-test -z "$(dapllibscm_LTLIBRARIES)" || rm -f $(dapllibscm_LTLIBRARIES)
+	@list='$(dapllibscm_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) --mode=install $(datlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(datlibdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(datlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(datlibdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-datlibLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(datlib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(datlibdir)/$$p'"; \
+	  $(LIBTOOL) --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/libdaplcma.la: $(dapl_udapl_libdaplcma_la_OBJECTS) $(dapl_udapl_libdaplcma_la_DEPENDENCIES) dapl/udapl/$(am__dirstamp)
+	$(LINK) -rpath $(dapllibcmadir) $(dapl_udapl_libdaplcma_la_LDFLAGS) $(dapl_udapl_libdaplcma_la_OBJECTS) $(dapl_udapl_libdaplcma_la_LIBADD) $(LIBS)
+dapl/udapl/libdaplscm.la: $(dapl_udapl_libdaplscm_la_OBJECTS) $(dapl_udapl_libdaplscm_la_DEPENDENCIES) dapl/udapl/$(am__dirstamp)
+	$(LINK) -rpath $(dapllibscmdir) $(dapl_udapl_libdaplscm_la_LDFLAGS) $(dapl_udapl_libdaplscm_la_OBJECTS) $(dapl_udapl_libdaplscm_la_LIBADD) $(LIBS)
+dat/udat/$(am__dirstamp):
+	@$(mkdir_p) dat/udat
+	@: > dat/udat/$(am__dirstamp)
+dat/udat/libdat.la: $(dat_udat_libdat_la_OBJECTS) $(dat_udat_libdat_la_DEPENDENCIES) dat/udat/$(am__dirstamp)
+	$(LINK) -rpath $(datlibdir) $(dat_udat_libdat_la_LDFLAGS) $(dat_udat_libdat_la_OBJECTS) $(dat_udat_libdat_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_libdaplcma_la-dapl_cno_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cookie.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_accept.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_callback.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_handoff.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_reject.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_debug.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_disconnect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_get_status.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_modify.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_send.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_recv_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_reset.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_set_watermark.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dequeue.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_disable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dto_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_enable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_post_se.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_qp_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_un_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_handle_type.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hash.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hca_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_close.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_open.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_mem.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_qp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_init.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_llist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_mr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_name_service.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_osd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_provider.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create_any.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ring_buffer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_bind.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_set_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_sp_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_set_lw.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_timer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cookie.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_accept.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_callback.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_handoff.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_reject.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_debug.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_disconnect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_get_status.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_modify.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_send.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_recv_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_reset.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_set_watermark.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dequeue.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_disable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dto_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_enable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_post_se.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_qp_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_un_async_error_callb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_wait.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_handle_type.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hash.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hca_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_close.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_open.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cq.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_mem.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_qp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_init.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_llist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_write.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_mr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_name_service.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_osd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_provider.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create_any.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ring_buffer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_bind.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_set_consumer_context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_sp_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_create.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_free.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_post_recv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_query.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_resize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_set_lw.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_timer_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-dat_api.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-dat_dictionary.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-dat_dr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-dat_init.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-dat_osd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-dat_sr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-dat_strerror.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-udat.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-udat_api.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dat_udat_libdat_la-udat_sr_parser.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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_libdaplcma_la-dapl_init.lo: dapl/udapl/dapl_init.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_init.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_init.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_init.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_init.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_init.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_init.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_create.lo: dapl/udapl/dapl_evd_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_create.lo `test -f 'dapl/udapl/dapl_evd_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_create.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_query.lo: dapl/udapl/dapl_evd_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_query.lo `test -f 'dapl/udapl/dapl_evd_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_query.c
+
+dapl_udapl_libdaplcma_la-dapl_cno_create.lo: dapl/udapl/dapl_cno_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cno_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cno_create.lo `test -f 'dapl/udapl/dapl_cno_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_create.c
+
+dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.lo: dapl/udapl/dapl_cno_modify_agent.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_modify_agent.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_modify_agent.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_cno_free.lo: dapl/udapl/dapl_cno_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cno_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cno_free.lo `test -f 'dapl/udapl/dapl_cno_free.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_free.c
+
+dapl_udapl_libdaplcma_la-dapl_cno_wait.lo: dapl/udapl/dapl_cno_wait.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cno_wait.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_wait.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_wait.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_wait.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_wait.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_wait.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cno_wait.lo `test -f 'dapl/udapl/dapl_cno_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_wait.c
+
+dapl_udapl_libdaplcma_la-dapl_cno_query.lo: dapl/udapl/dapl_cno_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cno_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cno_query.lo `test -f 'dapl/udapl/dapl_cno_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_query.c
+
+dapl_udapl_libdaplcma_la-dapl_lmr_create.lo: dapl/udapl/dapl_lmr_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_lmr_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_lmr_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_lmr_create.lo `test -f 'dapl/udapl/dapl_lmr_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_lmr_create.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_wait.lo: dapl/udapl/dapl_evd_wait.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_wait.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_wait.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_wait.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_wait.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_wait.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_wait.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_wait.lo `test -f 'dapl/udapl/dapl_evd_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_wait.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_disable.lo: dapl/udapl/dapl_evd_disable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_disable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_disable.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_disable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_disable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_disable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_disable.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_disable.lo `test -f 'dapl/udapl/dapl_evd_disable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_disable.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_enable.lo: dapl/udapl/dapl_evd_enable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_enable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_enable.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_enable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_enable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_enable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_enable.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_enable.lo `test -f 'dapl/udapl/dapl_evd_enable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_enable.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.lo: dapl/udapl/dapl_evd_modify_cno.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_modify_cno.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_modify_cno.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_evd_set_unwaitable.lo: dapl/udapl/dapl_evd_set_unwaitable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_set_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_set_unwaitable.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_set_unwaitable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_set_unwaitable.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_evd_clear_unwaitable.lo: dapl/udapl/dapl_evd_clear_unwaitable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_clear_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_clear_unwaitable.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_clear_unwaitable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_clear_unwaitable.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_osd.lo: dapl/udapl/linux/dapl_osd.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_osd.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_osd.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_osd.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_osd.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_osd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/linux/dapl_osd.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c
+
+dapl_udapl_libdaplcma_la-dapl_cookie.lo: dapl/common/dapl_cookie.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cookie.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cookie.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cookie.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cookie.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cookie.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cookie.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c
+
+dapl_udapl_libdaplcma_la-dapl_cr_accept.lo: dapl/common/dapl_cr_accept.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cr_accept.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_accept.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_accept.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_accept.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_accept.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_accept.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cr_accept.lo `test -f 'dapl/common/dapl_cr_accept.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_accept.c
+
+dapl_udapl_libdaplcma_la-dapl_cr_query.lo: dapl/common/dapl_cr_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cr_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cr_query.lo `test -f 'dapl/common/dapl_cr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_query.c
+
+dapl_udapl_libdaplcma_la-dapl_cr_reject.lo: dapl/common/dapl_cr_reject.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cr_reject.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_reject.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_reject.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_reject.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_reject.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_reject.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cr_reject.lo `test -f 'dapl/common/dapl_cr_reject.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_reject.c
+
+dapl_udapl_libdaplcma_la-dapl_cr_util.lo: dapl/common/dapl_cr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cr_util.lo `test -f 'dapl/common/dapl_cr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_util.c
+
+dapl_udapl_libdaplcma_la-dapl_cr_callback.lo: dapl/common/dapl_cr_callback.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cr_callback.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_callback.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_callback.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_callback.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_callback.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_callback.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cr_callback.lo `test -f 'dapl/common/dapl_cr_callback.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_callback.c
+
+dapl_udapl_libdaplcma_la-dapl_cr_handoff.lo: dapl/common/dapl_cr_handoff.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cr_handoff.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_handoff.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_handoff.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_handoff.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cr_handoff.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_handoff.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cr_handoff.lo `test -f 'dapl/common/dapl_cr_handoff.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_handoff.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_connect.lo: dapl/common/dapl_ep_connect.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_connect.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_connect.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_connect.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_connect.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_connect.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_connect.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_connect.lo `test -f 'dapl/common/dapl_ep_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_connect.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_create.lo: dapl/common/dapl_ep_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_create.lo `test -f 'dapl/common/dapl_ep_create.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_disconnect.lo: dapl/common/dapl_ep_disconnect.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_disconnect.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_disconnect.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_disconnect.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_disconnect.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_disconnect.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_disconnect.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_disconnect.lo `test -f 'dapl/common/dapl_ep_disconnect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_disconnect.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.lo: dapl/common/dapl_ep_dup_connect.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_dup_connect.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_dup_connect.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_free.lo: dapl/common/dapl_ep_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_free.lo `test -f 'dapl/common/dapl_ep_free.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_free.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_reset.lo: dapl/common/dapl_ep_reset.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_reset.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_reset.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_reset.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_reset.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_reset.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_reset.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_reset.lo `test -f 'dapl/common/dapl_ep_reset.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_reset.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_get_status.lo: dapl/common/dapl_ep_get_status.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_get_status.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_get_status.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_get_status.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_get_status.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_get_status.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_get_status.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_modify.lo: dapl/common/dapl_ep_modify.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_modify.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_modify.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_modify.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_modify.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_modify.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_modify.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_modify.lo `test -f 'dapl/common/dapl_ep_modify.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_modify.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.lo: dapl/common/dapl_ep_post_rdma_read.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.Tpo" -c -o dapl_udapl_libdaplcma_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_read.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_read.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_post_rdma_write.lo: dapl/common/dapl_ep_post_rdma_write.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_write.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_write.Tpo" -c -o dapl_udapl_libdaplcma_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_write.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_write.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_rdma_write.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_write.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_post_recv.lo: dapl/common/dapl_ep_post_recv.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_post_recv.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_recv.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_recv.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_recv.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_recv.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_recv.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_post_send.lo: dapl/common/dapl_ep_post_send.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_post_send.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_send.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_send.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_send.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_post_send.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_send.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_query.lo: dapl/common/dapl_ep_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_query.lo `test -f 'dapl/common/dapl_ep_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_query.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_util.lo: dapl/common/dapl_ep_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ep_util.lo `test -f 'dapl/common/dapl_ep_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_util.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_dequeue.lo: dapl/common/dapl_evd_dequeue.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_dequeue.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dequeue.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dequeue.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dequeue.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dequeue.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dequeue.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_dequeue.lo `test -f 'dapl/common/dapl_evd_dequeue.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dequeue.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_free.lo: dapl/common/dapl_evd_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_free.lo `test -f 'dapl/common/dapl_evd_free.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_free.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_post_se.lo: dapl/common/dapl_evd_post_se.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_post_se.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_post_se.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_post_se.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_post_se.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_post_se.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_post_se.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_evd_resize.lo: dapl/common/dapl_evd_resize.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_resize.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_resize.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_resize.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_resize.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_resize.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_resize.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_resize.lo `test -f 'dapl/common/dapl_evd_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_resize.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_util.lo: dapl/common/dapl_evd_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_evd_util.lo `test -f 'dapl/common/dapl_evd_util.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_util.c
+
+dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.lo: dapl/common/dapl_evd_cq_async_error_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.Tpo" -c -o dapl_udapl_libdaplcma_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_ [...]
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_cq_async_error_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_cq_async_error_callb.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_evd_qp_async_error_callb.lo: dapl/common/dapl_evd_qp_async_error_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_qp_async_error_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_qp_async_error_callb.Tpo" -c -o dapl_udapl_libdaplcma_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_ [...]
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_qp_async_error_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_qp_async_error_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_qp_async_error_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_qp_async_error_callb.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_evd_un_async_error_callb.lo: dapl/common/dapl_evd_un_async_error_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_un_async_error_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_un_async_error_callb.Tpo" -c -o dapl_udapl_libdaplcma_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_ [...]
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_un_async_error_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_un_async_error_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_un_async_error_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_un_async_error_callb.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_evd_connection_callb.lo: dapl/common/dapl_evd_connection_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.lo `test -f 'dapl/common/dapl_evd_connection_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_connection_callb.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_connection_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_connection_callb.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_evd_dto_callb.lo: dapl/common/dapl_evd_dto_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_evd_dto_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dto_callb.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dto_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dto_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_evd_dto_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dto_callb.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_get_consumer_context.lo: dapl/common/dapl_get_consumer_context.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_get_consumer_context.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_consumer_context.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_get_consumer_context.lo `test -f 'dapl/common/dapl_get_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_get_consumer_context.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_consumer_context.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_consumer_context.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_consumer_context.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_consumer_context.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_get_handle_type.lo: dapl/common/dapl_get_handle_type.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_get_handle_type.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_handle_type.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_handle_type.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_handle_type.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_get_handle_type.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_handle_type.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_hash.lo: dapl/common/dapl_hash.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_hash.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hash.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hash.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hash.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hash.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hash.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c
+
+dapl_udapl_libdaplcma_la-dapl_hca_util.lo: dapl/common/dapl_hca_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_hca_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hca_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hca_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hca_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_hca_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hca_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_hca_util.lo `test -f 'dapl/common/dapl_hca_util.c' || echo '$(srcdir)/'`dapl/common/dapl_hca_util.c
+
+dapl_udapl_libdaplcma_la-dapl_ia_close.lo: dapl/common/dapl_ia_close.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ia_close.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_close.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_close.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_close.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_close.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_close.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ia_close.lo `test -f 'dapl/common/dapl_ia_close.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_close.c
+
+dapl_udapl_libdaplcma_la-dapl_ia_open.lo: dapl/common/dapl_ia_open.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ia_open.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_open.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_open.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_open.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_open.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_open.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ia_open.lo `test -f 'dapl/common/dapl_ia_open.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_open.c
+
+dapl_udapl_libdaplcma_la-dapl_ia_query.lo: dapl/common/dapl_ia_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ia_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ia_query.lo `test -f 'dapl/common/dapl_ia_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_query.c
+
+dapl_udapl_libdaplcma_la-dapl_ia_util.lo: dapl/common/dapl_ia_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ia_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ia_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_ia_util.lo `test -f 'dapl/common/dapl_ia_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_util.c
+
+dapl_udapl_libdaplcma_la-dapl_llist.lo: dapl/common/dapl_llist.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_llist.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_llist.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_llist.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_llist.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_llist.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_llist.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c
+
+dapl_udapl_libdaplcma_la-dapl_lmr_free.lo: dapl/common/dapl_lmr_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_lmr_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_lmr_free.lo `test -f 'dapl/common/dapl_lmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_free.c
+
+dapl_udapl_libdaplcma_la-dapl_lmr_query.lo: dapl/common/dapl_lmr_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_lmr_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_lmr_query.lo `test -f 'dapl/common/dapl_lmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_query.c
+
+dapl_udapl_libdaplcma_la-dapl_lmr_util.lo: dapl/common/dapl_lmr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_lmr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_lmr_util.lo `test -f 'dapl/common/dapl_lmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_util.c
+
+dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.lo: dapl/common/dapl_lmr_sync_rdma_read.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.Tpo" -c -o dapl_udapl_libdaplcma_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_read.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_read.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_lmr_sync_rdma_write.lo: dapl/common/dapl_lmr_sync_rdma_write.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_write.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_write.Tpo" -c -o dapl_udapl_libdaplcma_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_write.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_write.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_lmr_sync_rdma_write.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_write.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_mr_util.lo: dapl/common/dapl_mr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_mr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_mr_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_mr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_mr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_mr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_mr_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_mr_util.lo `test -f 'dapl/common/dapl_mr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_mr_util.c
+
+dapl_udapl_libdaplcma_la-dapl_provider.lo: dapl/common/dapl_provider.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_provider.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_provider.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_provider.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_provider.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_provider.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_provider.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c
+
+dapl_udapl_libdaplcma_la-dapl_sp_util.lo: dapl/common/dapl_sp_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_sp_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_sp_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_sp_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_sp_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_sp_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_sp_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_sp_util.lo `test -f 'dapl/common/dapl_sp_util.c' || echo '$(srcdir)/'`dapl/common/dapl_sp_util.c
+
+dapl_udapl_libdaplcma_la-dapl_psp_create.lo: dapl/common/dapl_psp_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_psp_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_psp_create.lo `test -f 'dapl/common/dapl_psp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create.c
+
+dapl_udapl_libdaplcma_la-dapl_psp_create_any.lo: dapl/common/dapl_psp_create_any.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_psp_create_any.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create_any.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create_any.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create_any.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_create_any.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create_any.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_psp_free.lo: dapl/common/dapl_psp_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_psp_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_psp_free.lo `test -f 'dapl/common/dapl_psp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_free.c
+
+dapl_udapl_libdaplcma_la-dapl_psp_query.lo: dapl/common/dapl_psp_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_psp_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_psp_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_psp_query.lo `test -f 'dapl/common/dapl_psp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_query.c
+
+dapl_udapl_libdaplcma_la-dapl_pz_create.lo: dapl/common/dapl_pz_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_pz_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_pz_create.lo `test -f 'dapl/common/dapl_pz_create.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_create.c
+
+dapl_udapl_libdaplcma_la-dapl_pz_free.lo: dapl/common/dapl_pz_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_pz_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_pz_free.lo `test -f 'dapl/common/dapl_pz_free.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_free.c
+
+dapl_udapl_libdaplcma_la-dapl_pz_query.lo: dapl/common/dapl_pz_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_pz_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_pz_query.lo `test -f 'dapl/common/dapl_pz_query.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_query.c
+
+dapl_udapl_libdaplcma_la-dapl_pz_util.lo: dapl/common/dapl_pz_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_pz_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_pz_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_pz_util.lo `test -f 'dapl/common/dapl_pz_util.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_util.c
+
+dapl_udapl_libdaplcma_la-dapl_rmr_create.lo: dapl/common/dapl_rmr_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rmr_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rmr_create.lo `test -f 'dapl/common/dapl_rmr_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_create.c
+
+dapl_udapl_libdaplcma_la-dapl_rmr_free.lo: dapl/common/dapl_rmr_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rmr_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rmr_free.lo `test -f 'dapl/common/dapl_rmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_free.c
+
+dapl_udapl_libdaplcma_la-dapl_rmr_bind.lo: dapl/common/dapl_rmr_bind.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rmr_bind.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_bind.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_bind.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_bind.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_bind.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_bind.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rmr_bind.lo `test -f 'dapl/common/dapl_rmr_bind.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_bind.c
+
+dapl_udapl_libdaplcma_la-dapl_rmr_query.lo: dapl/common/dapl_rmr_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rmr_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rmr_query.lo `test -f 'dapl/common/dapl_rmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_query.c
+
+dapl_udapl_libdaplcma_la-dapl_rmr_util.lo: dapl/common/dapl_rmr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rmr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rmr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rmr_util.lo `test -f 'dapl/common/dapl_rmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_util.c
+
+dapl_udapl_libdaplcma_la-dapl_rsp_create.lo: dapl/common/dapl_rsp_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rsp_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rsp_create.lo `test -f 'dapl/common/dapl_rsp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_create.c
+
+dapl_udapl_libdaplcma_la-dapl_rsp_free.lo: dapl/common/dapl_rsp_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rsp_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rsp_free.lo `test -f 'dapl/common/dapl_rsp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_free.c
+
+dapl_udapl_libdaplcma_la-dapl_rsp_query.lo: dapl/common/dapl_rsp_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_rsp_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_rsp_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_rsp_query.lo `test -f 'dapl/common/dapl_rsp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_query.c
+
+dapl_udapl_libdaplcma_la-dapl_cno_util.lo: dapl/common/dapl_cno_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_cno_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_cno_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cno_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_cno_util.lo `test -f 'dapl/common/dapl_cno_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cno_util.c
+
+dapl_udapl_libdaplcma_la-dapl_set_consumer_context.lo: dapl/common/dapl_set_consumer_context.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_set_consumer_context.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_set_consumer_context.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_set_consumer_context.lo `test -f 'dapl/common/dapl_set_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_set_consumer_context.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_set_consumer_context.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_set_consumer_context.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_set_consumer_context.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_set_consumer_context.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ring_buffer_util.lo: dapl/common/dapl_ring_buffer_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ring_buffer_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ring_buffer_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ring_buffer_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ring_buffer_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ring_buffer_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ring_buffer_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_name_service.lo: dapl/common/dapl_name_service.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_name_service.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_name_service.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_name_service.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_name_service.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_name_service.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_name_service.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_name_service.lo `test -f 'dapl/common/dapl_name_service.c' || echo '$(srcdir)/'`dapl/common/dapl_name_service.c
+
+dapl_udapl_libdaplcma_la-dapl_timer_util.lo: dapl/common/dapl_timer_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_timer_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_timer_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_timer_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_timer_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_timer_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_timer_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_timer_util.lo `test -f 'dapl/common/dapl_timer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_timer_util.c
+
+dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.lo: dapl/common/dapl_ep_create_with_srq.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.Tpo" -c -o dapl_udapl_libdaplcma_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_create_with_srq.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create_with_srq.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_recv_query.lo: dapl/common/dapl_ep_recv_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_recv_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_recv_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_recv_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_recv_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_recv_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_recv_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ep_set_watermark.lo: dapl/common/dapl_ep_set_watermark.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ep_set_watermark.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_set_watermark.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_set_watermark.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_set_watermark.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ep_set_watermark.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_set_watermark.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_srq_create.lo: dapl/common/dapl_srq_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_srq_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_create.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_create.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_srq_create.lo `test -f 'dapl/common/dapl_srq_create.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_create.c
+
+dapl_udapl_libdaplcma_la-dapl_srq_free.lo: dapl/common/dapl_srq_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_srq_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_free.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_free.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_srq_free.lo `test -f 'dapl/common/dapl_srq_free.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_free.c
+
+dapl_udapl_libdaplcma_la-dapl_srq_query.lo: dapl/common/dapl_srq_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_srq_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_query.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_query.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_srq_query.lo `test -f 'dapl/common/dapl_srq_query.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_query.c
+
+dapl_udapl_libdaplcma_la-dapl_srq_resize.lo: dapl/common/dapl_srq_resize.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_srq_resize.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_resize.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_resize.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_resize.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_resize.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_resize.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_srq_resize.lo `test -f 'dapl/common/dapl_srq_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_resize.c
+
+dapl_udapl_libdaplcma_la-dapl_srq_post_recv.lo: dapl/common/dapl_srq_post_recv.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_srq_post_recv.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_post_recv.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_post_recv.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_post_recv.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_post_recv.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_post_recv.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_srq_set_lw.lo: dapl/common/dapl_srq_set_lw.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_srq_set_lw.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_set_lw.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_set_lw.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_set_lw.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_set_lw.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_set_lw.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_srq_util.lo: dapl/common/dapl_srq_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_srq_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_srq_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_srq_util.lo `test -f 'dapl/common/dapl_srq_util.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_util.c
+
+dapl_udapl_libdaplcma_la-dapl_debug.lo: dapl/common/dapl_debug.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_debug.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_debug.Tpo" -c -o dapl_udapl_libdaplcma_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_debug.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_debug.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_debug.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_debug.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c
+
+dapl_udapl_libdaplcma_la-dapl_ib_util.lo: dapl/openib_cma/dapl_ib_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ib_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_util.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_util.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ib_cq.lo: dapl/openib_cma/dapl_ib_cq.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ib_cq.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cq.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cq.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cq.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cq.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_cq.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ib_qp.lo: dapl/openib_cma/dapl_ib_qp.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ib_qp.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_qp.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_qp.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_qp.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_qp.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_qp.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ib_cm.lo: dapl/openib_cma/dapl_ib_cm.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ib_cm.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cm.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cm.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cm.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_cm.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_cm.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplcma_la-dapl_ib_mem.lo: dapl/openib_cma/dapl_ib_mem.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplcma_la-dapl_ib_mem.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_mem.Tpo" -c -o dapl_udapl_libdaplcma_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_mem.Tpo" "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_mem.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplcma_la-dapl_ib_mem.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_cma/dapl_ib_mem.c' object='dapl_udapl_libdaplcma_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplcma_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplcma_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_libdaplscm_la-dapl_init.lo: dapl/udapl/dapl_init.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_init.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_init.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_init.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_init.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_init.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_init.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_init.lo `test -f 'dapl/udapl/dapl_init.c' || echo '$(srcdir)/'`dapl/udapl/dapl_init.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_create.lo: dapl/udapl/dapl_evd_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_create.lo `test -f 'dapl/udapl/dapl_evd_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_create.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_query.lo: dapl/udapl/dapl_evd_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_query.lo `test -f 'dapl/udapl/dapl_evd_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_query.c
+
+dapl_udapl_libdaplscm_la-dapl_cno_create.lo: dapl/udapl/dapl_cno_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cno_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cno_create.lo `test -f 'dapl/udapl/dapl_cno_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_create.c
+
+dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.lo: dapl/udapl/dapl_cno_modify_agent.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_modify_agent.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_modify_agent.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_cno_free.lo: dapl/udapl/dapl_cno_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cno_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cno_free.lo `test -f 'dapl/udapl/dapl_cno_free.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_free.c
+
+dapl_udapl_libdaplscm_la-dapl_cno_wait.lo: dapl/udapl/dapl_cno_wait.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cno_wait.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_wait.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_wait.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_wait.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_wait.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_wait.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cno_wait.lo `test -f 'dapl/udapl/dapl_cno_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_wait.c
+
+dapl_udapl_libdaplscm_la-dapl_cno_query.lo: dapl/udapl/dapl_cno_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cno_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_cno_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cno_query.lo `test -f 'dapl/udapl/dapl_cno_query.c' || echo '$(srcdir)/'`dapl/udapl/dapl_cno_query.c
+
+dapl_udapl_libdaplscm_la-dapl_lmr_create.lo: dapl/udapl/dapl_lmr_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_lmr_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_lmr_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_lmr_create.lo `test -f 'dapl/udapl/dapl_lmr_create.c' || echo '$(srcdir)/'`dapl/udapl/dapl_lmr_create.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_wait.lo: dapl/udapl/dapl_evd_wait.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_wait.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_wait.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_wait.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_wait.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_wait.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_wait.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_wait.lo `test -f 'dapl/udapl/dapl_evd_wait.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_wait.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_disable.lo: dapl/udapl/dapl_evd_disable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_disable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_disable.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_disable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_disable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_disable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_disable.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_disable.lo `test -f 'dapl/udapl/dapl_evd_disable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_disable.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_enable.lo: dapl/udapl/dapl_evd_enable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_enable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_enable.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_enable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_enable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_enable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_enable.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_enable.lo `test -f 'dapl/udapl/dapl_evd_enable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_enable.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.lo: dapl/udapl/dapl_evd_modify_cno.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_modify_cno.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_modify_cno.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_evd_set_unwaitable.lo: dapl/udapl/dapl_evd_set_unwaitable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_set_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_set_unwaitable.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_set_unwaitable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_set_unwaitable.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_evd_clear_unwaitable.lo: dapl/udapl/dapl_evd_clear_unwaitable.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.lo `test -f 'dapl/udapl/dapl_evd_clear_unwaitable.c' || echo '$(srcdir)/'`dapl/udapl/dapl_evd_clear_unwaitable.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_clear_unwaitable.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/dapl_evd_clear_unwaitable.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_osd.lo: dapl/udapl/linux/dapl_osd.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_osd.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_osd.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_osd.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_osd.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_osd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/udapl/linux/dapl_osd.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_osd.lo `test -f 'dapl/udapl/linux/dapl_osd.c' || echo '$(srcdir)/'`dapl/udapl/linux/dapl_osd.c
+
+dapl_udapl_libdaplscm_la-dapl_cookie.lo: dapl/common/dapl_cookie.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cookie.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cookie.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cookie.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cookie.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cookie.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cookie.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cookie.lo `test -f 'dapl/common/dapl_cookie.c' || echo '$(srcdir)/'`dapl/common/dapl_cookie.c
+
+dapl_udapl_libdaplscm_la-dapl_cr_accept.lo: dapl/common/dapl_cr_accept.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cr_accept.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_accept.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_accept.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_accept.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_accept.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_accept.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cr_accept.lo `test -f 'dapl/common/dapl_cr_accept.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_accept.c
+
+dapl_udapl_libdaplscm_la-dapl_cr_query.lo: dapl/common/dapl_cr_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cr_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cr_query.lo `test -f 'dapl/common/dapl_cr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_query.c
+
+dapl_udapl_libdaplscm_la-dapl_cr_reject.lo: dapl/common/dapl_cr_reject.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cr_reject.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_reject.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_reject.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_reject.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_reject.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_reject.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cr_reject.lo `test -f 'dapl/common/dapl_cr_reject.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_reject.c
+
+dapl_udapl_libdaplscm_la-dapl_cr_util.lo: dapl/common/dapl_cr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cr_util.lo `test -f 'dapl/common/dapl_cr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_util.c
+
+dapl_udapl_libdaplscm_la-dapl_cr_callback.lo: dapl/common/dapl_cr_callback.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cr_callback.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_callback.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_callback.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_callback.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_callback.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_callback.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cr_callback.lo `test -f 'dapl/common/dapl_cr_callback.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_callback.c
+
+dapl_udapl_libdaplscm_la-dapl_cr_handoff.lo: dapl/common/dapl_cr_handoff.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cr_handoff.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_handoff.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_handoff.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_handoff.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cr_handoff.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cr_handoff.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cr_handoff.lo `test -f 'dapl/common/dapl_cr_handoff.c' || echo '$(srcdir)/'`dapl/common/dapl_cr_handoff.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_connect.lo: dapl/common/dapl_ep_connect.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_connect.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_connect.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_connect.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_connect.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_connect.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_connect.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_connect.lo `test -f 'dapl/common/dapl_ep_connect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_connect.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_create.lo: dapl/common/dapl_ep_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_create.lo `test -f 'dapl/common/dapl_ep_create.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_create.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_disconnect.lo: dapl/common/dapl_ep_disconnect.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_disconnect.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_disconnect.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_disconnect.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_disconnect.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_disconnect.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_disconnect.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_disconnect.lo `test -f 'dapl/common/dapl_ep_disconnect.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_disconnect.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.lo: dapl/common/dapl_ep_dup_connect.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_dup_connect.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_dup_connect.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_free.lo: dapl/common/dapl_ep_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_free.lo `test -f 'dapl/common/dapl_ep_free.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_free.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_reset.lo: dapl/common/dapl_ep_reset.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_reset.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_reset.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_reset.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_reset.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_reset.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_reset.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_reset.lo `test -f 'dapl/common/dapl_ep_reset.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_reset.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_get_status.lo: dapl/common/dapl_ep_get_status.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_get_status.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_get_status.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_get_status.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_get_status.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_get_status.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_get_status.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_modify.lo: dapl/common/dapl_ep_modify.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_modify.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_modify.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_modify.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_modify.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_modify.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_modify.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_modify.lo `test -f 'dapl/common/dapl_ep_modify.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_modify.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.lo: dapl/common/dapl_ep_post_rdma_read.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.Tpo" -c -o dapl_udapl_libdaplscm_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_read.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_read.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_post_rdma_write.lo: dapl/common/dapl_ep_post_rdma_write.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_write.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_write.Tpo" -c -o dapl_udapl_libdaplscm_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_write.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_write.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_rdma_write.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_rdma_write.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_post_recv.lo: dapl/common/dapl_ep_post_recv.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_post_recv.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_recv.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_recv.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_recv.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_recv.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_recv.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_post_send.lo: dapl/common/dapl_ep_post_send.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_post_send.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_send.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_send.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_send.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_post_send.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_post_send.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_query.lo: dapl/common/dapl_ep_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_query.lo `test -f 'dapl/common/dapl_ep_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_query.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_util.lo: dapl/common/dapl_ep_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ep_util.lo `test -f 'dapl/common/dapl_ep_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ep_util.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_dequeue.lo: dapl/common/dapl_evd_dequeue.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_dequeue.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dequeue.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dequeue.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dequeue.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dequeue.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dequeue.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_dequeue.lo `test -f 'dapl/common/dapl_evd_dequeue.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_dequeue.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_free.lo: dapl/common/dapl_evd_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_free.lo `test -f 'dapl/common/dapl_evd_free.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_free.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_post_se.lo: dapl/common/dapl_evd_post_se.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_post_se.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_post_se.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_post_se.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_post_se.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_post_se.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_post_se.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_evd_resize.lo: dapl/common/dapl_evd_resize.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_resize.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_resize.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_resize.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_resize.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_resize.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_resize.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_resize.lo `test -f 'dapl/common/dapl_evd_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_resize.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_util.lo: dapl/common/dapl_evd_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_evd_util.lo `test -f 'dapl/common/dapl_evd_util.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_util.c
+
+dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.lo: dapl/common/dapl_evd_cq_async_error_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.Tpo" -c -o dapl_udapl_libdaplscm_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_ [...]
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_cq_async_error_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_cq_async_error_callb.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_evd_qp_async_error_callb.lo: dapl/common/dapl_evd_qp_async_error_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_qp_async_error_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_qp_async_error_callb.Tpo" -c -o dapl_udapl_libdaplscm_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_ [...]
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_qp_async_error_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_qp_async_error_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_qp_async_error_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_qp_async_error_callb.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_evd_un_async_error_callb.lo: dapl/common/dapl_evd_un_async_error_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_un_async_error_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_un_async_error_callb.Tpo" -c -o dapl_udapl_libdaplscm_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_ [...]
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_un_async_error_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_un_async_error_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_un_async_error_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_un_async_error_callb.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_evd_connection_callb.lo: dapl/common/dapl_evd_connection_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.lo `test -f 'dapl/common/dapl_evd_connection_callb.c' || echo '$(srcdir)/'`dapl/common/dapl_evd_connection_callb.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_connection_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_connection_callb.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_evd_dto_callb.lo: dapl/common/dapl_evd_dto_callb.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_evd_dto_callb.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dto_callb.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dto_callb.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dto_callb.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_evd_dto_callb.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_evd_dto_callb.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_get_consumer_context.lo: dapl/common/dapl_get_consumer_context.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_get_consumer_context.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_consumer_context.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_get_consumer_context.lo `test -f 'dapl/common/dapl_get_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_get_consumer_context.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_consumer_context.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_consumer_context.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_consumer_context.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_consumer_context.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_get_handle_type.lo: dapl/common/dapl_get_handle_type.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_get_handle_type.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_handle_type.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_handle_type.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_handle_type.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_get_handle_type.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_get_handle_type.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_hash.lo: dapl/common/dapl_hash.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_hash.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hash.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hash.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hash.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hash.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hash.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_hash.lo `test -f 'dapl/common/dapl_hash.c' || echo '$(srcdir)/'`dapl/common/dapl_hash.c
+
+dapl_udapl_libdaplscm_la-dapl_hca_util.lo: dapl/common/dapl_hca_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_hca_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hca_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hca_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hca_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_hca_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_hca_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_hca_util.lo `test -f 'dapl/common/dapl_hca_util.c' || echo '$(srcdir)/'`dapl/common/dapl_hca_util.c
+
+dapl_udapl_libdaplscm_la-dapl_ia_close.lo: dapl/common/dapl_ia_close.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ia_close.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_close.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_close.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_close.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_close.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_close.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ia_close.lo `test -f 'dapl/common/dapl_ia_close.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_close.c
+
+dapl_udapl_libdaplscm_la-dapl_ia_open.lo: dapl/common/dapl_ia_open.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ia_open.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_open.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_open.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_open.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_open.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_open.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ia_open.lo `test -f 'dapl/common/dapl_ia_open.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_open.c
+
+dapl_udapl_libdaplscm_la-dapl_ia_query.lo: dapl/common/dapl_ia_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ia_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ia_query.lo `test -f 'dapl/common/dapl_ia_query.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_query.c
+
+dapl_udapl_libdaplscm_la-dapl_ia_util.lo: dapl/common/dapl_ia_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ia_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ia_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ia_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ia_util.lo `test -f 'dapl/common/dapl_ia_util.c' || echo '$(srcdir)/'`dapl/common/dapl_ia_util.c
+
+dapl_udapl_libdaplscm_la-dapl_llist.lo: dapl/common/dapl_llist.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_llist.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_llist.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_llist.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_llist.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_llist.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_llist.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_llist.lo `test -f 'dapl/common/dapl_llist.c' || echo '$(srcdir)/'`dapl/common/dapl_llist.c
+
+dapl_udapl_libdaplscm_la-dapl_lmr_free.lo: dapl/common/dapl_lmr_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_lmr_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_lmr_free.lo `test -f 'dapl/common/dapl_lmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_free.c
+
+dapl_udapl_libdaplscm_la-dapl_lmr_query.lo: dapl/common/dapl_lmr_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_lmr_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_lmr_query.lo `test -f 'dapl/common/dapl_lmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_query.c
+
+dapl_udapl_libdaplscm_la-dapl_lmr_util.lo: dapl/common/dapl_lmr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_lmr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_lmr_util.lo `test -f 'dapl/common/dapl_lmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_lmr_util.c
+
+dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.lo: dapl/common/dapl_lmr_sync_rdma_read.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.Tpo" -c -o dapl_udapl_libdaplscm_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_read.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_read.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_lmr_sync_rdma_write.lo: dapl/common/dapl_lmr_sync_rdma_write.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_write.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_write.Tpo" -c -o dapl_udapl_libdaplscm_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_write.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_write.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_lmr_sync_rdma_write.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_lmr_sync_rdma_write.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_mr_util.lo: dapl/common/dapl_mr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_mr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_mr_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_mr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_mr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_mr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_mr_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_mr_util.lo `test -f 'dapl/common/dapl_mr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_mr_util.c
+
+dapl_udapl_libdaplscm_la-dapl_provider.lo: dapl/common/dapl_provider.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_provider.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_provider.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_provider.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_provider.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_provider.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_provider.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_provider.lo `test -f 'dapl/common/dapl_provider.c' || echo '$(srcdir)/'`dapl/common/dapl_provider.c
+
+dapl_udapl_libdaplscm_la-dapl_sp_util.lo: dapl/common/dapl_sp_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_sp_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_sp_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_sp_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_sp_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_sp_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_sp_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_sp_util.lo `test -f 'dapl/common/dapl_sp_util.c' || echo '$(srcdir)/'`dapl/common/dapl_sp_util.c
+
+dapl_udapl_libdaplscm_la-dapl_psp_create.lo: dapl/common/dapl_psp_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_psp_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_psp_create.lo `test -f 'dapl/common/dapl_psp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_create.c
+
+dapl_udapl_libdaplscm_la-dapl_psp_create_any.lo: dapl/common/dapl_psp_create_any.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_psp_create_any.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create_any.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create_any.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create_any.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_create_any.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_create_any.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_psp_free.lo: dapl/common/dapl_psp_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_psp_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_psp_free.lo `test -f 'dapl/common/dapl_psp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_free.c
+
+dapl_udapl_libdaplscm_la-dapl_psp_query.lo: dapl/common/dapl_psp_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_psp_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_psp_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_psp_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_psp_query.lo `test -f 'dapl/common/dapl_psp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_psp_query.c
+
+dapl_udapl_libdaplscm_la-dapl_pz_create.lo: dapl/common/dapl_pz_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_pz_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_pz_create.lo `test -f 'dapl/common/dapl_pz_create.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_create.c
+
+dapl_udapl_libdaplscm_la-dapl_pz_free.lo: dapl/common/dapl_pz_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_pz_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_pz_free.lo `test -f 'dapl/common/dapl_pz_free.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_free.c
+
+dapl_udapl_libdaplscm_la-dapl_pz_query.lo: dapl/common/dapl_pz_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_pz_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_pz_query.lo `test -f 'dapl/common/dapl_pz_query.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_query.c
+
+dapl_udapl_libdaplscm_la-dapl_pz_util.lo: dapl/common/dapl_pz_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_pz_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_pz_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_pz_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_pz_util.lo `test -f 'dapl/common/dapl_pz_util.c' || echo '$(srcdir)/'`dapl/common/dapl_pz_util.c
+
+dapl_udapl_libdaplscm_la-dapl_rmr_create.lo: dapl/common/dapl_rmr_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rmr_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rmr_create.lo `test -f 'dapl/common/dapl_rmr_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_create.c
+
+dapl_udapl_libdaplscm_la-dapl_rmr_free.lo: dapl/common/dapl_rmr_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rmr_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rmr_free.lo `test -f 'dapl/common/dapl_rmr_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_free.c
+
+dapl_udapl_libdaplscm_la-dapl_rmr_bind.lo: dapl/common/dapl_rmr_bind.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rmr_bind.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_bind.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_bind.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_bind.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_bind.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_bind.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rmr_bind.lo `test -f 'dapl/common/dapl_rmr_bind.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_bind.c
+
+dapl_udapl_libdaplscm_la-dapl_rmr_query.lo: dapl/common/dapl_rmr_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rmr_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rmr_query.lo `test -f 'dapl/common/dapl_rmr_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_query.c
+
+dapl_udapl_libdaplscm_la-dapl_rmr_util.lo: dapl/common/dapl_rmr_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rmr_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rmr_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rmr_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rmr_util.lo `test -f 'dapl/common/dapl_rmr_util.c' || echo '$(srcdir)/'`dapl/common/dapl_rmr_util.c
+
+dapl_udapl_libdaplscm_la-dapl_rsp_create.lo: dapl/common/dapl_rsp_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rsp_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rsp_create.lo `test -f 'dapl/common/dapl_rsp_create.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_create.c
+
+dapl_udapl_libdaplscm_la-dapl_rsp_free.lo: dapl/common/dapl_rsp_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rsp_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rsp_free.lo `test -f 'dapl/common/dapl_rsp_free.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_free.c
+
+dapl_udapl_libdaplscm_la-dapl_rsp_query.lo: dapl/common/dapl_rsp_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_rsp_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_rsp_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_rsp_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_rsp_query.lo `test -f 'dapl/common/dapl_rsp_query.c' || echo '$(srcdir)/'`dapl/common/dapl_rsp_query.c
+
+dapl_udapl_libdaplscm_la-dapl_cno_util.lo: dapl/common/dapl_cno_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_cno_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_cno_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_cno_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_cno_util.lo `test -f 'dapl/common/dapl_cno_util.c' || echo '$(srcdir)/'`dapl/common/dapl_cno_util.c
+
+dapl_udapl_libdaplscm_la-dapl_set_consumer_context.lo: dapl/common/dapl_set_consumer_context.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_set_consumer_context.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_set_consumer_context.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_set_consumer_context.lo `test -f 'dapl/common/dapl_set_consumer_context.c' || echo '$(srcdir)/'`dapl/common/dapl_set_consumer_context.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_set_consumer_context.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_set_consumer_context.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_set_consumer_context.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_set_consumer_context.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ring_buffer_util.lo: dapl/common/dapl_ring_buffer_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ring_buffer_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ring_buffer_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ring_buffer_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ring_buffer_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ring_buffer_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ring_buffer_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_name_service.lo: dapl/common/dapl_name_service.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_name_service.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_name_service.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_name_service.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_name_service.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_name_service.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_name_service.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_name_service.lo `test -f 'dapl/common/dapl_name_service.c' || echo '$(srcdir)/'`dapl/common/dapl_name_service.c
+
+dapl_udapl_libdaplscm_la-dapl_timer_util.lo: dapl/common/dapl_timer_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_timer_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_timer_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_timer_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_timer_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_timer_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_timer_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_timer_util.lo `test -f 'dapl/common/dapl_timer_util.c' || echo '$(srcdir)/'`dapl/common/dapl_timer_util.c
+
+dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.lo: dapl/common/dapl_ep_create_with_srq.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.Tpo" -c -o dapl_udapl_libdaplscm_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; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_create_with_srq.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_create_with_srq.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_recv_query.lo: dapl/common/dapl_ep_recv_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_recv_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_recv_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_recv_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_recv_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_recv_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_recv_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ep_set_watermark.lo: dapl/common/dapl_ep_set_watermark.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ep_set_watermark.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_set_watermark.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_set_watermark.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_set_watermark.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ep_set_watermark.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_ep_set_watermark.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_srq_create.lo: dapl/common/dapl_srq_create.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_srq_create.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_create.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_create.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_create.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_create.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_create.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_srq_create.lo `test -f 'dapl/common/dapl_srq_create.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_create.c
+
+dapl_udapl_libdaplscm_la-dapl_srq_free.lo: dapl/common/dapl_srq_free.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_srq_free.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_free.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_free.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_free.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_free.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_free.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_srq_free.lo `test -f 'dapl/common/dapl_srq_free.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_free.c
+
+dapl_udapl_libdaplscm_la-dapl_srq_query.lo: dapl/common/dapl_srq_query.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_srq_query.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_query.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_query.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_query.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_query.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_query.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_srq_query.lo `test -f 'dapl/common/dapl_srq_query.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_query.c
+
+dapl_udapl_libdaplscm_la-dapl_srq_resize.lo: dapl/common/dapl_srq_resize.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_srq_resize.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_resize.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_resize.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_resize.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_resize.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_resize.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_srq_resize.lo `test -f 'dapl/common/dapl_srq_resize.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_resize.c
+
+dapl_udapl_libdaplscm_la-dapl_srq_post_recv.lo: dapl/common/dapl_srq_post_recv.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_srq_post_recv.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_post_recv.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_post_recv.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_post_recv.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_post_recv.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_post_recv.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_srq_set_lw.lo: dapl/common/dapl_srq_set_lw.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_srq_set_lw.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_set_lw.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_set_lw.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_set_lw.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_set_lw.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_set_lw.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_srq_util.lo: dapl/common/dapl_srq_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_srq_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_srq_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_srq_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_srq_util.lo `test -f 'dapl/common/dapl_srq_util.c' || echo '$(srcdir)/'`dapl/common/dapl_srq_util.c
+
+dapl_udapl_libdaplscm_la-dapl_debug.lo: dapl/common/dapl_debug.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_debug.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_debug.Tpo" -c -o dapl_udapl_libdaplscm_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_debug.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_debug.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_debug.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/common/dapl_debug.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_debug.lo `test -f 'dapl/common/dapl_debug.c' || echo '$(srcdir)/'`dapl/common/dapl_debug.c
+
+dapl_udapl_libdaplscm_la-dapl_ib_util.lo: dapl/openib_scm/dapl_ib_util.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ib_util.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_util.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_util.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_util.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_util.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ib_cq.lo: dapl/openib_scm/dapl_ib_cq.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ib_cq.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cq.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cq.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cq.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cq.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_cq.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ib_qp.lo: dapl/openib_scm/dapl_ib_qp.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ib_qp.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_qp.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_qp.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_qp.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_qp.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_qp.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ib_cm.lo: dapl/openib_scm/dapl_ib_cm.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ib_cm.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cm.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cm.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cm.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_cm.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_cm.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_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_libdaplscm_la-dapl_ib_mem.lo: dapl/openib_scm/dapl_ib_mem.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -MT dapl_udapl_libdaplscm_la-dapl_ib_mem.lo -MD -MP -MF "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_mem.Tpo" -c -o dapl_udapl_libdaplscm_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@	then mv -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_mem.Tpo" "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_mem.Plo"; else rm -f "$(DEPDIR)/dapl_udapl_libdaplscm_la-dapl_ib_mem.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dapl/openib_scm/dapl_ib_mem.c' object='dapl_udapl_libdaplscm_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapl_udapl_libdaplscm_la_CFLAGS) $(CFLAGS) -c -o dapl_udapl_libdaplscm_la-dapl_ib_mem.lo `test -f 'dapl/openib_scm/dapl_ib_mem.c' || echo '$(srcdir)/'`dapl/openib_scm/dapl_ib_mem.c
+
+dat_udat_libdat_la-udat.lo: dat/udat/udat.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-udat.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-udat.Tpo" -c -o dat_udat_libdat_la-udat.lo `test -f 'dat/udat/udat.c' || echo '$(srcdir)/'`dat/udat/udat.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-udat.Tpo" "$(DEPDIR)/dat_udat_libdat_la-udat.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-udat.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/udat.c' object='dat_udat_libdat_la-udat.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-udat.lo `test -f 'dat/udat/udat.c' || echo '$(srcdir)/'`dat/udat/udat.c
+
+dat_udat_libdat_la-udat_api.lo: dat/udat/udat_api.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-udat_api.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-udat_api.Tpo" -c -o dat_udat_libdat_la-udat_api.lo `test -f 'dat/udat/udat_api.c' || echo '$(srcdir)/'`dat/udat/udat_api.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-udat_api.Tpo" "$(DEPDIR)/dat_udat_libdat_la-udat_api.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-udat_api.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/udat_api.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-udat_api.lo `test -f 'dat/udat/udat_api.c' || echo '$(srcdir)/'`dat/udat/udat_api.c
+
+dat_udat_libdat_la-udat_sr_parser.lo: dat/udat/udat_sr_parser.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-udat_sr_parser.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-udat_sr_parser.Tpo" -c -o dat_udat_libdat_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@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-udat_sr_parser.Tpo" "$(DEPDIR)/dat_udat_libdat_la-udat_sr_parser.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-udat_sr_parser.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/udat_sr_parser.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-udat_sr_parser.lo `test -f 'dat/udat/udat_sr_parser.c' || echo '$(srcdir)/'`dat/udat/udat_sr_parser.c
+
+dat_udat_libdat_la-dat_osd.lo: dat/udat/linux/dat_osd.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-dat_osd.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-dat_osd.Tpo" -c -o dat_udat_libdat_la-dat_osd.lo `test -f 'dat/udat/linux/dat_osd.c' || echo '$(srcdir)/'`dat/udat/linux/dat_osd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-dat_osd.Tpo" "$(DEPDIR)/dat_udat_libdat_la-dat_osd.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-dat_osd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/udat/linux/dat_osd.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-dat_osd.lo `test -f 'dat/udat/linux/dat_osd.c' || echo '$(srcdir)/'`dat/udat/linux/dat_osd.c
+
+dat_udat_libdat_la-dat_api.lo: dat/common/dat_api.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-dat_api.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-dat_api.Tpo" -c -o dat_udat_libdat_la-dat_api.lo `test -f 'dat/common/dat_api.c' || echo '$(srcdir)/'`dat/common/dat_api.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-dat_api.Tpo" "$(DEPDIR)/dat_udat_libdat_la-dat_api.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-dat_api.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_api.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-dat_api.lo `test -f 'dat/common/dat_api.c' || echo '$(srcdir)/'`dat/common/dat_api.c
+
+dat_udat_libdat_la-dat_dictionary.lo: dat/common/dat_dictionary.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-dat_dictionary.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-dat_dictionary.Tpo" -c -o dat_udat_libdat_la-dat_dictionary.lo `test -f 'dat/common/dat_dictionary.c' || echo '$(srcdir)/'`dat/common/dat_dictionary.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-dat_dictionary.Tpo" "$(DEPDIR)/dat_udat_libdat_la-dat_dictionary.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-dat_dictionary.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_dictionary.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-dat_dictionary.lo `test -f 'dat/common/dat_dictionary.c' || echo '$(srcdir)/'`dat/common/dat_dictionary.c
+
+dat_udat_libdat_la-dat_strerror.lo: dat/common/dat_strerror.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-dat_strerror.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-dat_strerror.Tpo" -c -o dat_udat_libdat_la-dat_strerror.lo `test -f 'dat/common/dat_strerror.c' || echo '$(srcdir)/'`dat/common/dat_strerror.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-dat_strerror.Tpo" "$(DEPDIR)/dat_udat_libdat_la-dat_strerror.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-dat_strerror.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_strerror.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-dat_strerror.lo `test -f 'dat/common/dat_strerror.c' || echo '$(srcdir)/'`dat/common/dat_strerror.c
+
+dat_udat_libdat_la-dat_init.lo: dat/common/dat_init.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-dat_init.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-dat_init.Tpo" -c -o dat_udat_libdat_la-dat_init.lo `test -f 'dat/common/dat_init.c' || echo '$(srcdir)/'`dat/common/dat_init.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-dat_init.Tpo" "$(DEPDIR)/dat_udat_libdat_la-dat_init.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-dat_init.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_init.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-dat_init.lo `test -f 'dat/common/dat_init.c' || echo '$(srcdir)/'`dat/common/dat_init.c
+
+dat_udat_libdat_la-dat_dr.lo: dat/common/dat_dr.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-dat_dr.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-dat_dr.Tpo" -c -o dat_udat_libdat_la-dat_dr.lo `test -f 'dat/common/dat_dr.c' || echo '$(srcdir)/'`dat/common/dat_dr.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-dat_dr.Tpo" "$(DEPDIR)/dat_udat_libdat_la-dat_dr.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-dat_dr.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_dr.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_la-dat_dr.lo `test -f 'dat/common/dat_dr.c' || echo '$(srcdir)/'`dat/common/dat_dr.c
+
+dat_udat_libdat_la-dat_sr.lo: dat/common/dat_sr.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -MT dat_udat_libdat_la-dat_sr.lo -MD -MP -MF "$(DEPDIR)/dat_udat_libdat_la-dat_sr.Tpo" -c -o dat_udat_libdat_la-dat_sr.lo `test -f 'dat/common/dat_sr.c' || echo '$(srcdir)/'`dat/common/dat_sr.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dat_udat_libdat_la-dat_sr.Tpo" "$(DEPDIR)/dat_udat_libdat_la-dat_sr.Plo"; else rm -f "$(DEPDIR)/dat_udat_libdat_la-dat_sr.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dat/common/dat_sr.c' object='dat_udat_libdat_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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dat_udat_libdat_la_CFLAGS) $(CFLAGS) -c -o dat_udat_libdat_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
+uninstall-info-am:
+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 $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$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 $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$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"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(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; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkdir_p) $(distdir)/. $(distdir)/config $(distdir)/dapl/common $(distdir)/dapl/include $(distdir)/dapl/openib_cma $(distdir)/dapl/openib_scm $(distdir)/dapl/udapl $(distdir)/dapl/udapl/linux $(distdir)/dat/common $(distdir)/dat/include/dat $(distdir)/dat/udat $(distdir)/dat/udat/linux $(distdir)/man $(distdir)/test/dapltest/include $(distdir)/test/dapltest/mdep/linux
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	$(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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(MANS) $(HEADERS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(dapllibcmadir)" "$(DESTDIR)$(dapllibscmdir)" "$(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-dapllibcmaLTLIBRARIES clean-dapllibscmLTLIBRARIES \
+	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-dapllibcmaLTLIBRARIES \
+	install-dapllibscmLTLIBRARIES install-datlibLTLIBRARIES \
+	install-libdatincludeHEADERS install-man
+
+install-exec-am:
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+
+install-info: install-info-recursive
+
+install-man: install-man1 install-man5
+
+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-dapllibcmaLTLIBRARIES \
+	uninstall-dapllibscmLTLIBRARIES uninstall-datlibLTLIBRARIES \
+	uninstall-info-am uninstall-libdatincludeHEADERS uninstall-man
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+
+uninstall-info: uninstall-info-recursive
+
+uninstall-man: uninstall-man1 uninstall-man5
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+	check-am clean clean-dapllibcmaLTLIBRARIES \
+	clean-dapllibscmLTLIBRARIES clean-datlibLTLIBRARIES \
+	clean-generic clean-libtool clean-recursive ctags \
+	ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
+	dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-recursive distclean-tags \
+	distcleancheck distdir distuninstallcheck dvi dvi-am html \
+	html-am info info-am install install-am \
+	install-dapllibcmaLTLIBRARIES install-dapllibscmLTLIBRARIES \
+	install-data install-data-am install-datlibLTLIBRARIES \
+	install-exec install-exec-am install-exec-hook install-info \
+	install-info-am install-libdatincludeHEADERS install-man \
+	install-man1 install-man5 install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-dapllibcmaLTLIBRARIES \
+	uninstall-dapllibscmLTLIBRARIES uninstall-datlibLTLIBRARIES \
+	uninstall-hook uninstall-info-am \
+	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 \
+		echo "exec-hook"; \
+		sed -e '/OpenIB-.*/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$OpenIBdapl; \
+		cp /tmp/$$$$OpenIBdapl $(DESTDIR)$(sysconfdir)/dat.conf; \
+	fi; \
+	echo OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib0 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+	echo OpenIB-cma-1 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib1 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mthca0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mthca0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-ipath0-1 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 '"ipath0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-ipath0-2 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 '"ipath0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-ehca0-2 u1.2 nonthreadsafe default libdaplscm.so.2 dapl.1.2 '"ehca0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-iwarp u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-cma-roe-eth2 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-cma-roe-eth3 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth3 0" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-scm-roe-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf; \
+        echo OpenIB-scm-roe-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> $(DESTDIR)$(sysconfdir)/dat.conf;
+
+uninstall-hook:
+	if test -e $(DESTDIR)$(sysconfdir)/dat.conf; then \
+		sed -e '/OpenIB-.* u1/d' < $(DESTDIR)$(sysconfdir)/dat.conf > /tmp/$$$$OpenIBdapl; \
+		cp /tmp/$$$$OpenIBdapl $(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/README b/README
new file mode 100644
index 0000000..ee1b363
--- /dev/null
+++ b/README
@@ -0,0 +1,413 @@
+
+==========
+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
+
+Installing:
+----------
+make install
+
+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 configuration file, sample OFED
+#
+# Each entry should have the following fields:
+#
+# <ia_name> <api_version> <threadsafety> <default> <lib_path> \
+#           <provider_version> <ia_params> <platform_params>
+#
+# For openib-cma provider you can specify <ia_params> as either:
+# 	network address, network hostname, or netdev name and 0 for port
+#
+# This example shows netdev name, enabling administrator to use same copy across cluster
+#
+OpenIB-cma u1.2 nonthreadsafe default /usr/local/ofed/lib64/libdapl-cma.so mv_dapl.1.2 "ib0 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 RW 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..6b265a6
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,7261 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# 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.
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 48 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+[ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
+[ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_LINKER_BOILERPLATE
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# ------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ---------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# ----------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+    if AC_TRY_EVAL(ac_compile); then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 DLLs
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+# set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix3*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!).  If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately in
+# the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _LT_AC_PROG_CXXCPP
+# ------------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# -------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF
+
+# Report which library types will actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[[12]]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | kfreebsd*-gnu | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+      case $host_cpu in
+      hppa*64*|ia64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+        ;;
+      *)
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  interix3*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # linker. We must also pass each convience library through
+	    # to the system linker between allextract/defaultextract.
+	    # The C++ compiler will combine linker options so we
+	    # cannot just pass the convience library names through
+	    # without $wl.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+interix3*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_AC_TAGVAR(predep_objects,$1)=
+  _LT_AC_TAGVAR(postdep_objects,$1)=
+  _LT_AC_TAGVAR(postdeps,$1)=
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# -------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  _LT_CC_BASENAME([$compiler])
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix3*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 _LT_AC_SYS_LIBPATH_AIX
+	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	   ;;
+	 *)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+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])
+])
+
+# Copyright (C) 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.
+
+# 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.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.9.6])])
+
+# 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
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# 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])
+AC_SUBST([$1_FALSE])
+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
+# 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
+
+# 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], 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/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])
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  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
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+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
+ 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
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$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, 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_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
+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  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 whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# 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="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# 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..574228d
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,58 @@
+/* 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
+
+/* 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..0223495
--- /dev/null
+++ b/config/ltmain.sh
@@ -0,0 +1,6911 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.22
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  SP2NL='tr \100 \n'
+  NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+         save_$lt_var=\$$lt_var
+         $lt_var=C
+         export $lt_var
+       fi"
+done
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+duplicate_deps=no
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+	# Failing that, at least try and use $RANDOM to avoid a race
+	my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+	save_mktempdir_umask=`umask`
+	umask 0077
+	$mkdir "$my_tmpdir"
+	umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || {
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+	exit $EXIT_FAILURE
+      }
+    fi
+
+    $echo "X$my_tmpdir" | $Xsed
+}
+
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         extracted_serial=`expr $extracted_serial + 1`
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
+       esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $exit_status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+disable_libs=no
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+case $disable_libs in
+no) 
+  ;;
+shared)
+  build_libtool_libs=no
+  build_old_libs=yes
+  ;;
+static)
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+  ;;
+esac
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    test "X$libobj" != "X$qlibobj" \
+	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
+	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	exit_status=$?
+	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $exit_status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    notinst_path= # paths that contain not-installed libtool libraries
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static | -static-libtool-libs)
+    case $arg in
+    -all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+    -static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+    -static-libtool-libs)
+      if test -z "$pic_flag" && test -n "$link_static_flag"; then
+        dlopen_self=$dlopen_self_static
+      fi
+      prefer_static_libs=yes
+      ;;
+    esac
+	build_libtool_libs=no
+	build_old_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	darwin_framework|darwin_framework_skip)
+	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework|-arch|-isysroot)
+	case " $CC " in
+	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
+		prev=darwin_framework_skip ;;
+	  *) compiler_flags="$compiler_flags $arg"
+	     prev=darwin_framework ;;
+	esac
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    absdir="$dir"
+	    notinst_path="$notinst_path $dir"
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -pg pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+      -t[45]*|-txscale*|@*)
+
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $exit_status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit $EXIT_FAILURE
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+         { { test "$prefer_static_libs" = no ||
+             test "$prefer_static_libs,$installed" = "built,yes"; } ||
+           test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $absdir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes ; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null |
+                      $EGREP ": [^:]* bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case $libdir in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows|none)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  major=`expr $current - $age + 1`
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+#      for path in $notinst_path; do
+#	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+#	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+#	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+#      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name=`expr $i : '-l\(.*\)'`
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name=`expr $i : '-l\(.*\)'`
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "*** make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name=`expr $a_deplib : '-l\(.*\)'`
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name=`expr $a_deplib : '-l\(.*\)'`
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	  fi
+	fi
+	
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$output_la-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$output_la-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$output_la-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadable object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	    fi
+
+	    exit $lt_exit
+	  }
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      $show "${rm}r $gentop"
+	      $run ${rm}r "$gentop"
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $run eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	cmds=$reload_cmds
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$outputname.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    else
+	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+          case $host in
+          *cygwin* | *mingw* )
+            if test -f "$output_objdir/${outputname}.def" ; then
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            else
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            ;;
+          esac
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	exit_status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $exit_status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+            output_name=`basename $output`
+            output_path=`dirname $output`
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
+            cwrapper="$output_path/$output_name.exe"
+            $rm $cwrappersource $cwrapper
+            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+/* -DDEBUG is fairly common in CFLAGS.  */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
+EOF
+
+            cat >> $cwrappersource <<"EOF"
+  newargz[1] = find_executable(argv[0]);
+  if (newargz[1] == NULL)
+    lt_fatal("Couldn't find %s", argv[0]);
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+
+  for (i=0; i<argc+1; i++)
+  {
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    ;
+  }
+
+EOF
+
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+              ;;
+            esac
+
+            cat >> $cwrappersource <<"EOF"
+  return 127;
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable(const char * path)
+{
+  struct stat st;
+
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0) &&
+      (
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
+      )
+    return 1;
+  else
+    return 0;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
+char *
+find_executable (const char* wrapper)
+{
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
+
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+  {
+    concat_name = xstrdup (wrapper);
+    if (check_executable(concat_name))
+      return concat_name;
+    XFREE(concat_name);
+  }
+  else
+  {
+#endif
+    if (IS_DIR_SEPARATOR (wrapper[0]))
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable(concat_name))
+        return concat_name;
+      XFREE(concat_name);
+    }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+    {
+      has_slash = 1;
+      break;
+    }
+  if (!has_slash)
+  {
+    /* no slashes; search PATH */
+    const char* path = getenv ("PATH");
+    if (path != NULL)
+    {
+      for (p = path; *p; p = p_next)
+      {
+        const char* q;
+        size_t p_len;
+        for (q = p; *q; q++)
+          if (IS_PATH_SEPARATOR(*q))
+            break;
+        p_len = q - p;
+        p_next = (*q == '\0' ? q : q + 1);
+        if (p_len == 0)
+        {
+          /* empty path: current directory */
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
+            lt_fatal ("getcwd failed");
+          tmp_len = strlen(tmp);
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, tmp, tmp_len);
+          concat_name[tmp_len] = '/';
+          strcpy (concat_name + tmp_len + 1, wrapper);
+        }
+        else
+        {
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, p, p_len);
+          concat_name[p_len] = '/';
+          strcpy (concat_name + p_len + 1, wrapper);
+        }
+        if (check_executable(concat_name))
+          return concat_name;
+        XFREE(concat_name);
+      }
+    }
+    /* not found in PATH; assume curdir */
+  }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen(tmp);
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable(concat_name))
+    return concat_name;
+  XFREE(concat_name);
+  return NULL;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+          # we should really use a build-platform specific compiler
+          # here, but OTOH, the wrappers (shell script and this C one)
+          # are only useful if you want to execute the "real" binary.
+          # Since the "real" binary is built for $host, then this
+          # wrapper might as well be built for $host, too.
+          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \$*\"
+      exit $EXIT_FAILURE
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    exit_status=$?
+	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+	      exit $exit_status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) 
+      	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o) prev=$arg ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest=$arg
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+	  else
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || {
+	      lt_exit=$?
+
+	      # Restore the uninstalled library and exit
+	      if test "$mode" = relink; then
+		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	      fi
+
+	      exit $lt_exit
+	    }
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir=`func_mktempdir`
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway 
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  cmds=$finish_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+       eval "if test \"\${save_$lt_var+set}\" = set; then
+               $lt_var=\$save_$lt_var; export $lt_var
+             else
+               $lt_unset $lt_var
+             fi"
+      done
+
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      cmds=$postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      cmds=$old_postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool at gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+disable_libs=shared
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+disable_libs=static
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/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..4439e5c
--- /dev/null
+++ b/configure
@@ -0,0 +1,21740 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for compat-dapl 1.2.19 general at lists.openfabrics.org.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "$0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='compat-dapl'
+PACKAGE_TARNAME='compat-dapl'
+PACKAGE_VERSION='1.2.19 general at lists.openfabrics.org'
+PACKAGE_STRING='compat-dapl 1.2.19 general at lists.openfabrics.org'
+PACKAGE_BUGREPORT=''
+
+ac_unique_file="dat/udat/udat.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INS [...]
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
+
+#
+# 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 compat-dapl 1.2.19 general at lists.openfabrics.org to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of compat-dapl 1.2.19 general at lists.openfabrics.org:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --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
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-tags[=TAGS]
+                          include additional configurations [automatic]
+
+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>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+compat-dapl configure 1.2.19 general at lists.openfabrics.org
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by compat-dapl $as_me 1.2.19 general at lists.openfabrics.org, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+          ac_config_headers="$ac_config_headers config.h"
+
+am__api_version="1.9"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=compat-dapl
+ VERSION=1.2.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-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi;
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi;
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi;
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+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
+
+fi
+
+SED=$lt_cv_path_SED
+
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+NM="$lt_cv_path_NM"
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix3*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 3678 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## -------------------------------------- ##
+## Report this to the compat-dapl lists.  ##
+## -------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+fi
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_F77" && break
+done
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:5277:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ 	]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+  echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDGIRSTW]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+  echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AR=$ac_ct_AR
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+enable_dlopen=no
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi;
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6340: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:6344: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic='-qnocommon'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6608: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:6612: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works=yes
+       fi
+     else
+       lt_prog_compiler_static_works=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6712: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:6716: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  whole_archive_flag_spec=
+  thread_safe_flag_spec=
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_direct=no
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
+  always_export_symbols=no
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    interix3*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L=yes
+  	  hardcode_libdir_flag_spec='-L$libdir'
+  	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc=no
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      whole_archive_flag_spec=''
+      link_all_deplibs=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	hardcode_direct=yes
+	export_dynamic_flag_spec='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld='+b $libdir'
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 8181 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var" || \
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 9078 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 9178 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# Report which library types will actually be built
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    export_dynamic_flag_spec \
+    thread_safe_flag_spec \
+    whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
+    old_archive_cmds \
+    old_archive_from_new_cmds \
+    predep_objects \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    no_undefined_flag \
+    export_symbols_cmds \
+    hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
+    hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
+    lt_cv_prog_compiler_c_o \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    old_archive_from_new_cmds | \
+    archive_cmds | \
+    archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
+    old_archive_from_expsyms_cmds | \
+    export_symbols_cmds | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags or --without-tags was given.
+if test "${with_tags+set}" = set; then
+  withval="$with_tags"
+  tagnames="$withval"
+fi;
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_CXX=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  hardcode_direct_CXX=yes
+	else
+	  # We have old collect2
+	  hardcode_direct_CXX=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_CXX=yes
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  hardcode_libdir_separator_CXX=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag_CXX='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag_CXX="-z nodefs"
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	no_undefined_flag_CXX=' ${wl}-bernotok'
+	allow_undefined_flag_CXX=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	whole_archive_flag_spec_CXX='$convenience'
+	archive_cmds_need_lc_CXX=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag_CXX=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      archive_cmds_need_lc_CXX=no
+      hardcode_direct_CXX=no
+      hardcode_automatic_CXX=yes
+      hardcode_shlibpath_var_CXX=unsupported
+      whole_archive_flag_spec_CXX=''
+      link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_CXX=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    ld_shlibs_CXX=no
+    ;;
+  freebsd-elf*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  freebsd* | kfreebsd*-gnu | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    aCC*)
+      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_CXX=:
+
+      case $host_cpu in
+      hppa*64*|ia64*)
+	hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+        ;;
+      *)
+	export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  interix3*)
+    hardcode_direct_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	link_all_deplibs_CXX=yes
+	;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	archive_cmds_need_lc_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    ld_shlibs_CXX=no
+    ;;
+  openbsd*)
+    hardcode_direct_CXX=yes
+    hardcode_shlibpath_var_CXX=no
+    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      export_dynamic_flag_spec_CXX='${wl}-E'
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx*)
+	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx*)
+	allow_undefined_flag_CXX=' -expect_unresolved \*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        archive_cmds_need_lc_CXX=yes
+	no_undefined_flag_CXX=' -zdefs'
+	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-R$libdir'
+	hardcode_shlibpath_var_CXX=no
+	case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # linker. We must also pass each convience library through
+	    # to the system linker between allextract/defaultextract.
+	    # The C++ compiler will combine linker options so we
+	    # cannot just pass the convience library names through
+	    # without $wl.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+	    ;;
+	esac
+	link_all_deplibs_CXX=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+    no_undefined_flag_CXX='${wl}-z,text'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    no_undefined_flag_CXX='${wl}-z,text'
+    allow_undefined_flag_CXX='${wl}-z,nodefs'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+    export_dynamic_flag_spec_CXX='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix3*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    postdeps_CXX='-lCstd -lCrun'
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           lt_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_CXX=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11521: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:11525: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+
+if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6
+
+if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11625: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:11629: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 12161 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" || \
+   test -n "$runpath_var_CXX" || \
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6
+
+if test "$hardcode_action_CXX" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    export_dynamic_flag_spec_CXX \
+    thread_safe_flag_spec_CXX \
+    whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
+    old_archive_cmds_CXX \
+    old_archive_from_new_cmds_CXX \
+    predep_objects_CXX \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    no_undefined_flag_CXX \
+    export_symbols_cmds_CXX \
+    hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
+    hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
+    lt_cv_prog_compiler_c_o_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    old_archive_from_new_cmds_CXX | \
+    archive_cmds_CXX | \
+    archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
+    old_archive_from_expsyms_cmds_CXX | \
+    export_symbols_cmds_CXX | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_CXX"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      else
+	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_F77='-qnocommon'
+         lt_prog_compiler_wl_F77='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-KPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fpic'
+	lt_prog_compiler_static_F77='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_F77='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_F77='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_F77=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13219: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13223: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
+
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_F77=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_F77=yes
+       fi
+     else
+       lt_prog_compiler_static_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6
+
+if test x"$lt_prog_compiler_static_works_F77" = xyes; then
+    :
+else
+    lt_prog_compiler_static_F77=
+fi
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13323: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13327: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_F77=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_F77=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_F77=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    interix3*)
+      hardcode_direct_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_F77='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_F77=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_F77=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_F77=
+      export_dynamic_flag_spec_F77=
+      whole_archive_flag_spec_F77=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_F77=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct_F77=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_F77=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_F77=yes
+  	  hardcode_libdir_flag_spec_F77='-L$libdir'
+  	  hardcode_libdir_separator_F77=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_F77="-z nodefs"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_F77='$convenience'
+	  archive_cmds_need_lc_F77=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_F77=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_F77=no
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      whole_archive_flag_spec_F77=''
+      link_all_deplibs_F77=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_F77=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	hardcode_direct_F77=yes
+	export_dynamic_flag_spec_F77='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_F77=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	*)
+	  hardcode_direct_F77=yes
+	  export_dynamic_flag_spec_F77='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_F77='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_F77='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
+      esac
+      link_all_deplibs_F77=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_F77='$CC -r -o $output$reload_objs'
+	  hardcode_direct_F77=no
+        ;;
+	motorola)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_F77=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      no_undefined_flag_F77='${wl}-z,text'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_F77='${wl}-z,text'
+      allow_undefined_flag_F77='${wl}-z,nodefs'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+	pic_flag=$lt_prog_compiler_pic_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 14772 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+   test -n "$runpath_var_F77" || \
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6
+
+if test "$hardcode_action_F77" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_F77"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+old_archive_cmds_GCJ=$old_archive_cmds
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15550: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:15554: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_GCJ=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_GCJ='-qnocommon'
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-KPIC'
+	lt_prog_compiler_static_GCJ='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-fpic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_GCJ='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_GCJ='-Kconform_pic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15818: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:15822: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_GCJ=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_GCJ=yes
+       fi
+     else
+       lt_prog_compiler_static_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6
+
+if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+    :
+else
+    lt_prog_compiler_static_GCJ=
+fi
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15922: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:15926: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_GCJ=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_GCJ=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=no
+      enable_shared_with_static_runtimes_GCJ=yes
+      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    interix3*)
+      hardcode_direct_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_GCJ=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_GCJ=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_GCJ" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_GCJ=
+      export_dynamic_flag_spec_GCJ=
+      whole_archive_flag_spec_GCJ=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_GCJ=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_GCJ=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct_GCJ=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_GCJ=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_GCJ=yes
+  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+  	  hardcode_libdir_separator_GCJ=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_GCJ=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_GCJ="-z nodefs"
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_GCJ=' ${wl}-bernotok'
+	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_GCJ='$convenience'
+	  archive_cmds_need_lc_GCJ=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_GCJ='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_GCJ=no
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      whole_archive_flag_spec_GCJ=''
+      link_all_deplibs_GCJ=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_GCJ=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_GCJ=:
+
+	hardcode_direct_GCJ=yes
+	export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_GCJ=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_GCJ=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+	  ;;
+	*)
+	  hardcode_direct_GCJ=yes
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_GCJ='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+ 	# The compiler driver will combine linker options so we
+ 	# cannot just pass the convience library names through
+ 	# without $wl, iff we do not link with $LD.
+ 	# Luckily, gcc supports the same syntax we need for Sun Studio.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	case $wlarc in
+ 	'')
+ 	  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+ 	*)
+ 	  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ 	esac ;;
+      esac
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+	  hardcode_direct_GCJ=no
+        ;;
+	motorola)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_GCJ=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_GCJ=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      no_undefined_flag_GCJ='${wl}-z,text'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_GCJ='${wl}-z,text'
+      allow_undefined_flag_GCJ='${wl}-z,nodefs'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6
+test "$ld_shlibs_GCJ" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+	pic_flag=$lt_prog_compiler_pic_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_GCJ=no
+        else
+	  archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 17391 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+   test -n "$runpath_var_GCJ" || \
+   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6
+
+if test "$hardcode_action_GCJ" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_GCJ"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+lt_cv_prog_compiler_c_o_RC=yes
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_RC"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	;;
+
+      *)
+	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libcheck or --disable-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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+if test "$disable_libcheck" != "yes"
+then
+
+echo "$as_me:$LINENO: checking for ibv_get_device_list in -libverbs" >&5
+echo $ECHO_N "checking for ibv_get_device_list in -libverbs... $ECHO_C" >&6
+if test "${ac_cv_lib_ibverbs_ibv_get_device_list+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char ibv_get_device_list ();
+int
+main ()
+{
+ibv_get_device_list ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ibverbs_ibv_get_device_list=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ibverbs_ibv_get_device_list=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
+echo "${ECHO_T}$ac_cv_lib_ibverbs_ibv_get_device_list" >&6
+if test $ac_cv_lib_ibverbs_ibv_get_device_list = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBIBVERBS 1
+_ACEOF
+
+  LIBS="-libverbs $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: ibv_get_device_list() not found.  libdapl requires libibverbs." >&5
+echo "$as_me: error: ibv_get_device_list() not found.  libdapl requires libibverbs." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
+echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
+echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking infiniband/verbs.h usability" >&5
+echo $ECHO_N "checking infiniband/verbs.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <infiniband/verbs.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking infiniband/verbs.h presence" >&5
+echo $ECHO_N "checking infiniband/verbs.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <infiniband/verbs.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## -------------------------------------- ##
+## Report this to the compat-dapl lists.  ##
+## -------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
+echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_infiniband_verbs_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
+echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6
+
+fi
+if test $ac_cv_header_infiniband_verbs_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: <infiniband/verbs.h> not found.  Is libibverbs installed?" >&5
+echo "$as_me: error: <infiniband/verbs.h> not found.  Is libibverbs installed?" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+echo "$as_me:$LINENO: checking for struct ibv_port_attr.link_layer" >&5
+echo $ECHO_N "checking for struct ibv_port_attr.link_layer... $ECHO_C" >&6
+if test "${ac_cv_member_struct_ibv_port_attr_link_layer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <infiniband/verbs.h>
+
+int
+main ()
+{
+static struct ibv_port_attr ac_aggr;
+if (ac_aggr.link_layer)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_ibv_port_attr_link_layer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+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>
+
+int
+main ()
+{
+static struct ibv_port_attr ac_aggr;
+if (sizeof ac_aggr.link_layer)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_ibv_port_attr_link_layer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_ibv_port_attr_link_layer=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_ibv_port_attr_link_layer" >&5
+echo "${ECHO_T}$ac_cv_member_struct_ibv_port_attr_link_layer" >&6
+if test $ac_cv_member_struct_ibv_port_attr_link_layer = yes; then
+
+
+if test "yes" = "yes"; then
+  DEFINE_ATTR_LINK_LAYER_TRUE=
+  DEFINE_ATTR_LINK_LAYER_FALSE='#'
+else
+  DEFINE_ATTR_LINK_LAYER_TRUE='#'
+  DEFINE_ATTR_LINK_LAYER_FALSE=
+fi
+
+else
+
+
+if test "yes" = "no"; then
+  DEFINE_ATTR_LINK_LAYER_TRUE=
+  DEFINE_ATTR_LINK_LAYER_FALSE='#'
+else
+  DEFINE_ATTR_LINK_LAYER_TRUE='#'
+  DEFINE_ATTR_LINK_LAYER_FALSE=
+fi
+
+fi
+
+else
+
+
+if test "yes" = "no"; then
+  DEFINE_ATTR_LINK_LAYER_TRUE=
+  DEFINE_ATTR_LINK_LAYER_FALSE='#'
+else
+  DEFINE_ATTR_LINK_LAYER_TRUE='#'
+  DEFINE_ATTR_LINK_LAYER_FALSE=
+fi
+
+fi
+
+if test "$disable_libcheck" != "yes"
+then
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
+echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
+echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking infiniband/verbs.h usability" >&5
+echo $ECHO_N "checking infiniband/verbs.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <infiniband/verbs.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking infiniband/verbs.h presence" >&5
+echo $ECHO_N "checking infiniband/verbs.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <infiniband/verbs.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## -------------------------------------- ##
+## Report this to the compat-dapl lists.  ##
+## -------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
+echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_infiniband_verbs_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
+echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6
+
+fi
+if test $ac_cv_header_infiniband_verbs_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: <infiniband/verbs.h> not found.  Is libibverbs installed?" >&5
+echo "$as_me: error: <infiniband/verbs.h> not found.  Is libibverbs installed?" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+fi
+
+if test "$disable_libcheck" != "yes"
+then
+echo "$as_me:$LINENO: checking for struct ibv_port_attr.link_layer" >&5
+echo $ECHO_N "checking for struct ibv_port_attr.link_layer... $ECHO_C" >&6
+if test "${ac_cv_member_struct_ibv_port_attr_link_layer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <infiniband/verbs.h>
+
+int
+main ()
+{
+static struct ibv_port_attr ac_aggr;
+if (ac_aggr.link_layer)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_ibv_port_attr_link_layer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+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>
+
+int
+main ()
+{
+static struct ibv_port_attr ac_aggr;
+if (sizeof ac_aggr.link_layer)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_ibv_port_attr_link_layer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_ibv_port_attr_link_layer=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_ibv_port_attr_link_layer" >&5
+echo "${ECHO_T}$ac_cv_member_struct_ibv_port_attr_link_layer" >&6
+if test $ac_cv_member_struct_ibv_port_attr_link_layer = yes; then
+
+
+if test "yes" = "yes"; then
+  DEFINE_ATTR_LINK_LAYER_TRUE=
+  DEFINE_ATTR_LINK_LAYER_FALSE='#'
+else
+  DEFINE_ATTR_LINK_LAYER_TRUE='#'
+  DEFINE_ATTR_LINK_LAYER_FALSE=
+fi
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking whether ld accepts --version-script" >&5
+echo $ECHO_N "checking whether ld accepts --version-script... $ECHO_C" >&6
+if test "${ac_cv_version_script+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+echo "$as_me:$LINENO: result: $ac_cv_version_script" >&5
+echo "${ECHO_T}$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 or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+  case "${enableval}" in
+  yes) debug=true ;;
+  no)  debug=false ;;
+  *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  debug=false
+fi;
+
+
+if test x$debug = xtrue; then
+  DEBUG_TRUE=
+  DEBUG_FALSE='#'
+else
+  DEBUG_TRUE='#'
+  DEBUG_FALSE=
+fi
+
+
+echo "$as_me:$LINENO: checking Check for RHEL4 system" >&5
+echo $ECHO_N "checking Check for RHEL4 system... $ECHO_C" >&6
+if test "${ac_cv_rhel4+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+echo "$as_me:$LINENO: result: $ac_cv_rhel4" >&5
+echo "${ECHO_T}$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
+
+
+echo "$as_me:$LINENO: checking Check for RHEL5 system" >&5
+echo $ECHO_N "checking Check for RHEL5 system... $ECHO_C" >&6
+if test "${ac_cv_rhel5+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+echo "$as_me:$LINENO: result: $ac_cv_rhel5" >&5
+echo "${ECHO_T}$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
+
+
+echo "$as_me:$LINENO: checking Check for SUSE_11 system" >&5
+echo $ECHO_N "checking Check for SUSE_11 system... $ECHO_C" >&6
+if test "${ac_cv_suse11+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+echo "$as_me:$LINENO: result: $ac_cv_suse11" >&5
+echo "${ECHO_T}$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, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${DEFINE_ATTR_LINK_LAYER_TRUE}" && test -z "${DEFINE_ATTR_LINK_LAYER_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"DEFINE_ATTR_LINK_LAYER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"DEFINE_ATTR_LINK_LAYER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${DEFINE_ATTR_LINK_LAYER_TRUE}" && test -z "${DEFINE_ATTR_LINK_LAYER_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"DEFINE_ATTR_LINK_LAYER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"DEFINE_ATTR_LINK_LAYER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${DEFINE_ATTR_LINK_LAYER_TRUE}" && test -z "${DEFINE_ATTR_LINK_LAYER_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"DEFINE_ATTR_LINK_LAYER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"DEFINE_ATTR_LINK_LAYER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${DEFINE_ATTR_LINK_LAYER_TRUE}" && test -z "${DEFINE_ATTR_LINK_LAYER_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"DEFINE_ATTR_LINK_LAYER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"DEFINE_ATTR_LINK_LAYER\" 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
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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
+  { { echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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 "${OS_RHEL4_TRUE}" && test -z "${OS_RHEL4_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"OS_RHEL4\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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
+  { { echo "$as_me:$LINENO: error: conditional \"OS_RHEL5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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
+  { { echo "$as_me:$LINENO: error: conditional \"OS_SUSE11\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by compat-dapl $as_me 1.2.19 general at lists.openfabrics.org, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+compat-dapl config.status 1.2.19 general at lists.openfabrics.org
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "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" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# 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 to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CYGPATH_W@,$CYGPATH_W,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at install_sh@,$install_sh,;t t
+s, at STRIP@,$STRIP,;t t
+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at mkdir_p@,$mkdir_p,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at am__leading_dot@,$am__leading_dot,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at am__tar@,$am__tar,;t t
+s, at am__untar@,$am__untar,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s, at SED@,$SED,;t t
+s, at EGREP@,$EGREP,;t t
+s, at LN_S@,$LN_S,;t t
+s, at ECHO@,$ECHO,;t t
+s, at AR@,$AR,;t t
+s, at ac_ct_AR@,$ac_ct_AR,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at CPP@,$CPP,;t t
+s, at CXX@,$CXX,;t t
+s, at CXXFLAGS@,$CXXFLAGS,;t t
+s, at ac_ct_CXX@,$ac_ct_CXX,;t t
+s, at CXXDEPMODE@,$CXXDEPMODE,;t t
+s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s, at CXXCPP@,$CXXCPP,;t t
+s, at F77@,$F77,;t t
+s, at FFLAGS@,$FFLAGS,;t t
+s, at ac_ct_F77@,$ac_ct_F77,;t t
+s, at LIBTOOL@,$LIBTOOL,;t t
+s, at DEFINE_ATTR_LINK_LAYER_TRUE@,$DEFINE_ATTR_LINK_LAYER_TRUE,;t t
+s, at DEFINE_ATTR_LINK_LAYER_FALSE@,$DEFINE_ATTR_LINK_LAYER_FALSE,;t t
+s, at HAVE_LD_VERSION_SCRIPT_TRUE@,$HAVE_LD_VERSION_SCRIPT_TRUE,;t t
+s, at HAVE_LD_VERSION_SCRIPT_FALSE@,$HAVE_LD_VERSION_SCRIPT_FALSE,;t t
+s, at DEBUG_TRUE@,$DEBUG_TRUE,;t t
+s, at DEBUG_FALSE@,$DEBUG_FALSE,;t t
+s, at OS_RHEL4_TRUE@,$OS_RHEL4_TRUE,;t t
+s, at OS_RHEL4_FALSE@,$OS_RHEL4_FALSE,;t t
+s, at OS_RHEL5_TRUE@,$OS_RHEL5_TRUE,;t t
+s, at OS_RHEL5_FALSE@,$OS_RHEL5_FALSE,;t t
+s, at OS_SUSE11_TRUE@,$OS_SUSE11_TRUE,;t t
+s, at OS_SUSE11_FALSE@,$OS_SUSE11_FALSE,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X$ac_file : 'X\(//\)[^/]' \| \
+	 X$ac_file : 'X\(//\)$' \| \
+	 X$ac_file : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..a5d2a92
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,102 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.57)
+AC_INIT(compat-dapl, 1.2.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(compat-dapl, 1.2.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.]))
+
+AC_CHECK_HEADER(infiniband/verbs.h, [],
+    AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
+
+AC_CHECK_MEMBER(struct ibv_port_attr.link_layer,
+    AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "yes"),
+    AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "no"),
+    [#include <infiniband/verbs.h>])
+else
+    AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "no")
+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
+
+if test "$disable_libcheck" != "yes"
+then
+AC_CHECK_MEMBER(struct ibv_port_attr.link_layer,
+    AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "yes"),
+    [], [#include <infiniband/verbs.h>])
+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],
+[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 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..b67932e
--- /dev/null
+++ b/dapl.spec
@@ -0,0 +1,204 @@
+# 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 1.2 Registry RPM SPEC file
+#
+# $Id: $
+Name: compat-dapl
+Version: 1.2.19
+Release: 1%{?dist}
+Summary: A Library for userspace access to RDMA devices using OS Agnostic DAT API v1.2.
+
+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 1.2 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 
+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 '/OpenIB-.*/d' < %{_sysconfdir}/dat.conf > /tmp/$$ofadapl
+    mv /tmp/$$ofadapl %{_sysconfdir}/dat.conf
+fi
+echo OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib0 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-cma-1 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib1 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-mthca0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-mthca0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 2" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-ipath0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"ipath0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-ipath0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"ipath0 2" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-ehca0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"ehca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-iwarp u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-cma-roe-eth2 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-cma-roe-eth3 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth3 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-scm-roe-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-scm-roe-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> %{_sysconfdir}/dat.conf
+
+%postun
+/sbin/ldconfig
+if [ -e %{_sysconfdir}/dat.conf ]; then
+    sed -e '/OpenIB-.* u1/d' < %{_sysconfdir}/dat.conf > /tmp/$$OpenIBdapl
+    mv /tmp/$$OpenIBdapl %{_sysconfdir}/dat.conf
+fi
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libda*.so.*
+%doc AUTHORS README COPYING ChangeLog LICENSE.txt LICENSE2.txt LICENSE3.txt
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/*.so
+%dir %{_includedir}/dat
+%{_includedir}/dat/*
+
+%files devel-static
+%defattr(-,root,root,-)
+%{_libdir}/*.a
+
+%files utils
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_mandir}/man1/*.1*
+%{_mandir}/man5/*.5*
+
+%changelog
+* Mon Aug 9 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.19 
+- DAT/DAPL Version 1.2.19 Release 1, OFED 1.5.2 RC4
+
+* Mon Jul 12 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.18 
+- DAT/DAPL Version 1.2.18 Release 1, OFED 1.5.2 RC3
+
+* Mon May 24 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.17 
+- DAT/DAPL Version 1.2.17 Release 1, OFED 1.5.2 RC1
+
+* Tue Feb 23 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.16 
+- DAT/DAPL Version 1.2.16 Release 1, OFED 1.5.1
+
+* Tue Nov 24 2009 Arlin Davis <ardavis at ichips.intel.com> - 1.2.15 
+- DAT/DAPL Version 1.2.15 Release 1, OFED 1.5
+
+* Tue Mar 31 2009 Arlin Davis <ardavis at ichips.intel.com> - 1.2.14 
+- DAT/DAPL Version 1.2.14 Release 1, OFED 1.4.1 GA
+
+* Mon Mar 16 2009 Arlin Davis <ardavis at ichips.intel.com> - 1.2.13 
+- DAT/DAPL Version 1.2.13 Release 1, OFED 1.4.1  
+
+* Fri Nov 07 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.12 
+- DAT/DAPL Version 1.2.12 Release 1, OFED 1.4 GA 
+
+* Fri Oct 07 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.11 
+- DAT/DAPL Version 1.2.11 Release 1, OFED 1.4 rc3 
+
+* Mon Sep 01 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.10 
+- DAT/DAPL Version 1.2.10 Release 1, OFED 1.4 rc1 
+
+* Thu Aug 21 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.9 
+- DAT/DAPL Version 1.2.9 Release 1, OFED 1.4 RC 
+
+* Tue Jun 23 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.8 
+- DAT/DAPL Version 1.2.8 Release 1, socket CM provider
+
+* Tue May 20 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.7
+- DAT/DAPL Version 1.2.7 Release 1, OFED 1.3.1 GA
+
+* Thu May 1 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.6
+- DAT/DAPL Version 1.2.6 Release 1, OFED 1.3.1 
+
+* Thu Feb 14 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.5
+- DAT/DAPL Version 1.2.5 Release 1, OFED 1.3 GA 
+
+* Mon Jan 28 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.4
+- DAT/DAPL Version 1.2.4 Release 1 
+
+* Tue Oct 30 2007 Arlin Davis <ardavis at ichips.intel.com> - 1.2.3
+- DAT/DAPL Version 1.2.3 Release 1 
+
+* Wed Sep 26 2007 Arlin Davis <ardavis at ichips.intel.com> - 1.2.2-1
+- OFED 1.3-alpha,   DAT/DAPL Version 1.2, Release 2
+
+* Wed Jun 6 2007 Arlin Davis <ardavis at ichips.intel.com> - 1.2.1
+- OFED 1.2,   DAT/DAPL Version 1.2, Release 1
+
+* Fri Oct 20 2006 Arlin Davis <ardavis at ichips.intel.com> - 1.2.0
+- OFED 1.1,
+
+* Wed May 31 2006 Arlin Davis <ardavis at ichips.intel.com> - 1.2.0
+- OFED 1.0
diff --git a/dapl.spec.in b/dapl.spec.in
new file mode 100644
index 0000000..95f259d
--- /dev/null
+++ b/dapl.spec.in
@@ -0,0 +1,204 @@
+# 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 1.2 Registry RPM SPEC file
+#
+# $Id: $
+Name: compat-dapl
+Version: @VERSION@
+Release: 1%{?dist}
+Summary: A Library for userspace access to RDMA devices using OS Agnostic DAT API v1.2.
+
+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 1.2 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 
+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 '/OpenIB-.*/d' < %{_sysconfdir}/dat.conf > /tmp/$$ofadapl
+    mv /tmp/$$ofadapl %{_sysconfdir}/dat.conf
+fi
+echo OpenIB-cma u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib0 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-cma-1 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"ib1 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-mthca0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-mthca0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mthca0 2" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-ipath0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"ipath0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-ipath0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"ipath0 2" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-ehca0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"ehca0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-iwarp u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-cma-roe-eth2 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth2 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-cma-roe-eth3 u1.2 nonthreadsafe default libdaplcma.so.1 dapl.1.2 '"eth3 0" ""'  >> %{_sysconfdir}/dat.conf
+echo OpenIB-scm-roe-mlx4_0-1 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 1" ""' >> %{_sysconfdir}/dat.conf
+echo OpenIB-scm-roe-mlx4_0-2 u1.2 nonthreadsafe default libdaplscm.so.1 dapl.1.2 '"mlx4_0 2" ""' >> %{_sysconfdir}/dat.conf
+
+%postun
+/sbin/ldconfig
+if [ -e %{_sysconfdir}/dat.conf ]; then
+    sed -e '/OpenIB-.* u1/d' < %{_sysconfdir}/dat.conf > /tmp/$$OpenIBdapl
+    mv /tmp/$$OpenIBdapl %{_sysconfdir}/dat.conf
+fi
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libda*.so.*
+%doc AUTHORS README COPYING ChangeLog LICENSE.txt LICENSE2.txt LICENSE3.txt
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/*.so
+%dir %{_includedir}/dat
+%{_includedir}/dat/*
+
+%files devel-static
+%defattr(-,root,root,-)
+%{_libdir}/*.a
+
+%files utils
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_mandir}/man1/*.1*
+%{_mandir}/man5/*.5*
+
+%changelog
+* Mon Aug 9 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.19 
+- DAT/DAPL Version 1.2.19 Release 1, OFED 1.5.2 RC4
+
+* Mon Jul 12 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.18 
+- DAT/DAPL Version 1.2.18 Release 1, OFED 1.5.2 RC3
+
+* Mon May 24 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.17 
+- DAT/DAPL Version 1.2.17 Release 1, OFED 1.5.2 RC1
+
+* Tue Feb 23 2010 Arlin Davis <ardavis at ichips.intel.com> - 1.2.16 
+- DAT/DAPL Version 1.2.16 Release 1, OFED 1.5.1
+
+* Tue Nov 24 2009 Arlin Davis <ardavis at ichips.intel.com> - 1.2.15 
+- DAT/DAPL Version 1.2.15 Release 1, OFED 1.5
+
+* Tue Mar 31 2009 Arlin Davis <ardavis at ichips.intel.com> - 1.2.14 
+- DAT/DAPL Version 1.2.14 Release 1, OFED 1.4.1 GA
+
+* Mon Mar 16 2009 Arlin Davis <ardavis at ichips.intel.com> - 1.2.13 
+- DAT/DAPL Version 1.2.13 Release 1, OFED 1.4.1  
+
+* Fri Nov 07 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.12 
+- DAT/DAPL Version 1.2.12 Release 1, OFED 1.4 GA 
+
+* Fri Oct 07 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.11 
+- DAT/DAPL Version 1.2.11 Release 1, OFED 1.4 rc3 
+
+* Mon Sep 01 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.10 
+- DAT/DAPL Version 1.2.10 Release 1, OFED 1.4 rc1 
+
+* Thu Aug 21 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.9 
+- DAT/DAPL Version 1.2.9 Release 1, OFED 1.4 RC 
+
+* Tue Jun 23 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.8 
+- DAT/DAPL Version 1.2.8 Release 1, socket CM provider
+
+* Tue May 20 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.7
+- DAT/DAPL Version 1.2.7 Release 1, OFED 1.3.1 GA
+
+* Thu May 1 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.6
+- DAT/DAPL Version 1.2.6 Release 1, OFED 1.3.1 
+
+* Thu Feb 14 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.5
+- DAT/DAPL Version 1.2.5 Release 1, OFED 1.3 GA 
+
+* Mon Jan 28 2008 Arlin Davis <ardavis at ichips.intel.com> - 1.2.4
+- DAT/DAPL Version 1.2.4 Release 1 
+
+* Tue Oct 30 2007 Arlin Davis <ardavis at ichips.intel.com> - 1.2.3
+- DAT/DAPL Version 1.2.3 Release 1 
+
+* Wed Sep 26 2007 Arlin Davis <ardavis at ichips.intel.com> - 1.2.2-1
+- OFED 1.3-alpha,   DAT/DAPL Version 1.2, Release 2
+
+* Wed Jun 6 2007 Arlin Davis <ardavis at ichips.intel.com> - 1.2.1
+- OFED 1.2,   DAT/DAPL Version 1.2, Release 1
+
+* Fri Oct 20 2006 Arlin Davis <ardavis at ichips.intel.com> - 1.2.0
+- OFED 1.1,
+
+* Wed May 31 2006 Arlin Davis <ardavis at ichips.intel.com> - 1.2.0
+- OFED 1.0
diff --git a/dapl/common/dapl_adapter_util.h b/dapl/common/dapl_adapter_util.h
new file mode 100644
index 0000000..9315bf1
--- /dev/null
+++ b/dapl/common/dapl_adapter_util.h
@@ -0,0 +1,278 @@
+/*
+ * 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_adapter_util.h
+ *
+ * PURPOSE: Utility defs & routines for the adapter data structure
+ *
+ * $Id:$
+ *
+ **********************************************************************/
+
+#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  ib_cm_handle_t		cm_handle,
+	IN  int				reject_reason);
+
+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);
+
+#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);
+
+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);
+
+#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 u_int32_t 			timeout);
+#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"
+#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 100644
index 0000000..c0aaf46
--- /dev/null
+++ b/dapl/common/dapl_cno_util.c
@@ -0,0 +1,261 @@
+/*
+ * 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_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_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;
+}
+
diff --git a/dapl/common/dapl_cno_util.h b/dapl/common/dapl_cno_util.h
new file mode 100644
index 0000000..1a2e94d
--- /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_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..5b0b598
--- /dev/null
+++ b/dapl/common/dapl_cookie.c
@@ -0,0 +1,396 @@
+/*
+ * 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));
+    }
+}
+
+
+/*
+ * 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..c30c29e
--- /dev/null
+++ b/dapl/common/dapl_cr_accept.c
@@ -0,0 +1,252 @@
+/*
+ * 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
+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 (%p, %p, %d, %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)  )
+	{
+	    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 )
+	{
+	    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..e36beda
--- /dev/null
+++ b/dapl/common/dapl_cr_callback.c
@@ -0,0 +1,588 @@
+/*
+ * 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  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  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    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 );
+
+		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);
+
+	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  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);
+    }
+    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);
+
+	/* 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  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..b34508f
--- /dev/null
+++ b/dapl/common/dapl_cr_handoff.c
@@ -0,0 +1,67 @@
+/*
+ * 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
+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..1b1101b
--- /dev/null
+++ b/dapl/common/dapl_cr_query.c
@@ -0,0 +1,104 @@
+/*
+ * 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
+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 100644
index 0000000..e2dcaaf
--- /dev/null
+++ b/dapl/common/dapl_cr_reject.c
@@ -0,0 +1,142 @@
+/*
+ * 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
+dapl_cr_reject (
+	IN	DAT_CR_HANDLE	   cr_handle )
+{
+    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 );
+
+    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..1d29d7a
--- /dev/null
+++ b/dapl/common/dapl_cr_util.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_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..8c6f885
--- /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    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_debug.c b/dapl/common/dapl_debug.c
new file mode 100644
index 0000000..028f602
--- /dev/null
+++ b/dapl/common/dapl_debug.c
@@ -0,0 +1,118 @@
+/*
+ * 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_debug.h"
+#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_, 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);
+	}
+    }
+}
+
+#if defined(DAPL_COUNTERS)
+int dapl_dbg_counters[DCNT_NUM_COUNTERS] = { 0 };
+
+/*
+ * The order of this list must match exactly with the #defines
+ * in dapl_debug.h
+ */
+char  *dapl_dbg_counter_names[] = {
+	"dapl_ep_create",
+	"dapl_ep_free",
+	"dapl_ep_connect",
+	"dapl_ep_disconnect",
+	"dapl_ep_post_send",
+	"dapl_ep_post_recv",
+	"dapl_ep_post_rdma_write",
+	"dapl_ep_post_rdma_read",
+	"dapl_evd_create",
+	"dapl_evd_free",
+	"dapl_evd_wait",
+	"dapl_evd_blocked",
+	"dapl_evd_completion_notify",
+	"dapl_evd_dto_callback",
+	"dapl_evd_connection_callback",
+	"dapl_evd_dequeue",
+	"dapl_evd_poll",
+	"dapl_evd_found",
+	"dapl_evd_not_found",
+	"dapls_timer_set",
+	"dapls_timer_cancel",
+};
+
+void dapl_dump_cntr( int cntr )
+{
+    int i;
+
+    for ( i = 0; i < DCNT_NUM_COUNTERS; i++ )
+    {
+        if (( cntr == i ) || ( cntr == DCNT_ALL_COUNTERS ))
+        {
+            dapl_dbg_log (  DAPL_DBG_TYPE_CNTR,
+                            "DAPL Counter: %s = %lu \n",
+                            dapl_dbg_counter_names[i],
+                            dapl_dbg_counters[i] );
+        }
+    }
+}
+
+#endif /* DAPL_COUNTERS */
+
diff --git a/dapl/common/dapl_ep_connect.c b/dapl/common/dapl_ep_connect.c
new file mode 100644
index 0000000..775a694
--- /dev/null
+++ b/dapl/common/dapl_ep_connect.c
@@ -0,0 +1,371 @@
+/*
+ * 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
+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);
+    DAPL_CNTR (DCNT_EP_CONNECT);
+
+    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;
+    }
+
+    /*
+     * 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 )
+    {
+	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);
+
+    if (private_data_size + req_hdr_size > 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;
+}
+
+
+/*
+ * 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..0362ac3
--- /dev/null
+++ b/dapl/common/dapl_ep_create.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_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
+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);
+    DAPL_CNTR(DCNT_EP_CREATE);
+
+    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;
+    }
+
+    /*
+     * 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 ((unsigned long)ep_attr  &  3)
+    {
+	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) ||
+	 (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..dd47b51
--- /dev/null
+++ b/dapl/common/dapl_ep_create_with_srq.c
@@ -0,0 +1,368 @@
+/*
+ * 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
+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 ((unsigned long)ep_attr  &  3)
+    {
+	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..37fbb41
--- /dev/null
+++ b/dapl/common/dapl_ep_disconnect.c
@@ -0,0 +1,190 @@
+/*
+ * 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
+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);
+    DAPL_CNTR(DCNT_EP_DISCONNECT);
+
+    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;
+    }
+
+    /*
+     * 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 )
+    {
+	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 () 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_ep_dup_connect.c b/dapl/common/dapl_ep_dup_connect.c
new file mode 100644
index 0000000..4423c4f
--- /dev/null
+++ b/dapl/common/dapl_ep_dup_connect.c
@@ -0,0 +1,130 @@
+/*
+ * 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
+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..4326825
--- /dev/null
+++ b/dapl/common/dapl_ep_free.c
@@ -0,0 +1,212 @@
+/*
+ * 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
+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_ep_free (%p)\n", ep_handle);
+    DAPL_CNTR(DCNT_EP_FREE);
+
+    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;
+    }
+
+    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_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..3266134
--- /dev/null
+++ b/dapl/common/dapl_ep_get_status.c
@@ -0,0 +1,121 @@
+/*
+ * 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
+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)) ? DAT_FALSE : DAT_TRUE;
+    }
+
+    if ( out_dto_idle != NULL )
+    {
+	*out_dto_idle = (dapls_cb_pending(&ep_ptr->req_buffer)) ? DAT_FALSE : DAT_TRUE;
+    }
+
+ 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..05b39db
--- /dev/null
+++ b/dapl/common/dapl_ep_modify.c
@@ -0,0 +1,710 @@
+/*
+ * 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
+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..7f2b6df
--- /dev/null
+++ b/dapl/common/dapl_ep_post_rdma_read.c
@@ -0,0 +1,106 @@
+/*
+ * 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
+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);
+    DAPL_CNTR(DCNT_POST_RDMA_READ);
+
+    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_write.c b/dapl/common/dapl_ep_post_rdma_write.c
new file mode 100644
index 0000000..95a107a
--- /dev/null
+++ b/dapl/common/dapl_ep_post_rdma_write.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_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
+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);
+    DAPL_CNTR(DCNT_POST_RDMA_WRITE);
+
+    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..5f903b8
--- /dev/null
+++ b/dapl/common/dapl_ep_post_recv.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_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
+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);
+    DAPL_CNTR (DCNT_POST_RECV);
+
+    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..04d6325
--- /dev/null
+++ b/dapl/common/dapl_ep_post_send.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_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:$
+ **********************************************************************/
+
+#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
+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,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);
+    DAPL_CNTR(DCNT_POST_SEND);
+
+    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_query.c b/dapl/common/dapl_ep_query.c
new file mode 100644
index 0000000..7162c70
--- /dev/null
+++ b/dapl/common/dapl_ep_query.c
@@ -0,0 +1,128 @@
+/*
+ * 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
+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..9b0d9be
--- /dev/null
+++ b/dapl/common/dapl_ep_recv_query.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_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
+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..bd6975f
--- /dev/null
+++ b/dapl/common/dapl_ep_reset.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_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
+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;
+    }
+
+    dapl_os_lock(&ep_ptr->header.lock);
+    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));
+	dapl_os_unlock(&ep_ptr->header.lock);
+	goto bail;
+    }
+
+    if ( ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED )
+    {
+	dapl_os_unlock(&ep_ptr->header.lock);
+	dapls_ib_reinit_ep ( ep_ptr );
+	dapl_os_lock(&ep_ptr->header.lock);
+	ep_ptr->param.ep_state = DAT_EP_STATE_UNCONNECTED;
+    }
+    dapl_os_unlock(&ep_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_ep_set_watermark.c b/dapl/common/dapl_ep_set_watermark.c
new file mode 100644
index 0000000..1ea93d5
--- /dev/null
+++ b/dapl/common/dapl_ep_set_watermark.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_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
+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..4dd722e
--- /dev/null
+++ b/dapl/common/dapl_ep_util.c
@@ -0,0 +1,590 @@
+/*
+ * 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	8
+
+extern void dapli_ep_default_attrs (
+    IN DAPL_EP			*ep_ptr );
+
+
+/*
+ * 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));
+
+    /*
+     * 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 ) );
+    }
+
+    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..579bb86
--- /dev/null
+++ b/dapl/common/dapl_ep_util.h
@@ -0,0 +1,85 @@
+/*
+ * 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);
+
+#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..12379d2
--- /dev/null
+++ b/dapl/common/dapl_evd_connection_callb.c
@@ -0,0 +1,235 @@
+/*
+ * 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    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);
+    DAPL_CNTR(DCNT_EVD_CONN_CALLBACK);
+
+    /*
+     * 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;
+
+    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);
+	    }
+
+	    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_DISCONNECTED:
+	case DAT_CONNECTION_EVENT_PEER_REJECTED:
+	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, /* 0 except for CONNECTED */
+			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..2b0251a
--- /dev/null
+++ b/dapl/common/dapl_evd_cq_async_error_callb.c
@@ -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.
+ */
+
+/**********************************************************************
+ * 
+ * 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;
+
+    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..1b75267
--- /dev/null
+++ b/dapl/common/dapl_evd_dequeue.c
@@ -0,0 +1,146 @@
+/*
+ * 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 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);
+    DAPL_CNTR(DCNT_EVD_DEQUEUE);
+
+    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;
+    }
+
+    /*
+     * 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(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(DCNT_EVD_DEQUEUE_POLL);
+    }
+    else
+    {
+	dat_status = DAT_ERROR (DAT_QUEUE_EMPTY,0);
+	DAPL_CNTR(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 100644
index 0000000..c5fccdd
--- /dev/null
+++ b/dapl/common/dapl_evd_dto_callb.c
@@ -0,0 +1,168 @@
+/*
+ * 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);
+    DAPL_CNTR(DCNT_EVD_DTO_CALLBACK);
+
+    evd_ptr = (DAPL_EVD *) user_context;
+
+    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_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 100644
index 0000000..ab4ce7e
--- /dev/null
+++ b/dapl/common/dapl_evd_free.c
@@ -0,0 +1,141 @@
+/*
+ * 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 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);
+    DAPL_CNTR (DCNT_EVD_FREE);
+
+    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;
+    }
+
+    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_cno_trigger (cno_ptr, NULL);
+	}
+    }
+#endif	/* defined(__KDAPL__) */
+
+bail:
+    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..d2449c3
--- /dev/null
+++ b/dapl/common/dapl_evd_post_se.c
@@ -0,0 +1,104 @@
+/*
+ * 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 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..3eccacc
--- /dev/null
+++ b/dapl/common/dapl_evd_qp_async_error_callb.c
@@ -0,0 +1,146 @@
+/*
+ * 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;
+
+    ep_ptr    = (DAPL_EP *) context;
+    ia_ptr    = ep_ptr->header.owner_ia;
+    async_evd = (DAPL_EVD *) ia_ptr->async_error_evd;
+
+    dapl_dbg_log (
+	DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION,
+	"--> dapl_evd_qp_async_error_callback: ep %p qp %p (%x) state %d\n", 
+	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,
+		  "dapl_evd_qp_async_error_callback () returns\n");
+}
+
+/*
+ * 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..1c17fa6
--- /dev/null
+++ b/dapl/common/dapl_evd_resize.c
@@ -0,0 +1,144 @@
+/*
+ * 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 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..5ba0f3e
--- /dev/null
+++ b/dapl/common/dapl_evd_un_async_error_callb.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_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;
+
+    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..e3655fb
--- /dev/null
+++ b/dapl/common/dapl_evd_util.c
@@ -0,0 +1,1411 @@
+/*
+ * 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_util.c
+ *
+ * PURPOSE: Manage EVD Info structure
+ *
+ * $Id:$
+ **********************************************************************/
+
+#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 <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.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)
+{
+    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_SOFTWARE_EVENT", DAT_SOFTWARE_EVENT},
+    {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?";
+}
+
+/*
+ * 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) ) )
+    {
+
+	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;
+	}
+
+    }
+
+    /* 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));
+
+    /*
+     * 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
+
+    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,
+		  "dapli_evd_post_event: Called with event # %x\n",
+		  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_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,
+		  "dapli_evd_post_event: Called with event # %x\n",
+		  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;
+}
+
+/*
+ * 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;
+
+    /*
+     * 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:
+	{
+	    DAPL_COOKIE_BUFFER	*buffer;
+
+	    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;
+
+#ifdef DAPL_DBG
+	    if (dto_status == DAT_DTO_SUCCESS)
+	    {
+		uint32_t		ibtype;
+
+		ibtype = DAPL_GET_CQE_OPTYPE (cqe_ptr);
+
+		dapl_os_assert ((ibtype == OP_SEND &&
+				 cookie->val.dto.type == DAPL_DTO_TYPE_SEND)
+				|| (ibtype == OP_RECEIVE &&
+				    cookie->val.dto.type == DAPL_DTO_TYPE_RECV)
+				|| (ibtype == OP_RDMA_WRITE &&
+				    cookie->val.dto.type == DAPL_DTO_TYPE_RDMA_WRITE)
+				|| (ibtype == OP_RDMA_READ &&
+				    cookie->val.dto.type == DAPL_DTO_TYPE_RDMA_READ));
+		}
+#endif /* DAPL_DBG */
+
+	    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. The QP going to error state will trigger disconnect
+     * at provider level. QP errors and CM events are independent,
+     * issue CM disconnect and cleanup any pending CR's 
+     */
+    if ((dto_status != DAT_DTO_SUCCESS) && (dto_status != DAT_DTO_ERR_FLUSHED))
+    {
+	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;
+	    dapl_sp_remove_ep(ep_ptr);
+	    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..990fd1f
--- /dev/null
+++ b/dapl/common/dapl_evd_util.h
@@ -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.
+ */
+
+/**********************************************************************
+ * 
+ * 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);
+
+/*************************************
+ * dapl internal callbacks functions *
+ *************************************/
+
+/* connection verb callback */
+extern void dapl_evd_connection_callback (
+    IN	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..e937c27
--- /dev/null
+++ b/dapl/common/dapl_get_consumer_context.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_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
+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) ||
+	 ((unsigned long)(header) & 3) ||
+	 (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 || ((unsigned long)(header) & 3) )
+    {
+	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..063f081
--- /dev/null
+++ b/dapl/common/dapl_get_handle_type.c
@@ -0,0 +1,89 @@
+/*
+ * 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
+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) ||
+	 ((unsigned long)(header) & 3) ||
+	 (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..099d5ad
--- /dev/null
+++ b/dapl/common/dapl_hash.c
@@ -0,0 +1,538 @@
+/*
+ * 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..2b112b3
--- /dev/null
+++ b/dapl/common/dapl_hca_util.c
@@ -0,0 +1,194 @@
+/*
+ * 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..3e1b44c
--- /dev/null
+++ b/dapl/common/dapl_ia_close.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_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
+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_open.c b/dapl/common/dapl_ia_open.c
new file mode 100644
index 0000000..3793048
--- /dev/null
+++ b/dapl/common/dapl_ia_open.c
@@ -0,0 +1,515 @@
+/*
+ * 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
+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 100644
index 0000000..fe5fe60
--- /dev/null
+++ b/dapl/common/dapl_ia_query.c
@@ -0,0 +1,232 @@
+/*
+ * 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
+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) -
+	    (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 */
+	/*
+	 * 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:
+    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 100644
index 0000000..3d8cb0e
--- /dev/null
+++ b/dapl/common/dapl_ia_util.c
@@ -0,0 +1,1248 @@
+/*
+ * 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));
+
+    /*
+     * 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_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);
+
+    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..d97f0f2
--- /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_PROVIDER_INIT_FUNC_NAME (
+    IN const DAT_PROVIDER_INFO *,
+    IN const char * );                      /* instance data */
+
+extern void 
+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..79e3cb5
--- /dev/null
+++ b/dapl/common/dapl_llist.c
@@ -0,0 +1,384 @@
+/*
+ * 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..369ad85
--- /dev/null
+++ b/dapl/common/dapl_lmr_free.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_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
+dapl_lmr_free (
+    IN	DAT_LMR_HANDLE  lmr_handle )
+{
+    DAPL_LMR 		*lmr;
+    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;
+
+    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:
+	{
+	    DAPL_PZ 	*pz;
+
+	    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)
+	    {
+
+		pz = (DAPL_PZ *) lmr->param.pz_handle;
+		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..1b8a0bd
--- /dev/null
+++ b/dapl/common/dapl_lmr_query.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_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
+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..29489e1
--- /dev/null
+++ b/dapl/common/dapl_lmr_sync_rdma_read.c
@@ -0,0 +1,85 @@
+/*
+ * 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
+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..7c2676b
--- /dev/null
+++ b/dapl/common/dapl_lmr_sync_rdma_write.c
@@ -0,0 +1,85 @@
+/*
+ * 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
+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..018a9b3
--- /dev/null
+++ b/dapl/common/dapl_lmr_util.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_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..9450cf0
--- /dev/null
+++ b/dapl/common/dapl_mr_util.c
@@ -0,0 +1,115 @@
+/*
+ * 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..4090203
--- /dev/null
+++ b/dapl/common/dapl_name_service.c
@@ -0,0 +1,286 @@
+/*
+ * 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 100644
index 0000000..d0c7b16
--- /dev/null
+++ b/dapl/common/dapl_provider.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_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
+
+};
+#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..93f4108
--- /dev/null
+++ b/dapl/common/dapl_psp_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_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
+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;
+    }
+	
+
+    /*
+     * 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..f3ec594
--- /dev/null
+++ b/dapl/common/dapl_psp_create_any.c
@@ -0,0 +1,220 @@
+/*
+ * 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
+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;
+    }
+
+    /*
+     * 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..3b1042b
--- /dev/null
+++ b/dapl/common/dapl_psp_free.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_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
+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 = (DAPL_IA *)sp_ptr->header.owner_ia; */
+    ia_ptr = sp_ptr->header.owner_ia;
+    /* 
+     * 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..0f4652d
--- /dev/null
+++ b/dapl/common/dapl_psp_query.c
@@ -0,0 +1,104 @@
+/*
+ * 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
+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..918f99a
--- /dev/null
+++ b/dapl/common/dapl_pz_create.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_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
+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;
+    }
+
+    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..2d50fd3
--- /dev/null
+++ b/dapl/common/dapl_pz_free.c
@@ -0,0 +1,89 @@
+/*
+ * 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
+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;
+
+    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..f0b8cbb
--- /dev/null
+++ b/dapl/common/dapl_pz_query.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_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
+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..5823fb0
--- /dev/null
+++ b/dapl/common/dapl_pz_util.c
@@ -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_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..7484234
--- /dev/null
+++ b/dapl/common/dapl_ring_buffer_util.c
@@ -0,0 +1,356 @@
+/*
+ * 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] = 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 100644
index 0000000..c9dc02f
--- /dev/null
+++ b/dapl/common/dapl_rmr_bind.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_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
+dapl_rmr_bind (
+	IN	DAT_RMR_HANDLE		rmr_handle,
+	IN	const DAT_LMR_TRIPLET	*lmr_triplet,
+	IN	DAT_MEM_PRIV_FLAGS	mem_priv,
+	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 100644
index 0000000..9e47a05
--- /dev/null
+++ b/dapl/common/dapl_rmr_create.c
@@ -0,0 +1,107 @@
+/*
+ * 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
+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;
+    }
+
+    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;
+}
+
+
+/*
+ * 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..1277178
--- /dev/null
+++ b/dapl/common/dapl_rmr_free.c
@@ -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.
+ */
+
+/**********************************************************************
+ * 
+ * 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
+dapl_rmr_free (
+    IN	DAT_RMR_HANDLE  rmr_handle )
+{
+    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;
+    }
+
+    rmr = (DAPL_RMR *) rmr_handle;
+
+    /*
+     * 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..9652a24
--- /dev/null
+++ b/dapl/common/dapl_rmr_query.c
@@ -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.
+ */
+
+/**********************************************************************
+ * 
+ * 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
+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..5eeb5b1
--- /dev/null
+++ b/dapl/common/dapl_rmr_util.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.
+ */
+
+#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.pad             = 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..12107f6
--- /dev/null
+++ b/dapl/common/dapl_rsp_create.c
@@ -0,0 +1,218 @@
+/*
+ * 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
+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;
+    }
+
+    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..5ce0682
--- /dev/null
+++ b/dapl/common/dapl_rsp_free.c
@@ -0,0 +1,162 @@
+/*
+ * 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
+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;
+
+    /*
+     * 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..737bbe5
--- /dev/null
+++ b/dapl/common/dapl_rsp_query.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_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
+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..883de1f
--- /dev/null
+++ b/dapl/common/dapl_set_consumer_context.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_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
+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) ||
+	 ((unsigned long) (header) & 3) ||
+	 (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..310e601
--- /dev/null
+++ b/dapl/common/dapl_sp_util.c
@@ -0,0 +1,308 @@
+/*
+ * 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);
+
+    /*
+     * 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));
+
+    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  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);
+
+    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);
+
+	ep_ptr->cr_ptr = NULL;
+
+	/* 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..e5239c1
--- /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  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..6ae260e
--- /dev/null
+++ b/dapl/common/dapl_srq_create.c
@@ -0,0 +1,159 @@
+/*
+ * 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
+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;
+    }
+
+    /*
+     * 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 ((unsigned long)srq_attr  &  3)
+    {
+	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..8eaff02
--- /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
+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;
+
+    /*
+     * 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..8751620
--- /dev/null
+++ b/dapl/common/dapl_srq_post_recv.c
@@ -0,0 +1,130 @@
+/*
+ * 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
+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..8265f92
--- /dev/null
+++ b/dapl/common/dapl_srq_query.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_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
+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..8f7adf5
--- /dev/null
+++ b/dapl/common/dapl_srq_resize.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_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
+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..d8a3acc
--- /dev/null
+++ b/dapl/common/dapl_srq_set_lw.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_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
+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..07e529f
--- /dev/null
+++ b/dapl/common/dapl_srq_util.c
@@ -0,0 +1,149 @@
+/*
+ * 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..c7407c1
--- /dev/null
+++ b/dapl/common/dapl_timer_util.c
@@ -0,0 +1,337 @@
+/*
+ * 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;
+
+    DAPL_CNTR(DCNT_TIMER_SET);
+    /*
+     * 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_CNTR(DCNT_TIMER_CANCEL);
+    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 100644
index 0000000..9d3f546
--- /dev/null
+++ b/dapl/include/dapl.h
@@ -0,0 +1,1164 @@
+/*
+ * 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.h
+ *
+ * PURPOSE: defines common data structures for the DAPL reference implemenation
+ *
+ * Description: This file describes the working data structures used within
+ *              DAPL RI.
+ *
+ *
+ * $Id:$
+ **********************************************************************/
+
+#ifndef _DAPL_H_
+#define _DAPL_H_
+
+#if defined(__KERNEL__)
+#include <dat/kdat.h>
+#else
+#include <dat/udat.h>
+#endif	/* defined(__KERNEL__) */
+#include <dat/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                                                            *
+ *                                                                   *
+ *********************************************************************/
+
+/*
+ * 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) ||					\
+	    ((unsigned long)(h) & 3) ||				\
+	    (((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"
+#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;	   /* number of physical port */
+    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 */
+};
+
+/* 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;
+};
+
+/* 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) */
+    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 */
+};
+
+/* 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 */
+};
+
+/* 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 */
+    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,
+} 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 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 dapl_ia_close (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	IN	DAT_CLOSE_FLAGS );	/* ia_flags */
+
+
+extern DAT_RETURN 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 dapl_set_consumer_context (
+	IN	DAT_HANDLE,			/* dat handle */
+	IN	DAT_CONTEXT);			/* context */
+
+extern DAT_RETURN dapl_get_consumer_context (
+	IN	DAT_HANDLE,			/* dat handle */
+	OUT	DAT_CONTEXT * );		/* context */
+
+extern DAT_RETURN dapl_get_handle_type (
+	IN	DAT_HANDLE,
+	OUT	DAT_HANDLE_TYPE * );
+
+/* CNO functions */
+
+#if !defined(__KERNEL__)
+extern DAT_RETURN 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 dapl_cno_modify_agent (
+	IN	DAT_CNO_HANDLE,			/* cno_handle */
+	IN	DAT_OS_WAIT_PROXY_AGENT);	/* agent */
+
+extern DAT_RETURN 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 dapl_cno_free (
+	IN	DAT_CNO_HANDLE);	/* cno_handle */
+
+extern DAT_RETURN dapl_cno_wait (
+	IN	DAT_CNO_HANDLE,		/* cno_handle */
+	IN	DAT_TIMEOUT,		/* timeout */
+	OUT	DAT_EVD_HANDLE *);	/* evd_handle */
+
+extern DAT_RETURN dapl_cno_free (
+	IN	DAT_CNO_HANDLE);	/* cno_handle */
+#endif	/* !defined(__KERNEL__) */
+
+/* CR Functions */
+
+extern DAT_RETURN 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 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 dapl_cr_reject (
+	IN	DAT_CR_HANDLE );
+
+extern DAT_RETURN dapl_cr_handoff (
+	IN DAT_CR_HANDLE,		/* cr_handle */
+	IN DAT_CONN_QUAL);		/* handoff */
+
+/* EVD Functions */
+
+#if defined(__KERNEL__)
+extern DAT_RETURN 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 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 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 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 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 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 dapl_evd_modify_cno (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_CNO_HANDLE);	/* cno_handle */
+#endif
+
+extern DAT_RETURN dapl_evd_enable (
+	IN	DAT_EVD_HANDLE);	/* evd_handle */
+
+extern DAT_RETURN dapl_evd_disable (
+	IN	DAT_EVD_HANDLE);	/* evd_handle */
+
+#if !defined(__KERNEL__)
+extern DAT_RETURN 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 dapl_evd_resize (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	IN	DAT_COUNT );		/* evd_qlen */
+
+extern DAT_RETURN dapl_evd_post_se (
+	DAT_EVD_HANDLE,			/* evd_handle */
+	const DAT_EVENT * );		/* event */
+
+extern DAT_RETURN dapl_evd_dequeue (
+	IN	DAT_EVD_HANDLE,		/* evd_handle */
+	OUT	DAT_EVENT * );		/* event */
+
+extern DAT_RETURN dapl_evd_free (
+	IN	DAT_EVD_HANDLE );
+
+extern DAT_RETURN
+dapl_evd_set_unwaitable (
+	IN	DAT_EVD_HANDLE	evd_handle );
+
+extern DAT_RETURN
+dapl_evd_clear_unwaitable (
+	IN	DAT_EVD_HANDLE	evd_handle );
+
+/* EP functions */
+
+extern DAT_RETURN 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 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 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 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 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 dapl_ep_disconnect (
+	IN	DAT_EP_HANDLE,		/* ep_handle */
+	IN	DAT_CLOSE_FLAGS );	/* close_flags */
+
+extern DAT_RETURN 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 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 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 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 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 dapl_ep_free (
+	IN	DAT_EP_HANDLE);		/* ep_handle */
+
+extern DAT_RETURN dapl_ep_reset (
+	IN	DAT_EP_HANDLE);		/* ep_handle */
+
+extern DAT_RETURN 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 dapl_ep_recv_query (
+        IN      DAT_EP_HANDLE,          /* ep_handle            */
+        OUT     DAT_COUNT *,            /* nbufs_allocated      */
+        OUT     DAT_COUNT *);           /* bufs_alloc_span      */
+
+extern DAT_RETURN 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 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_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 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 */
+	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 dapl_lmr_query (
+	IN	DAT_LMR_HANDLE,
+	IN	DAT_LMR_PARAM_MASK,
+	OUT	DAT_LMR_PARAM *);
+
+extern DAT_RETURN dapl_lmr_free (
+	IN	DAT_LMR_HANDLE);
+
+extern DAT_RETURN 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 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 dapl_rmr_create (
+	IN	DAT_PZ_HANDLE,		/* pz_handle */
+	OUT	DAT_RMR_HANDLE *);	/* rmr_handle */
+
+extern DAT_RETURN 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 dapl_rmr_bind (
+	IN	DAT_RMR_HANDLE,		 /* rmr_handle */
+	IN	const DAT_LMR_TRIPLET *, /* lmr_triplet */
+	IN	DAT_MEM_PRIV_FLAGS,	 /* mem_priv */
+	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 dapl_rmr_free (
+	IN	DAT_RMR_HANDLE);
+
+/* PSP Functions */
+
+extern DAT_RETURN 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 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 dapl_psp_query (
+	IN	DAT_PSP_HANDLE,
+	IN	DAT_PSP_PARAM_MASK,
+	OUT	DAT_PSP_PARAM * );
+
+extern DAT_RETURN dapl_psp_free (
+	IN	DAT_PSP_HANDLE );	/* psp_handle */
+
+/* RSP Functions */
+
+extern DAT_RETURN 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 dapl_rsp_query (
+	IN	DAT_RSP_HANDLE,
+	IN	DAT_RSP_PARAM_MASK,
+	OUT	DAT_RSP_PARAM * );
+
+extern DAT_RETURN dapl_rsp_free (
+	IN	DAT_RSP_HANDLE );	/* rsp_handle */
+
+/* PZ Functions */
+
+extern DAT_RETURN dapl_pz_create (
+	IN	DAT_IA_HANDLE,		/* ia_handle */
+	OUT	DAT_PZ_HANDLE * );	/* pz_handle */
+
+extern DAT_RETURN 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 dapl_pz_free (
+	IN	DAT_PZ_HANDLE );	/* pz_handle */
+
+/* SRQ functions */
+
+extern DAT_RETURN 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 dapl_srq_free(
+	IN      DAT_SRQ_HANDLE);        /* srq_handle           */
+
+extern DAT_RETURN 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 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 dapl_srq_resize(
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* srq_max_recv_dto     */
+
+extern DAT_RETURN dapl_srq_set_lw(
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* low_watermark        */
+
+/*
+ * 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..89c16b4
--- /dev/null
+++ b/dapl/include/dapl_debug.h
@@ -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_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  /* !DAPL_DBG */
+
+#define dapl_dbg_log(...)
+
+#endif /* !DAPL_DBG */
+
+/*
+ * Counters
+ */
+#define DCNT_EP_CREATE			0
+#define DCNT_EP_FREE			1
+#define DCNT_EP_CONNECT			2
+#define DCNT_EP_DISCONNECT		3
+#define DCNT_POST_SEND			4
+#define DCNT_POST_RECV			5
+#define DCNT_POST_RDMA_WRITE		6
+#define DCNT_POST_RDMA_READ		7
+#define DCNT_EVD_CREATE			8
+#define DCNT_EVD_FREE			9
+#define DCNT_EVD_WAIT			10
+#define DCNT_EVD_WAIT_BLOCKED		11
+#define DCNT_EVD_WAIT_CMP_NTFY		12
+#define DCNT_EVD_DTO_CALLBACK		13
+#define DCNT_EVD_CONN_CALLBACK		14
+#define DCNT_EVD_DEQUEUE		15
+#define DCNT_EVD_DEQUEUE_POLL		16
+#define DCNT_EVD_DEQUEUE_FOUND		17
+#define DCNT_EVD_DEQUEUE_NOT_FOUND	18
+#define DCNT_TIMER_SET			19
+#define DCNT_TIMER_CANCEL		20
+#define DCNT_NUM_COUNTERS		21
+#define DCNT_ALL_COUNTERS               DCNT_NUM_COUNTERS
+
+#if defined(DAPL_COUNTERS)
+
+extern void dapl_dump_cntr( int cntr );
+extern int dapl_dbg_counters[];
+
+#define DAPL_CNTR(cntr)         dapl_os_atomic_inc (&dapl_dbg_counters[cntr]);
+#define DAPL_DUMP_CNTR(cntr)    dapl_dump_cntr( cntr );
+#define DAPL_COUNTERS_INIT()
+
+#else
+
+#define DAPL_CNTR(cntr)
+#define DAPL_DUMP_CNTR(cntr) 
+#define DAPL_COUNTERS_INIT()
+
+#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..e87467a
--- /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 InfiniBand HCA"
+
+
+/*
+ * Vendor name
+ * Returned in DAT_IA_ATTR.vendor_name
+ */
+#define VN_VENDOR_NAME		"DAPL Reference 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	1
+#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..8332d46
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_cm.c
@@ -0,0 +1,1270 @@
+/*
+ * 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 OpenIB uCMA provider - uCMA connection management
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+#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 <sys/poll.h>
+#include <signal.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.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);
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+static inline uint64_t cpu_to_be64(uint64_t x) { return bswap_64(x); }
+#elif __BYTE_ORDER == __BIG_ENDIAN
+static inline uint64_t cpu_to_be64(uint64_t x) { return x; }
+#endif
+
+/* cma requires 16 bit SID */
+#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)
+
+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 %d %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)
+			cpu_to_be64(ibaddr->sgid.global.subnet_prefix),
+		(unsigned long long)
+			cpu_to_be64(ibaddr->sgid.global.interface_id));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, 
+		" route_resolve: DST GID subnet %016llx id %016llx\n",
+		(unsigned long long)
+			cpu_to_be64(ibaddr->dgid.global.subnet_prefix),
+		(unsigned long long)
+			cpu_to_be64(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));
+		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;
+
+		/* no device type specified so assume IB for now */
+		if (event->status == 28) /* IB_CM_REJ_CONSUMER_DEFINED */
+			cm_event = IB_CME_DESTINATION_REJECT_PRIVATE_DATA;
+		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, NULL, 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 %s!\n",
+     		     conn->cm_id,
+		     ntohs(((struct sockaddr_in *)
+			&conn->cm_id->route.addr.src_addr)->sin_port),
+		     inet_ntoa(((struct sockaddr_in *)
+                        &conn->cm_id->route.addr.dst_addr)->sin_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;
+			
+	/* Sanity check */
+	if (NULL == ep_ptr) 
+		return DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM, " connect: rSID %d, pdata %p, ln %d\n", 
+		     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;
+
+	if (rdma_resolve_addr(conn->cm_id, NULL, 
+			      (struct sockaddr *)&conn->r_addr, 
+			      conn->arp_timeout)) {
+                dapl_log(DAPL_DBG_TYPE_ERR,
+                         " dapl_cma_connect: rdma_resolve_addr ERR %s\n",
+                         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),
+		ntohs(((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)
+{
+	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 %d\n", 
+			     ep_ptr->cm_handle, ret);
+	/* 
+	 * DAT event notification occurs from the callback
+	 * Don't wait for event, allow consumer option to
+	 * to give up and destroy cm_id if event is delayed. 
+	 * EP DISCONNECTED state protects against duplicate 
+	 * events being queued.
+	 */
+	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 %d sp %p conn %p id %d)\n",
+		ia_ptr, 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_cm_accept: ib_qp_alloc failed: 0x%x\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 */
+	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 ib_cm_handle_t cm_handle, IN int reason)
+{
+    	int ret;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_CM,
+		     " reject(cm_handle %p reason %x)\n",
+		     cm_handle, reason );
+
+	if (cm_handle == IB_INVALID_HANDLE) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+			     " reject: invalid handle: reason %d\n",
+			     reason);
+		return DAT_SUCCESS;
+	}
+
+	ret = rdma_reject(cm_handle->cm_id, NULL, 0);
+
+	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;
+	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
+ *
+ * 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)
+{
+	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 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 100644
index 0000000..c54bbaf
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_cq.c
@@ -0,0 +1,576 @@
+/*
+ * 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 "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_lmr_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_ring_buffer_util.h"
+#include <sys/poll.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;
+	struct pollfd	cq_fd = {
+		.fd      = hca->ib_cq->fd,
+		.events  = POLLIN,
+		.revents = 0 
+	};
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL," dapli_cq_event_cb(%p)\n", hca);
+
+	if ((poll(&cq_fd, 1, 0) == 1) &&
+		(!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 )
+{
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, 
+		"dapls_ib_cq_alloc: evd %p cqlen=%d \n", evd_ptr, *cqlen);
+
+	struct ibv_comp_channel *channel = ia_ptr->hca_ptr->ib_trans.ib_cq;
+
+#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) {
+		close((*p_cq_wait_obj_handle)->pipe[0]);
+		close((*p_cq_wait_obj_handle)->pipe[1]);
+		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);
+
+	close(p_cq_wait_obj_handle->pipe[0]);
+	close(p_cq_wait_obj_handle->pipe[1]);
+
+	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..511a77a
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_dto.h
@@ -0,0 +1,306 @@
+/*
+ * 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 uDAPL openib 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"
+
+#define	DEFAULT_DS_ENTRIES	8
+
+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 )
+{
+	ib_data_segment_t ds_array[DEFAULT_DS_ENTRIES];
+	ib_data_segment_t *ds_array_p, *ds_array_start_p = NULL;
+	struct ibv_recv_wr wr;
+	struct ibv_recv_wr *bad_wr;
+	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);
+
+	if (segments <= DEFAULT_DS_ENTRIES) 
+		ds_array_p = ds_array;
+	else
+		ds_array_start_p = ds_array_p = 
+			dapl_os_alloc(segments * sizeof(ib_data_segment_t));
+
+	if (NULL == ds_array_p)
+		return (DAT_INSUFFICIENT_RESOURCES);
+	
+	/* setup work request */
+	total_len = 0;
+	wr.next = 0;
+	wr.num_sge = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds_array_p;
+
+	for (i = 0; i < segments; i++) {
+		if (!local_iov[i].segment_length)
+			continue;
+
+		ds_array_p->addr = (uint64_t) local_iov[i].virtual_address;
+		ds_array_p->length = local_iov[i].segment_length;
+		ds_array_p->lkey = local_iov[i].lmr_context;
+		
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_rcv: l_key 0x%x va %p len %d\n",
+			     ds_array_p->lkey, ds_array_p->addr, 
+			     ds_array_p->length );
+
+		total_len += ds_array_p->length;
+		wr.num_sge++;
+		ds_array_p++;
+	}
+
+	if (cookie != NULL) 
+		cookie->val.dto.size = total_len;
+
+	ret = ibv_post_recv(ep_ptr->qp_handle->cm_id->qp, &wr, &bad_wr);
+	
+	if (ds_array_start_p != NULL)
+	    dapl_os_free(ds_array_start_p, segments * sizeof(ib_data_segment_t));
+
+	if (ret)
+		return( dapl_convert_errno(errno,"ibv_recv") );
+
+	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)
+{
+	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);
+
+	ib_data_segment_t ds_array[DEFAULT_DS_ENTRIES];
+	ib_data_segment_t *ds_array_p, *ds_array_start_p = NULL;
+	struct ibv_send_wr wr;
+	struct ibv_send_wr *bad_wr;
+	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 cookie %p segs %d l_iov %p\n",
+		     ep_ptr, cookie, segments, local_iov);
+
+	if(segments <= DEFAULT_DS_ENTRIES) 
+		ds_array_p = ds_array;
+	else
+		ds_array_start_p = ds_array_p = 
+			dapl_os_alloc(segments * sizeof(ib_data_segment_t));
+
+	if (NULL == ds_array_p)
+		return (DAT_INSUFFICIENT_RESOURCES);
+	
+	/* setup the work request */
+	wr.next = 0;
+	wr.opcode = op_type;
+	wr.num_sge = 0;
+	wr.send_flags = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds_array_p;
+	total_len = 0;
+
+	for (i = 0; i < segments; i++ ) {
+		if ( !local_iov[i].segment_length )
+			continue;
+
+		ds_array_p->addr = (uint64_t) local_iov[i].virtual_address;
+		ds_array_p->length = local_iov[i].segment_length;
+		ds_array_p->lkey = local_iov[i].lmr_context;
+		
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_snd: lkey 0x%x va %p len %d\n",
+			     ds_array_p->lkey, ds_array_p->addr, 
+			     ds_array_p->length );
+
+		total_len += ds_array_p->length;
+		wr.num_sge++;
+		ds_array_p++;
+	}
+
+	if (cookie != NULL) 
+		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->target_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 (ds_array_start_p != NULL)
+	    dapl_os_free(ds_array_start_p, segments * sizeof(ib_data_segment_t));
+
+	if (ret)
+		return( dapl_convert_errno(errno,"ibv_send") );
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP," post_snd: returned\n");
+	return DAT_SUCCESS;
+}
+
+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;
+}
+
+STATIC _INLINE_ int dapls_cqe_opcode(ib_work_completion_t *cqe_p)
+{
+	switch (cqe_p->opcode) {
+	case IBV_WC_SEND:
+		return (OP_SEND);
+	case IBV_WC_RDMA_WRITE:
+		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:
+		return (OP_RECEIVE);
+	case IBV_WC_RECV_RDMA_WITH_IMM:
+		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_mem.c b/dapl/openib_cma/dapl_ib_mem.c
new file mode 100644
index 0000000..dc689f5
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_mem.c
@@ -0,0 +1,391 @@
+/*
+ * 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_det_mem.c
+ *
+ * PURPOSE: Intel DET APIs: Memory windows, registration,
+ *           and protection domain 
+ *
+ * $Id: $
+ *
+ **********************************************************************/
+
+#include <sys/ioctl.h>  /* for IOCTL's */
+#include <sys/types.h>  /* for socket(2) and related bits and pieces */
+#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>		/* for _SC_CLK_TCK */
+
+#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;
+
+	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)
+{
+	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);  
+	}
+
+	/* 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 h %x pd %p ctx %p "
+		     "lkey=0x%x rkey=0x%x priv=%x\n", 
+		     lmr->mr_handle, lmr->mr_handle->handle,	
+		     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)
+{
+    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..69c49a9
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_qp.c
@@ -0,0 +1,331 @@
+/*
+ * 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_det_qp.c
+ *
+ * PURPOSE: QP routines for access to DET 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;
+	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..00aa5fb
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_util.c
@@ -0,0 +1,951 @@
+/*
+ * 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, work thread
+ *
+ ****************************************************************************
+ *		   Source Control System Information
+ *
+ *    $Id: $
+ *
+ *	Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ *
+ **************************************************************************/
+#ifdef RCSID
+static const char rcsid[] = "$Id:  $";
+#endif
+
+#include "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ib_util.h"
+
+#include <stdlib.h>
+#include <netinet/tcp.h>
+#include <sys/poll.h>
+#include <fcntl.h>
+
+#include <sys/ioctl.h>  /* for IOCTL's */
+#include <sys/types.h>  /* for socket(2) and related bits and pieces */
+#include <sys/socket.h> /* for socket(2) */
+#include <net/if.h>     /* for struct ifreq */
+#include <net/if_arp.h> /* for ARPHRD_INFINIBAND */
+#include <arpa/inet.h>	/* for inet_ntoa */
+
+
+int g_dapl_loopback_connection = 0;
+int g_ib_pipe[2];
+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;	
+
+/* 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;
+}
+
+/* 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);
+
+	/* create pipe for waking up work thread */
+	if (pipe(g_ib_pipe))
+		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);
+	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)
+{
+	long opts;
+	struct rdma_cm_id *cm_id;
+	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)
+			return DAT_INTERNAL_ERROR;
+	}
+	dapl_os_unlock(&g_hca_lock);
+
+	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;
+	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)bswap_64(gid->global.subnet_prefix),
+		(unsigned long long)bswap_64(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(fd=%d)\n",
+		     hca_ptr->ib_trans.ib_cq->fd);
+
+	opts = fcntl(hca_ptr->ib_trans.ib_cq->fd, F_GETFL); /* uCQ */
+	if (opts < 0 || fcntl(hca_ptr->ib_trans.ib_cq->fd, 
+			      F_SETFL, opts | O_NONBLOCK) < 0) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " open_hca: fcntl on ib_cq->fd %d ERR %d %s\n",
+			 hca_ptr->ib_trans.ib_cq->fd, opts,
+			strerror(errno));
+		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 (write(g_ib_pipe[1], "w", sizeof "w") == -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);
+
+	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 (write(g_ib_pipe[1], "w", sizeof "w") == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " close_hca: thread wakeup error = %s\n",
+			 strerror(errno));
+
+	/* wait for thread to remove HCA references */
+	while (hca_ptr->ib_trans.destroy != 2) {
+		struct timespec	sleep, remain;
+		sleep.tv_sec = 0;
+		sleep.tv_nsec = 10000000; /* 10 ms */
+		if (write(g_ib_pipe[1], "w", sizeof "w") == -1)
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " close_hca: thread wakeup error = %s\n",
+				 strerror(errno));		
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL, 
+			     " ib_thread_destroy: wait on hca %p destroy\n");
+		nanosleep (&sleep, &remain);
+	}
+bail:
+	if (hca_ptr->ib_trans.ib_cq)
+		ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);
+
+	if (hca_ptr->ib_trans.ib_cq_empty) {
+		struct ibv_comp_channel *channel;
+		channel = hca_ptr->ib_trans.ib_cq_empty->channel;
+		ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);
+		ibv_destroy_comp_channel(channel);
+	}
+
+	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;
+	}
+
+	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_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;
+		ia_attr->max_lmr_block_size       = 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;
+
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 "dapl_query_hca: (ver=%x) ep's %d ep_q %d"
+			 " evd's %d evd_q %d\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 );
+		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)
+{
+	long opts;
+	DAT_RETURN dat_status;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+		     " ib_thread_init(%d)\n", 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 */
+	opts = fcntl(g_cm_events->fd, F_GETFL); /* uCMA */
+	if (opts < 0 || fcntl(g_cm_events->fd, 
+			      F_SETFL, opts | O_NONBLOCK) < 0) {
+		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) {
+                struct timespec sleep, remain;
+                sleep.tv_sec = 0;
+                sleep.tv_nsec = 2000000; /* 2 ms */
+                dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+                             " ib_thread_init: waiting for ib_thread\n");
+		dapl_os_unlock(&g_hca_lock);
+                nanosleep (&sleep, &remain);
+		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",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", 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 (write(g_ib_pipe[1], "w", sizeof "w") == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " destroy: thread wakeup error = %s\n",
+			 strerror(errno));	
+	while ((g_ib_thread_state != IB_THREAD_EXIT) && (retries--)) {
+		struct timespec	sleep, remain;
+		sleep.tv_sec = 0;
+		sleep.tv_nsec = 2000000; /* 2 ms */
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL, 
+			" ib_thread_destroy: waiting for ib_thread\n");
+		if (write(g_ib_pipe[1], "w", sizeof "w") == -1)
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " destroy: thread wakeup error = %s\n",
+				 strerror(errno));	
+		dapl_os_unlock( &g_hca_lock );
+		nanosleep(&sleep, &remain);
+		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",getpid());
+}
+
+void dapli_async_event_cb(struct _ib_hca_transport *hca)
+{
+	struct ibv_async_event	event;
+	struct pollfd	async_fd = {
+		.fd      = hca->cm_id->verbs->async_fd,
+		.events  = POLLIN,
+		.revents = 0
+	};
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " async_event(%p)\n",hca);
+
+	if (hca->destroy)
+		return;
+
+	if ((poll(&async_fd, 1, 0)==1) &&
+		(!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,
+				"dapl 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,
+			          "dapl 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);
+	}
+}
+
+/* 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",
+		      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",
+				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",
+				     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",
+			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,
+					 " ib_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",getpid());
+	g_ib_thread_state = IB_THREAD_EXIT;
+	dapl_os_unlock(&g_hca_lock);	
+}
+
diff --git a/dapl/openib_cma/dapl_ib_util.h b/dapl/openib_cma/dapl_ib_util.h
new file mode 100755
index 0000000..1d919d9
--- /dev/null
+++ b/dapl/openib_cma/dapl_ib_util.h
@@ -0,0 +1,341 @@
+/*
+ * 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 <infiniband/verbs.h>
+#include <byteswap.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
+
+/* CM private data areas */
+#define	IB_MAX_REQ_PDATA_SIZE	48
+#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
+
+/* 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[IB_MAX_DREP_PDATA_SIZE];
+};
+
+typedef struct dapl_cm_id	*ib_cm_handle_t;
+typedef struct dapl_cm_id	*ib_cm_srvc_handle_t;
+
+/* Operation and state mappings */
+typedef enum	ibv_send_flags	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 ((err != EAGAIN) && (err != ETIME) && 
+	(err != ETIMEDOUT) && (err != EINTR))
+	dapl_log (DAPL_DBG_TYPE_ERR," %s %s\n", str, strerror(err));
+
+    switch( err )
+    {
+	case EOVERFLOW	: return DAT_LENGTH_ERROR;
+	case EACCES	: return DAT_PRIVILEGES_VIOLATION;
+	case ENXIO	: 
+	case ERANGE	: 
+	case EPERM	: return DAT_PROTECTION_VIOLATION;		  
+	case EINVAL	:
+        case EBADF	: 
+	case ENOENT	:
+	case ENOTSOCK	: 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 ETIME	:	    
+	case ETIMEDOUT	: return DAT_TIMEOUT_EXPIRED;
+    	case ENETUNREACH: return DAT_INVALID_ADDRESS | DAT_INVALID_ADDRESS_UNREACHABLE;
+	case EBUSY	: return DAT_PROVIDER_IN_USE;
+	case EADDRINUSE	: return DAT_CONN_QUAL_IN_USE;
+    	case EALREADY	: return DAT_INVALID_STATE | DAT_INVALID_STATE_EP_ACTCONNPENDING;
+        case ENOSPC	: 
+	case ENOMEM	:
+        case E2BIG	:
+        case EDQUOT	: 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_scm/dapl_ib_cm.c b/dapl/openib_scm/dapl_ib_cm.c
new file mode 100644
index 0000000..76e5d3a
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_cm.c
@@ -0,0 +1,1482 @@
+/*
+ * 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 <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <netinet/tcp.h>
+#include <byteswap.h>
+#include <poll.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+static inline uint64_t cpu_to_be64(uint64_t x) {return bswap_64(x);}
+#elif __BYTE_ORDER == __BIG_ENDIAN
+static inline uint64_t cpu_to_be64(uint64_t x) {return x;}
+#endif
+
+extern int g_scm_pipe[2];
+
+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;
+
+        if (dapl_os_lock_init(&cm_ptr->lock)) 
+		goto bail;
+
+	(void)dapl_os_memzero(cm_ptr, sizeof(*cm_ptr));
+	cm_ptr->dst.ver = htons(DSCM_VER);
+	cm_ptr->socket = -1;
+	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 >= 0)  
+			close(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 = IB_INVALID_HANDLE;
+
+	/* close socket if still active */
+	if (cm_ptr->socket >= 0) {
+		close(cm_ptr->socket);
+		cm_ptr->socket = -1;
+	}
+	dapl_os_unlock(&cm_ptr->lock);
+
+	/* wakeup work thread */
+	if (write(g_scm_pipe[1], "w", sizeof "w") == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " 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 (write(g_scm_pipe[1], "w", sizeof "w") == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " cm_queue: thread wakeup error = %s\n",
+			 strerror(errno));
+}
+
+static uint16_t dapli_get_lid(IN struct ibv_context *ctx, IN uint8_t port)
+{
+	struct ibv_port_attr port_attr;
+
+	if(ibv_query_port(ctx, port,&port_attr))
+		return(0xffff);
+	else
+		return(port_attr.lid);
+}
+
+/*
+ * ACTIVE/PASSIVE: called from CR thread or consumer via ep_disconnect
+ */
+static DAT_RETURN 
+dapli_socket_disconnect(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 >= 0) { 
+			if (write(cm_ptr->socket,
+				  &disc_data, sizeof(disc_data)) == -1)
+				dapl_log(DAPL_DBG_TYPE_WARN,
+					 " cm_disc: write error = %s\n",
+					 strerror(errno));
+			close(cm_ptr->socket);
+			cm_ptr->socket = -1;
+		}
+		cm_ptr->state = SCM_DISCONNECTED;
+	}
+	dapl_os_unlock(&cm_ptr->lock);
+
+	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 
+ */
+void
+dapli_socket_connected(ib_cm_handle_t cm_ptr, int err)
+{
+	int		len, opt = 1;
+	struct iovec    iovec[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,&opt,sizeof(opt));
+
+	/* send qp info and pdata to remote peer */
+	iovec[0].iov_base = &cm_ptr->dst;
+	iovec[0].iov_len  = sizeof(ib_qp_cm_t);
+	if (cm_ptr->dst.p_size) {
+		iovec[1].iov_base = cm_ptr->p_data;
+		iovec[1].iov_len  = ntohl(cm_ptr->dst.p_size);
+	}
+
+	len = writev(cm_ptr->socket, iovec, (cm_ptr->dst.p_size ? 2: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) 
+			cpu_to_be64(cm_ptr->dst.gid.global.subnet_prefix),
+                     (unsigned long long) 
+			cpu_to_be64(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)
+{
+	ib_cm_handle_t cm_ptr;
+	int		ret;
+	DAPL_IA		*ia_ptr = ep_ptr->header.owner_ia;
+
+	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)) < 0 ) {
+		dapl_os_free( cm_ptr, sizeof( *cm_ptr ) );
+		return DAT_INSUFFICIENT_RESOURCES;
+	}
+
+	/* non-blocking */
+	ret = fcntl(cm_ptr->socket, F_GETFL); 
+        if (ret < 0 || fcntl(cm_ptr->socket,
+                              F_SETFL, ret | O_NONBLOCK) < 0) {
+                dapl_log(DAPL_DBG_TYPE_ERR,
+                         " socket connect: fcntl on socket %d ERR %d %s\n",
+                         cm_ptr->socket, ret,
+                         strerror(errno));
+                goto bail;
+        }
+
+	((struct sockaddr_in*)r_addr)->sin_port = htons(r_qual);
+	ret = connect(cm_ptr->socket, r_addr, sizeof(*r_addr));
+	if (ret && errno != EINPROGRESS) {
+		dapl_log(DAPL_DBG_TYPE_ERR,
+			 " socket connect ERROR: %s -> %s r_qual %d\n",
+			 strerror(errno), 
+		     	 inet_ntoa(((struct sockaddr_in *)r_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);
+	cm_ptr->dst.port = htons(ia_ptr->hca_ptr->port_num);
+	cm_ptr->dst.lid = 
+		htons(dapli_get_lid(ia_ptr->hca_ptr->ib_hca_handle, 
+				    (uint8_t)ia_ptr->hca_ptr->port_num));
+	if (cm_ptr->dst.lid == 0xffff) {
+		dapl_log(DAPL_DBG_TYPE_ERR, 
+			 " CONNECT: query LID ERR %s -> %s\n",
+			 strerror(errno), 
+			 inet_ntoa(((struct sockaddr_in *)r_addr)->sin_addr));
+		goto bail;
+	}
+
+        /* in network order */
+        if (ibv_query_gid(ia_ptr->hca_ptr->ib_hca_handle,
+				    (uint8_t)ia_ptr->hca_ptr->port_num,
+				    0, &cm_ptr->dst.gid)) {
+		dapl_log(DAPL_DBG_TYPE_ERR, 
+			 " CONNECT: query GID ERR %s -> %s\n",
+			 strerror(errno), 
+			 inet_ntoa(((struct sockaddr_in *)r_addr)->sin_addr));
+		goto bail;
+	}
+
+	/* 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(((struct sockaddr_in *)r_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
+ */
+void 
+dapli_socket_connect_rtu(ib_cm_handle_t	cm_ptr)
+{
+	DAPL_EP		*ep_ptr = cm_ptr->ep;
+	int		len;
+	struct iovec    iovec[2];
+	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"); 
+
+	iovec[0].iov_base = &cm_ptr->dst;
+	iovec[0].iov_len  = sizeof(ib_qp_cm_t);
+	len = readv(cm_ptr->socket, iovec, 1);
+	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);
+	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, 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.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) {
+		iovec[0].iov_base = cm_ptr->p_data;
+		iovec[0].iov_len  = cm_ptr->dst.p_size;
+		len = readv(cm_ptr->socket, iovec, 1);
+		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 */
+	if (dapls_modify_qp_state(ep_ptr->qp_handle, 
+				  IBV_QPS_RTR, &cm_ptr->dst) != 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)); 
+		goto bail;
+	}
+
+	if (dapls_modify_qp_state(ep_ptr->qp_handle, 
+				  IBV_QPS_RTS, &cm_ptr->dst) != 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)); 
+		goto bail;
+	}
+		 
+	ep_ptr->qp_state = IB_QP_STATE_RTS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP," connect_rtu: send RTU\n"); 
+
+	/* complete handshake after final QP state change */
+	if (write(cm_ptr->socket, &rtu_data, sizeof(rtu_data)) == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " CONN_RTU: write error = %s\n",
+			 strerror(errno));
+
+	/* 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"); 
+	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)) < 0) {
+		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,&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 
+ */
+void 
+dapli_socket_accept(ib_cm_srvc_handle_t cm_ptr)
+{
+	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 = dapl_os_alloc(sizeof(*acm_ptr))) == NULL) 
+		goto bail;
+
+	(void) dapl_os_memzero(acm_ptr, sizeof(*acm_ptr));
+	
+	acm_ptr->socket = -1;
+	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 < 0) {
+		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 */
+	if (acm_ptr)
+		dapli_cm_destroy(acm_ptr);
+}
+
+/*
+ * PASSIVE: receive peer QP information, private data, post cr_event 
+ */
+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 = read(acm_ptr->socket, &acm_ptr->dst, sizeof(ib_qp_cm_t));
+	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, 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);
+	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 = read( acm_ptr->socket, 
+			    acm_ptr->p_data, acm_ptr->dst.p_size);
+		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;
+
+	/* 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;
+	ib_cm_handle_t  cm_ptr = cr_ptr->ib_cm_handle;
+	struct iovec    iovec[2];
+	int		len;
+
+	if (p_size > IB_MAX_REP_PDATA_SIZE) 
+		return DAT_LENGTH_ERROR;
+
+	/* must have a accepted socket */
+	if (cm_ptr->socket < 0)
+		return DAT_INTERNAL_ERROR;
+	
+	dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+		     " ACCEPT_USR: remote port=0x%x lid=0x%x"
+		     " qpn=0x%x psize=%d\n",
+		     cm_ptr->dst.port, cm_ptr->dst.lid,
+		     cm_ptr->dst.qpn, cm_ptr->dst.p_size); 
+
+	/* modify QP to RTR and then to RTS with remote info already read */
+	if (dapls_modify_qp_state(ep_ptr->qp_handle, 
+				  IBV_QPS_RTR, &cm_ptr->dst) != 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)); 
+		goto bail;
+	}
+	if (dapls_modify_qp_state(ep_ptr->qp_handle, 
+				  IBV_QPS_RTS, &cm_ptr->dst) != 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)); 
+		goto bail;
+	}
+	ep_ptr->qp_state = IB_QP_STATE_RTS;
+	
+	/* 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, and private data */
+	cm_ptr->dst.qpn = htonl(ep_ptr->qp_handle->qp_num);
+	cm_ptr->dst.port = htons(ia_ptr->hca_ptr->port_num);
+	cm_ptr->dst.lid = htons(dapli_get_lid(ia_ptr->hca_ptr->ib_hca_handle, 
+				        (uint8_t)ia_ptr->hca_ptr->port_num));
+	if (cm_ptr->dst.lid == 0xffff) {
+		dapl_log(DAPL_DBG_TYPE_ERR, 
+			 " ACCEPT_USR: query LID ERR %s -> %s\n",
+			 strerror(errno), 
+			 inet_ntoa(((struct sockaddr_in *)
+				&cm_ptr->dst.ia_address)->sin_addr)); 
+		goto bail;
+	}
+
+        /* in network order */
+	if (ibv_query_gid(ia_ptr->hca_ptr->ib_hca_handle,
+			  (uint8_t)ia_ptr->hca_ptr->port_num,
+			  0, &cm_ptr->dst.gid)) {
+		dapl_log(DAPL_DBG_TYPE_ERR, 
+			 " ACCEPT_USR: query GID ERR %s -> %s\n",
+			 strerror(errno), 
+			 inet_ntoa(((struct sockaddr_in *)
+				&cm_ptr->dst.ia_address)->sin_addr)); 
+		goto bail;
+	}
+
+	cm_ptr->dst.ia_address = ia_ptr->hca_ptr->hca_address;
+	cm_ptr->dst.p_size = htonl(p_size);
+	iovec[0].iov_base = &cm_ptr->dst;
+	iovec[0].iov_len  = sizeof(ib_qp_cm_t);
+	if (p_size) {
+		iovec[1].iov_base = p_data;
+		iovec[1].iov_len  = p_size;
+	}
+	len = writev(cm_ptr->socket, iovec, (p_size ? 2: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(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,
+                     " ACCEPT_USR SRC GID subnet %016llx id %016llx\n",
+                     (unsigned long long) 
+			cpu_to_be64(cm_ptr->dst.gid.global.subnet_prefix),
+                     (unsigned long long) 
+			cpu_to_be64(cm_ptr->dst.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;
+
+	/* restore remote address information for query */
+	dapl_os_memcpy( &cm_ptr->dst.ia_address, 
+			&ep_ptr->remote_ia_address,
+			sizeof(cm_ptr->dst.ia_address));
+
+	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(ib_cm_handle_t	cm_ptr)
+{
+	int		len;
+	short		rtu_data = 0;
+
+	/* complete handshake after final QP state change */
+	len = read(cm_ptr->socket, &rtu_data, sizeof(rtu_data));
+	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" ); 
+	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 >= 0) {
+			close(cm_ptr->socket );
+			cm_ptr->socket = -1;
+		}
+	    	/* cr_thread will free */
+		cm_ptr->state = SCM_DESTROY;
+		sp_ptr->cm_srvc_handle = NULL;
+		if (write(g_scm_pipe[1], "w", sizeof "w") == -1)
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " remove_listen: 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  ib_cm_handle_t	ib_cm_handle,
+	IN  int			reject_reason)
+{
+    	ib_cm_srvc_handle_t	cm_ptr = ib_cm_handle;
+	struct iovec    	iovec;
+
+	dapl_dbg_log (DAPL_DBG_TYPE_EP,
+		      "dapls_ib_reject_connection(cm_handle %p reason %x)\n",
+		      ib_cm_handle, reject_reason);
+
+	/* write reject data to indicate reject */
+	if (cm_ptr->socket >= 0) {
+		cm_ptr->dst.rej = (uint16_t)reject_reason;
+		cm_ptr->dst.rej = htons(cm_ptr->dst.rej);
+		iovec.iov_base = &cm_ptr->dst;
+		iovec.iov_len  = sizeof(ib_qp_cm_t);
+		writev(cm_ptr->socket, &iovec, 1);
+		close(cm_ptr->socket);
+		cm_ptr->socket = -1;
+	}
+
+	/* cr_thread will destroy CR */
+	cm_ptr->state = SCM_REJECTED;
+	if (write(g_scm_pipe[1], "w", sizeof "w") == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " reject_connection: 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;
+	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)
+{
+	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 */
+#define SCM_MAX_CONN 8192
+void cr_thread(void *arg) 
+{
+    struct dapl_hca	*hca_ptr = arg;
+    ib_cm_handle_t	cr, next_cr;
+    int 		opt,ret,idx;
+    socklen_t		opt_len;
+    char		rbuf[2];
+    struct pollfd	ufds[SCM_MAX_CONN];
+     
+    dapl_dbg_log(DAPL_DBG_TYPE_UTIL," cr_thread: ENTER hca %p\n",hca_ptr);
+
+    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) {
+	idx=0;
+	ufds[idx].fd = g_scm_pipe[0]; /* wakeup and process work */
+        ufds[idx].events = POLLIN;
+	ufds[idx].revents = 0;
+	
+	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;
+	    if ((cr->socket == -1 && cr->state == SCM_DESTROY) || 
+		 hca_ptr->ib_trans.cr_state != IB_THREAD_RUN) {
+
+		dapl_dbg_log(DAPL_DBG_TYPE_CM," cr_thread: Free %p\n", cr);
+		next_cr = dapl_llist_next_entry(&hca_ptr->ib_trans.list,
+						(DAPL_LLIST_ENTRY*)&cr->entry );
+		dapl_llist_remove_entry(&hca_ptr->ib_trans.list, 
+					(DAPL_LLIST_ENTRY*)&cr->entry);
+		dapl_os_free(cr, sizeof(*cr));
+		continue;
+	    }
+	    if (idx==SCM_MAX_CONN-1) {
+		dapl_dbg_log(DAPL_DBG_TYPE_ERR, 
+			     "SCM ERR: cm_thread exceeded FD_SETSIZE %d\n",idx+1);
+		continue;
+	    }
+		
+	    /* Add to ufds for poll, check for immediate work */
+	    ufds[++idx].fd = cr->socket; /* add listen or cr */
+	    ufds[idx].revents = 0;
+	    if (cr->state == SCM_CONN_PENDING)
+	    	ufds[idx].events = POLLOUT;
+	    else
+		ufds[idx].events = POLLIN;
+
+	    /* check socket for event, accept in or connect out */
+	    dapl_dbg_log(DAPL_DBG_TYPE_CM," poll cr=%p, fd=%d,%d\n", 
+				cr, cr->socket, ufds[idx].fd);
+	    dapl_os_unlock(&hca_ptr->ib_trans.lock);
+	    ret = poll(&ufds[idx],1,0);
+	    dapl_dbg_log(DAPL_DBG_TYPE_CM,
+			 " poll wakeup ret=%d cr->st=%d"
+			 " ev=0x%x fd=%d\n",
+			 ret,cr->state,ufds[idx].revents,ufds[idx].fd);
+
+	    /* data on listen, qp exchange, and on disconnect request */
+	    if ((ret == 1) && ufds[idx].revents == POLLIN) {
+		if (cr->socket > 0) {
+			if (cr->state == SCM_LISTEN)
+				dapli_socket_accept(cr);
+			else if (cr->state == SCM_ACCEPTING)
+				dapli_socket_accept_data(cr);
+			else if (cr->state == SCM_ACCEPTED)
+				dapli_socket_accept_rtu(cr);
+			else if (cr->state == SCM_RTU_PENDING)
+				dapli_socket_connect_rtu(cr);
+			else if (cr->state == SCM_CONNECTED)
+				dapli_socket_disconnect(cr);
+		}
+	    /* connect socket is writable, check status */
+	    } else if ((ret == 1) && 
+			(ufds[idx].revents & POLLOUT ||
+			 ufds[idx].revents & POLLERR)) {
+		if (cr->state == SCM_CONN_PENDING) {
+			opt = 0;
+			ret = getsockopt(cr->socket, SOL_SOCKET, 
+					 SO_ERROR, &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 revnt=%x st=%d -> %s\n",
+			 strerror(errno), ret, ufds[idx].revents, 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);
+	    next_cr =  dapl_llist_next_entry(&hca_ptr->ib_trans.list,
+					     (DAPL_LLIST_ENTRY*)&cr->entry);
+	} 
+	dapl_os_unlock(&hca_ptr->ib_trans.lock);
+	dapl_dbg_log(DAPL_DBG_TYPE_CM," cr_thread: sleep, %d\n", idx+1);
+	poll(ufds,idx+1,-1); /* infinite, all sockets and pipe */
+	/* if pipe used to wakeup, consume */
+	if (ufds[0].revents == POLLIN)
+		if (read(g_scm_pipe[0], rbuf, 2) == -1)
+			dapl_log(DAPL_DBG_TYPE_CM,
+				 " cr_thread: read pipe error = %s\n",
+				 strerror(errno));
+	dapl_dbg_log(DAPL_DBG_TYPE_CM," cr_thread: wakeup\n");
+	dapl_os_lock(&hca_ptr->ib_trans.lock);
+    } 
+    dapl_os_unlock(&hca_ptr->ib_trans.lock);	
+    hca_ptr->ib_trans.cr_state = IB_THREAD_EXIT;
+    dapl_dbg_log(DAPL_DBG_TYPE_UTIL," cr_thread(hca %p) exit\n",hca_ptr);
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 8
+ * End:
+ */
diff --git a/dapl/openib_scm/dapl_ib_cq.c b/dapl/openib_scm/dapl_ib_cq.c
new file mode 100644
index 0000000..7d6bd4f
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_cq.c
@@ -0,0 +1,622 @@
+/*
+ * 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 "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_lmr_util.h"
+#include "dapl_evd_util.h"
+#include "dapl_ring_buffer_util.h"
+#include <sys/poll.h>
+#include <signal.h>
+
+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) {
+                struct timespec sleep, remain;
+                sleep.tv_sec = 0;
+                sleep.tv_nsec = 20000000; /* 20 ms */
+                dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+                             " cq_thread_init: waiting for cq_thread\n");
+                nanosleep (&sleep, &remain);
+        }
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL," cq_thread_init(%d) exit\n",getpid());
+        return 0;
+}
+
+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) {
+                struct timespec sleep, remain;
+                sleep.tv_sec = 0;
+                sleep.tv_nsec = 2000000; /* 2 ms */
+                dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+                             " cq_thread_destroy: waiting for cq_thread\n");
+                nanosleep (&sleep, &remain);
+        }
+        dapl_dbg_log(DAPL_DBG_TYPE_UTIL," cq_thread_destroy(%d) exit\n",getpid());
+}
+
+/* catch the signal */
+static void ib_cq_handler(int signum)
+{
+        return;
+}
+
+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);
+}
+
+
+/*
+ * 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 )
+{
+	dapl_dbg_log ( DAPL_DBG_TYPE_UTIL, 
+		"dapls_ib_cq_alloc: evd %p cqlen=%d \n", evd_ptr, *cqlen );
+
+	struct ibv_comp_channel *channel = ia_ptr->hca_ptr->ib_trans.ib_cq;
+
+#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_CM, 
+			" 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;
+}
+
+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 cq_fd = {
+			.fd      = p_cq_wait_obj_handle->fd,
+			.events  = POLLIN,
+			.revents = 0
+		};
+
+	dapl_dbg_log ( DAPL_DBG_TYPE_CM, 
+			" 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_CM, 
+		      " 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_scm/dapl_ib_dto.h b/dapl/openib_scm/dapl_ib_dto.h
new file mode 100644
index 0000000..f62c47d
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_dto.h
@@ -0,0 +1,311 @@
+/*
+ * 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 SCM (socket CM) 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"
+
+#define	DEFAULT_DS_ENTRIES	8
+
+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 )
+{
+	ib_data_segment_t ds_array[DEFAULT_DS_ENTRIES];
+	ib_data_segment_t *ds_array_p, *ds_array_start_p = NULL;
+	struct ibv_recv_wr wr;
+	struct ibv_recv_wr *bad_wr;
+	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);
+
+	if (segments <= DEFAULT_DS_ENTRIES) 
+		ds_array_p = ds_array;
+	else
+		ds_array_start_p = ds_array_p = 
+			dapl_os_alloc(segments * sizeof(ib_data_segment_t));
+
+	if (NULL == ds_array_p)
+		return (DAT_INSUFFICIENT_RESOURCES);
+	
+	/* setup work request */
+	total_len = 0;
+	wr.next = 0;
+	wr.num_sge = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds_array_p;
+
+	for (i = 0; i < segments; i++) {
+		if (!local_iov[i].segment_length)
+			continue;
+
+		ds_array_p->addr = (uint64_t) local_iov[i].virtual_address;
+		ds_array_p->length = local_iov[i].segment_length;
+		ds_array_p->lkey = local_iov[i].lmr_context;
+		
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_rcv: l_key 0x%x va %p len %d\n",
+			     ds_array_p->lkey, ds_array_p->addr, 
+			     ds_array_p->length );
+
+		total_len += ds_array_p->length;
+		wr.num_sge++;
+		ds_array_p++;
+	}
+
+	if (cookie != NULL) 
+		cookie->val.dto.size = total_len;
+
+	ret = ibv_post_recv(ep_ptr->qp_handle, &wr, &bad_wr);
+
+	if (ds_array_start_p != NULL)
+		dapl_os_free(ds_array_start_p, segments * sizeof(ib_data_segment_t));
+
+	if (ret)
+		return(dapl_convert_errno(errno,"ibv_recv"));
+	
+	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)
+{
+	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);
+
+	ib_data_segment_t ds_array[DEFAULT_DS_ENTRIES];
+	ib_data_segment_t *ds_array_p, *ds_array_start_p = NULL;
+	struct ibv_send_wr wr;
+	struct ibv_send_wr *bad_wr;
+	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 cookie %p segs %d l_iov %p\n",
+		     ep_ptr, cookie, segments, local_iov);
+
+	if(segments <= DEFAULT_DS_ENTRIES) 
+		ds_array_p = ds_array;
+	else
+		ds_array_start_p = ds_array_p = 
+			dapl_os_alloc(segments * sizeof(ib_data_segment_t));
+
+	if (NULL == ds_array_p)
+		return (DAT_INSUFFICIENT_RESOURCES);
+	
+	/* setup the work request */
+	wr.next = 0;
+	wr.opcode = op_type;
+	wr.num_sge = 0;
+	wr.send_flags = 0;
+	wr.wr_id = (uint64_t)(uintptr_t)cookie;
+	wr.sg_list = ds_array_p;
+	total_len = 0;
+
+	for (i = 0; i < segments; i++ ) {
+		if ( !local_iov[i].segment_length )
+			continue;
+
+		ds_array_p->addr = (uint64_t) local_iov[i].virtual_address;
+		ds_array_p->length = local_iov[i].segment_length;
+		ds_array_p->lkey = local_iov[i].lmr_context;
+		
+		dapl_dbg_log(DAPL_DBG_TYPE_EP, 
+			     " post_snd: lkey 0x%x va %p len %d\n",
+			     ds_array_p->lkey, ds_array_p->addr, 
+			     ds_array_p->length );
+
+		total_len += ds_array_p->length;
+		wr.num_sge++;
+		ds_array_p++;
+	}
+
+	if (cookie != NULL) 
+		cookie->val.dto.size = total_len;
+
+	if ((op_type == OP_RDMA_WRITE) || (op_type == OP_RDMA_READ)) {
+		wr.wr.rdma.remote_addr = remote_iov->target_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 (ds_array_start_p != NULL)
+		dapl_os_free(ds_array_start_p, segments * sizeof(ib_data_segment_t));
+
+	if (ret)
+		return(dapl_convert_errno(errno,"ibv_send"));
+
+	dapl_dbg_log(DAPL_DBG_TYPE_EP," post_snd: returned\n");
+	return DAT_SUCCESS;
+}
+
+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)
+{
+	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)
+			return (OP_RECEIVE_IMM);
+		else
+			return (OP_RECEIVE);
+	case IBV_WC_RECV_RDMA_WITH_IMM:
+		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_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
+#define DAPL_GET_CQE_VENDOR_ERR(cqe_p) ((ib_work_completion_t*)cqe_p)->vendor_err
+
+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_scm/dapl_ib_mem.c b/dapl/openib_scm/dapl_ib_mem.c
new file mode 100644
index 0000000..0faccc8
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_mem.c
@@ -0,0 +1,393 @@
+/*
+ * 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 <sys/ioctl.h>  /* for IOCTL's */
+#include <sys/types.h>  /* for socket(2) and related bits and pieces */
+#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>		/* for _SC_CLK_TCK */
+
+#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;
+
+	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)
+{
+	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);  
+	}
+
+	/* 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 h %x pd %p ctx %p "
+		     "lkey=0x%x rkey=0x%x priv=%x\n", 
+		     lmr->mr_handle, lmr->mr_handle->addr, 
+		     lmr->mr_handle->handle,	
+		     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)
+{
+    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..8577131
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_qp.c
@@ -0,0 +1,416 @@
+/*
+ * 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;
+	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;
+	}
+
+	ep_ptr->qp_state = IB_QP_STATE_INIT;
+	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;
+		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;
+
+	/* 
+	 * 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)) {
+		ep_ptr->qp_state = IB_QP_STATE_ERROR;
+		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
+ *
+ */
+void
+dapls_ib_reinit_ep (
+	IN  DAPL_EP	*ep_ptr)
+{
+	if ( ep_ptr->qp_handle != IB_INVALID_HANDLE ) {
+		/* 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);
+		ep_ptr->qp_state = IB_QP_STATE_INIT;
+	}
+}
+
+/* 
+ * Generic QP modify for init, reset, error, RTS, RTR
+ */
+DAT_RETURN
+dapls_modify_qp_state ( IN ib_qp_handle_t	qp_handle,
+			IN ib_qp_state_t	qp_state,
+			IN ib_qp_cm_t		*qp_cm )
+{
+	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;
+			
+	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:
+		{
+			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.qp_state = IBV_QPS_RTR;
+			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;
+			qp_attr.ah_attr.dlid = qp_cm->lid;
+			/* global routing */
+			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 = qp_cm->port;
+			
+			dapl_dbg_log (DAPL_DBG_TYPE_EP,
+			      " modify_qp_rtr: qpn %x lid %x "
+			      "port %x rd_atomic %d\n",
+			      qp_cm->qpn, qp_cm->lid, qp_cm->port,
+			      qp_attr.max_dest_rd_atomic );
+
+			break;
+		}		
+		case IBV_QPS_RTS: 
+		{
+			mask |= IBV_QP_TIMEOUT            |
+				IBV_QP_RETRY_CNT          |
+				IBV_QP_RNR_RETRY          |
+				IBV_QP_SQ_PSN             |
+				IBV_QP_MAX_QP_RD_ATOMIC;
+
+			qp_attr.qp_state	= IBV_QPS_RTS;
+			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.sq_psn		= 1;
+			qp_attr.max_rd_atomic	= 
+				ep_ptr->param.ep_attr.max_rdma_read_out;
+
+			dapl_dbg_log(DAPL_DBG_TYPE_EP,
+				" modify_qp_rts: psn %x rd_atomic %d ack %d "
+				" retry %d rnr_retry %d\n",
+				qp_attr.sq_psn, qp_attr.max_rd_atomic, 
+				qp_attr.timeout, qp_attr.retry_cnt, 
+				qp_attr.rnr_retry );
+			break;
+		}
+		case IBV_QPS_INIT: 
+		{
+			mask |= IBV_QP_PKEY_INDEX	|
+				IBV_QP_PORT		|
+				IBV_QP_ACCESS_FLAGS;
+
+			qp_attr.pkey_index  = 0;
+			qp_attr.port_num = ia_ptr->hca_ptr->port_num;
+			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;
+			
+			dapl_dbg_log (DAPL_DBG_TYPE_EP,
+				" modify_qp_init: pi %x port %x acc %x\n",
+				qp_attr.pkey_index, qp_attr.port_num,
+				qp_attr.qp_access_flags );
+			break;
+		}
+		default:
+			break;
+		
+	}
+
+	if (ibv_modify_qp(qp_handle, &qp_attr, mask))
+		return(dapl_convert_errno(errno,"modify_qp_state"));
+	
+	return DAT_SUCCESS;
+}
+
+/*
+ * 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..0661e0d
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_util.c
@@ -0,0 +1,577 @@
+/*
+ * 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 "dapl.h"
+#include "dapl_adapter_util.h"
+#include "dapl_ib_util.h"
+
+#include <stdlib.h>
+#include <netinet/tcp.h>
+#include <sys/utsname.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <unistd.h>	
+#include <fcntl.h>
+
+int g_dapl_loopback_connection = 0;
+int g_scm_pipe[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;
+	}
+}
+
+/* just get IP address for hostname */
+DAT_RETURN getipaddr( char *addr, int addr_len)
+{
+	struct sockaddr_in	*ipv4_addr = (struct sockaddr_in*)addr;
+	struct hostent		*h_ptr;
+	struct utsname		ourname;
+
+	if (uname(&ourname) < 0)  {
+		 dapl_log(DAPL_DBG_TYPE_ERR, 
+			  " open_hca: uname err=%s\n", strerror(errno));
+		return DAT_INTERNAL_ERROR;
+	}
+
+	h_ptr = gethostbyname(ourname.nodename);
+	if (h_ptr == NULL) {
+		 dapl_log(DAPL_DBG_TYPE_ERR, 
+			  " open_hca: gethostbyname err=%s\n", 
+			  strerror(errno));
+		return DAT_INTERNAL_ERROR;
+	}
+
+	if (h_ptr->h_addrtype == AF_INET) {
+		int i;
+		struct in_addr  **alist =
+			(struct in_addr **)h_ptr->h_addr_list;
+
+		*(uint32_t*)&ipv4_addr->sin_addr = 0;
+		ipv4_addr->sin_family = AF_INET;
+		
+		/* Walk the list of addresses for host */
+		for (i=0; alist[i] != NULL; i++) {
+		       /* first non-loopback address */			
+		       if (*(uint32_t*)alist[i] != htonl(0x7f000001)) {
+                               dapl_os_memcpy(&ipv4_addr->sin_addr,
+                                              h_ptr->h_addr_list[i],
+                                              4);
+                               break;
+                       }
+               }
+               /* if no acceptable address found */
+               if (*(uint32_t*)&ipv4_addr->sin_addr == 0)
+			return DAT_INVALID_ADDRESS;
+	} else 
+		return DAT_INVALID_ADDRESS;
+
+	return DAT_SUCCESS;
+}
+
+/*
+ * 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)
+{	
+	/* create pipe for waking up thread */
+	if (pipe(g_scm_pipe))
+		return 1;
+
+	return 0;
+}
+
+int32_t dapls_ib_release (void)
+{
+	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 ibv_device **dev_list;
+	int		i;
+	DAT_RETURN	dat_status = DAT_SUCCESS;
+
+	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, 
+		      " open_hca: %s - %p\n", hca_name, hca_ptr );
+
+	/* 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)
+		     bswap_64(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;
+	}
+
+	/* 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;
+	}
+
+	opts = fcntl(hca_ptr->ib_trans.ib_cq->fd, F_GETFL); /* uCQ */
+	if (opts < 0 || fcntl(hca_ptr->ib_trans.ib_cq->fd, 
+			      F_SETFL, opts | O_NONBLOCK) < 0) {
+		dapl_log(DAPL_DBG_TYPE_ERR, 
+			 " open_hca: fcntl on ib_cq->fd %d ERR %d %s\n", 
+			 hca_ptr->ib_trans.ib_cq->fd, opts,
+			 strerror(errno));
+		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
+	/* 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) {
+		struct timespec	sleep, remain;
+		sleep.tv_sec = 0;
+		sleep.tv_nsec = 2000000; /* 2 ms */
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL, 
+			     " open_hca: waiting for cr_thread\n");
+		nanosleep (&sleep, &remain);
+	}
+
+	/* get the IP address of the device */
+	dat_status = getipaddr((char*)&hca_ptr->hca_address, 
+				sizeof(DAT_SOCK_ADDR6));
+	
+	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));
+		
+	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
+
+	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 (write(g_scm_pipe[1], "w", sizeof "w") == -1)
+		dapl_log(DAPL_DBG_TYPE_UTIL,
+			 " close_hca: thread wakeup error = %s\n",
+			 strerror(errno));
+	while (hca_ptr->ib_trans.cr_state != IB_THREAD_EXIT) {
+		struct timespec	sleep, remain;
+		sleep.tv_sec = 0;
+		sleep.tv_nsec = 2000000; /* 2 ms */
+		if (write(g_scm_pipe[1], "w", sizeof "w") == -1)
+			dapl_log(DAPL_DBG_TYPE_UTIL,
+				 " close_hca: thread wakeup error = %s\n",
+				 strerror(errno));
+		dapl_dbg_log(DAPL_DBG_TYPE_UTIL, 
+			     " close_hca: waiting for cr_thread\n");
+		nanosleep (&sleep, &remain);
+	}
+	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;
+		ia_attr->max_lmr_block_size       = 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->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;
+		hca_ptr->ib_trans.ack_timer	  = DAPL_MAX(dev_attr.local_ca_ack_delay,
+							     hca_ptr->ib_trans.ack_timer);
+		hca_ptr->ib_trans.mtu		  = DAPL_MIN(port_attr.active_mtu,
+							     hca_ptr->ib_trans.mtu);
+#ifdef DEFINE_ATTR_LINK_LAYER
+                if (port_attr.link_layer == IBV_LINK_LAYER_ETHERNET)
+                        hca_ptr->ib_trans.global = 1;
+
+                dapl_log(DAPL_DBG_TYPE_UTIL,
+                         " query_hca: port.link_layer = 0x%x\n",
+                         port_attr.link_layer);
+#endif
+		dapl_dbg_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_dbg_log (DAPL_DBG_TYPE_UTIL, 
+			" query_hca: msg %llu rdma %llu iov %d lmr %d rmr %d ack_time %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,hca_ptr->ib_trans.ack_timer );
+	}
+	
+	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;
+		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 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	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;
+}
+
diff --git a/dapl/openib_scm/dapl_ib_util.h b/dapl/openib_scm/dapl_ib_util.h
new file mode 100644
index 0000000..91a4e67
--- /dev/null
+++ b/dapl/openib_scm/dapl_ib_util.h
@@ -0,0 +1,382 @@
+/*
+ * 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 <infiniband/verbs.h>
+#include <byteswap.h>
+
+#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;
+
+/* CM mappings, user CM not complete use SOCKETS */
+
+/* destination info to exchange, define wire protocol version */
+#define DSCM_VER 2
+typedef struct _ib_qp_cm
+{ 
+	uint16_t		ver;
+	uint16_t		rej;
+	uint16_t		lid;
+	uint16_t		port;
+	uint32_t		qpn;
+	uint32_t		p_size;
+	DAT_SOCK_ADDR6		ia_address;
+        union ibv_gid		gid;
+} 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;
+	int			socket;
+	struct dapl_hca		*hca;
+	DAT_HANDLE		sp;	
+	struct dapl_ep 		*ep;	
+	ib_qp_cm_t		dst;
+	unsigned char		p_data[256];
+};
+
+typedef struct ib_cm_handle	*ib_cm_handle_t;
+typedef ib_cm_handle_t	ib_cm_srvc_handle_t;
+
+DAT_RETURN getipaddr(char *addr, int addr_len);
+
+/* 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;
+
+/* prototype for cm thread */
+void cr_thread (void *arg);
+
+/* Operation and state mappings */
+typedef enum	ibv_send_flags	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
+
+/* 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    1024
+
+/* 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
+
+/* 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
+
+/* 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
+{ 
+	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;
+	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;
+} 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 cq_thread (void *arg);
+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 ib_qp_cm_t		*qp_cm );
+
+/* 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 != ETIME) && (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 ENXIO	: 
+	case ERANGE	: 
+	case EPERM	: return DAT_PROTECTION_VIOLATION;		  
+	case EINVAL	:
+        case EBADF	: 
+	case ENOENT	:
+	case ENOTSOCK	: 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 ETIME	:	    
+	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 ENOSPC	: 
+	case ENOMEM	:
+        case E2BIG	:
+        case EDQUOT	: 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/udapl/dapl_cno_create.c b/dapl/udapl/dapl_cno_create.c
new file mode 100644
index 0000000..8ddedc6
--- /dev/null
+++ b/dapl/udapl/dapl_cno_create.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_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 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..cf9d7ef
--- /dev/null
+++ b/dapl/udapl/dapl_cno_free.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_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 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..74992d3
--- /dev/null
+++ b/dapl/udapl/dapl_cno_modify_agent.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_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 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..8b94df5
--- /dev/null
+++ b/dapl/udapl/dapl_cno_query.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_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:$
+ **********************************************************************/
+
+#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 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->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..3026b01
--- /dev/null
+++ b/dapl/udapl/dapl_cno_wait.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_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 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..40614e8
--- /dev/null
+++ b/dapl/udapl/dapl_evd_clear_unwaitable.c
@@ -0,0 +1,82 @@
+/*
+ * 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
+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..f472b39
--- /dev/null
+++ b/dapl/udapl/dapl_evd_create.c
@@ -0,0 +1,194 @@
+/*
+ * 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 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);
+    DAPL_CNTR(DCNT_EVD_CREATE);
+
+    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;
+    }
+
+    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..64494cf
--- /dev/null
+++ b/dapl/udapl/dapl_evd_disable.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_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 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..b9ae03e
--- /dev/null
+++ b/dapl/udapl/dapl_evd_enable.c
@@ -0,0 +1,94 @@
+/*
+ * 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 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..03cef04
--- /dev/null
+++ b/dapl/udapl/dapl_evd_modify_cno.c
@@ -0,0 +1,117 @@
+/*
+ * 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 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..3aa3b24
--- /dev/null
+++ b/dapl/udapl/dapl_evd_query.c
@@ -0,0 +1,114 @@
+/*
+ * 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
+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..e11b9d8
--- /dev/null
+++ b/dapl/udapl/dapl_evd_set_unwaitable.c
@@ -0,0 +1,104 @@
+/*
+ * 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
+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..a03c5ea
--- /dev/null
+++ b/dapl/udapl/dapl_evd_wait.c
@@ -0,0 +1,284 @@
+/*
+ * 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 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);
+    DAPL_CNTR(DCNT_EVD_WAIT);
+
+    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_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);
+	dapl_os_unlock ( &evd_ptr->header.lock );
+	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);
+	dapl_os_unlock ( &evd_ptr->header.lock );
+	goto bail;
+    }
+    dapl_os_unlock ( &evd_ptr->header.lock );
+
+
+    /*
+     * 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
+	 */
+	dapls_evd_copy_cq(evd_ptr);
+
+	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(DCNT_EVD_WAIT_CMP_NTFY);
+	    /* 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(DCNT_EVD_WAIT_BLOCKED);
+
+#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 );
+	/*
+	 * 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_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..20b93cb
--- /dev/null
+++ b/dapl/udapl/dapl_init.c
@@ -0,0 +1,311 @@
+/*
+ * 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 <dat/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;
+
+    dapl_dbg_log (DAPL_DBG_TYPE_UTIL, "DAPL: Started (dapl_init)\n");
+
+    /* 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;
+    }
+
+    DAPL_COUNTERS_INIT();
+
+    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_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;
+
+    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 )
+    {
+	goto bail;
+    }
+    
+    provider->extension = hca_ptr;
+    
+    /* register providers with dat_registry */
+    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);
+	goto bail;
+    }
+
+ 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_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);
+}
+
+
+/*
+ * 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..b2492ea
--- /dev/null
+++ b/dapl/udapl/dapl_lmr_create.c
@@ -0,0 +1,531 @@
+/*
+ * 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,
+    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,
+    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,
+    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,
+    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);
+
+    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,
+    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, %p, %p, %p, %p)\n",
+		  ia,
+		  original_lmr, 
+		  pz, privileges, 
+		  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);
+
+    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,
+    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);
+    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
+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,
+	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;
+
+    switch (mem_type)
+    {
+	case DAT_MEM_TYPE_VIRTUAL:
+	{
+	    dat_status = dapli_lmr_create_virtual ( 
+		ia, region_description.for_va, length, pz, privileges, 
+		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, 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,
+                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/libdaplcma.map b/dapl/udapl/libdaplcma.map
new file mode 100644
index 0000000..f97dfac
--- /dev/null
+++ b/dapl/udapl/libdaplcma.map
@@ -0,0 +1,6 @@
+DAPL_CMA_1.2 {
+        global:
+		dat_provider_fini;
+		dat_provider_init;
+	local: *;
+};
diff --git a/dapl/udapl/libdaplscm.map b/dapl/udapl/libdaplscm.map
new file mode 100644
index 0000000..21342c7
--- /dev/null
+++ b/dapl/udapl/libdaplscm.map
@@ -0,0 +1,6 @@
+DAPL_SCM_1.2 {
+        global:
+		dat_provider_fini;
+		dat_provider_init;
+    	local: *;
+};
diff --git a/dapl/udapl/linux/dapl_osd.c b/dapl/udapl/linux/dapl_osd.c
new file mode 100644
index 0000000..b828b91
--- /dev/null
+++ b/dapl/udapl/linux/dapl_osd.c
@@ -0,0 +1,644 @@
+/*
+ * 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 )
+    {
+	dapl_log(DAPL_DBG_TYPE_ERR, 
+		 " uDAPL: pthread_attr_init: ERR=%s\n", 
+		 strerror(errno));
+	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 )
+    {
+	dapl_log(DAPL_DBG_TYPE_ERR, 
+		 " uDAPL: pthread_attr_setdetachstate: ERR=%s\n", 
+		 strerror(errno));
+	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 )
+    {
+	dapl_log(DAPL_DBG_TYPE_ERR, 
+		 " uDAPL: pthread_create: ERR=%s\n", 
+		 strerror(errno));
+	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..047fe90
--- /dev/null
+++ b/dapl/udapl/linux/dapl_osd.h
@@ -0,0 +1,567 @@
+/*
+ * 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 <dat/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 "dapl_debug.h"
+
+/*
+ * Include files for setting up a network name
+ */
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <ctype.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
+ */
+#define F64d   "%lld"
+#define F64u   "%llu"
+#define F64x   "%llx"
+#define F64X   "%llX"
+
+
+/*
+ *  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)
+
+#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 100644
index 0000000..87ad722
--- /dev/null
+++ b/dat/common/dat_api.c
@@ -0,0 +1,1151 @@
+/*
+ * 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_api.c
+ *
+ * PURPOSE: DAT Provider and Consumer registry functions.
+ *	    Also provide small integers for IA_HANDLES
+ *
+ * $Id: dat_api.c,v 1.10 2005/05/20 22:25:31 jlentini Exp $
+ **********************************************************************/
+
+#include "dat_osd.h"
+#include "dat_init.h"
+#include <dat/dat_registry.h>
+
+/*
+ * structure to deal with IA handles
+ */
+typedef struct 
+{
+    DAT_OS_LOCK     handle_lock;
+    int	            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;
+    int			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.
+ ***********************************************************************/
+unsigned long
+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 (unsigned long) 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 -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 (unsigned long) 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  unsigned long		handle,
+	OUT DAT_IA_HANDLE		*ia_handle_p )
+{
+    DAT_RETURN		dat_status;
+
+    if (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[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 = (unsigned long) 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  unsigned long		handle)
+{
+    DAT_RETURN		dat_status;
+
+    if (handle >= g_hv.handle_max)
+    {
+	dat_status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+	goto bail;
+    }
+    g_hv.handle_array[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_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((unsigned long)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_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((unsigned long)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_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((unsigned long)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_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((unsigned long)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_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_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_cr_reject (
+	IN      DAT_CR_HANDLE 		cr_handle)
+{
+    if (cr_handle == NULL)
+    {
+	return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_CR);
+    }
+    return DAT_CR_REJECT (cr_handle);
+}
+
+
+DAT_RETURN 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_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_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_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_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_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((unsigned long)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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_rmr_bind (
+	IN      DAT_RMR_HANDLE		rmr_handle,
+	IN      const DAT_LMR_TRIPLET	*lmr_triplet,
+	IN      DAT_MEM_PRIV_FLAGS	mem_priv,
+	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_triplet,
+			 mem_priv,
+			 ep_handle,
+			 user_cookie,
+			 completion_flags,
+			 context);
+}
+
+
+DAT_RETURN 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_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((unsigned long)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_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((unsigned long)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_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((unsigned long)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_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((unsigned long)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_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_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_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((unsigned long)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_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_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_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((unsigned long)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_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_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_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((unsigned long)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_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_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_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((unsigned long)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_srq_free(
+	IN      DAT_SRQ_HANDLE        srq_handle)
+{
+    return DAT_SRQ_FREE (srq_handle);
+}
+
+DAT_RETURN 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_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_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_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);
+}
+
+/*
+ * 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..32d2433
--- /dev/null
+++ b/dat/common/dat_dictionary.c
@@ -0,0 +1,472 @@
+/*
+ * 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..f40a94c
--- /dev/null
+++ b/dat/common/dat_dr.c
@@ -0,0 +1,381 @@
+/*
+ * 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 "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
+//***********************************************************************
+
+extern 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
+//***********************************************************************
+
+extern 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
+//***********************************************************************
+
+extern 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
+//***********************************************************************
+
+extern 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..752042e
--- /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 <dat/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..20b3746
--- /dev/null
+++ b/dat/common/dat_init.c
@@ -0,0 +1,161 @@
+/*
+ * 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 "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..9010afd
--- /dev/null
+++ b/dat/common/dat_init.h
@@ -0,0 +1,95 @@
+/*
+ * 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 ) ;
+
+void
+dat_init ( void ) __attribute__ ((constructor));
+
+void
+dat_fini ( void ) __attribute__ ((destructor));
+
+extern DAT_RETURN 
+dats_handle_vector_init ( void );
+
+extern unsigned long
+dats_set_ia_handle (
+	IN  DAT_IA_HANDLE		ia_handle);
+
+extern DAT_RETURN 
+dats_get_ia_handle(
+	IN	unsigned long		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	unsigned long		handle);
+
+#endif
diff --git a/dat/common/dat_sr.c b/dat/common/dat_sr.c
new file mode 100644
index 0000000..e3b2a54
--- /dev/null
+++ b/dat/common/dat_sr.c
@@ -0,0 +1,477 @@
+/*
+ * 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 )
+		{
+		    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);
+
+		    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..efdc898
--- /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 <dat/udat.h>
+#include <dat/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..5f88336
--- /dev/null
+++ b/dat/common/dat_strerror.c
@@ -0,0 +1,630 @@
+/*
+ * 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 <dat/kdat.h>
+#else /*__UDAPL__*/
+#include <dat/udat.h>
+#endif	/* __UDAPL__ */
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Declarations                                    *
+ *                                                                   *
+ *********************************************************************/
+
+DAT_RETURN
+dat_strerror_major (
+    IN  DAT_RETURN 		value,
+    OUT const char 		**message );
+
+DAT_RETURN
+dat_strerror_minor (
+    IN  DAT_RETURN 		value,
+    OUT const char 		**message );
+
+
+/*********************************************************************
+ *                                                                   *
+ * Internal Function Definitions                                     *
+ *                                                                   *
+ *********************************************************************/
+
+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;
+	}
+    }
+}
+
+
+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_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/dat/dat.h b/dat/include/dat/dat.h
new file mode 100644
index 0000000..152534f
--- /dev/null
+++ b/dat/include/dat/dat.h
@@ -0,0 +1,1244 @@
+/*
+ * 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.h
+ *
+ * PURPOSE: defines the common DAT API for uDAPL and kDAPL.
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 1.2"
+ *
+ * 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 <dat/dat_error.h>
+
+/* 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;
+
+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
+} 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;
+
+/* 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
+ */
+
+typedef enum dat_connect_flags
+{
+    DAT_CONNECT_DEFAULT_FLAG         = 0x00,
+    DAT_CONNECT_MULTIPATH_FLAG       = 0x01
+} 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
+} 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 struct dat_provider_attr  DAT_PROVIDER_ATTR;
+typedef struct dat_evd_param      DAT_EVD_PARAM;
+typedef struct dat_lmr_param      DAT_LMR_PARAM;
+
+/* 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_LMR_CONTEXT             lmr_context;
+    DAT_UINT32                  pad;
+    DAT_VADDR                   virtual_address;
+    DAT_VLEN                    segment_length;
+} DAT_LMR_TRIPLET;
+
+typedef struct dat_rmr_triplet
+{
+    DAT_RMR_CONTEXT             rmr_context;
+    DAT_UINT32                  pad;
+    DAT_VADDR                   target_address;
+    DAT_VLEN                    segment_length;
+} DAT_RMR_TRIPLET;
+
+/*
+ * The extra padding ensures that context, address, and length parameters are
+ * aligned on 64-bit boundaries.
+ */
+
+/* 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
+} 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 Arguments Mask */
+
+typedef 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_LMR_CONTEXT        = 0x040,
+    DAT_LMR_FIELD_RMR_CONTEXT        = 0x080,
+    DAT_LMR_FIELD_REGISTERED_SIZE    = 0x100,
+    DAT_LMR_FIELD_REGISTERED_ADDRESS = 0x200,
+
+    DAT_LMR_FIELD_ALL                = 0x3FF
+} DAT_LMR_PARAM_MASK;
+
+/* RMR Arguments & RMR Arguments Mask */
+
+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_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_ALL                = 0x1F
+} 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
+
+typedef 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_VLEN                    max_lmr_block_size;
+    DAT_VADDR                   max_lmr_virtual_address;
+    DAT_COUNT                   max_pzs;
+    DAT_VLEN                    max_message_size;
+    DAT_VLEN                    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_COUNT                   num_transport_attr;
+    DAT_NAMED_ATTR              *transport_attr;
+    DAT_COUNT                   num_vendor_attr;
+    DAT_NAMED_ATTR              *vendor_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_NUM_TRANSPORT_ATTR               UINT64_C(0x080000000)
+#define DAT_IA_FIELD_IA_TRANSPORT_ATTR                   UINT64_C(0x100000000)
+#define DAT_IA_FIELD_IA_NUM_VENDOR_ATTR                  UINT64_C(0x200000000)
+#define DAT_IA_FIELD_IA_VENDOR_ATTR                      UINT64_C(0x400000000)
+
+/* To support backwards compatibility for DAPL-1.0 & DAPL-1.1 */
+#define DAT_IA_ALL					 DAT_IA_FIELD_ALL
+#define DAT_IA_FIELD_ALL				 UINT64_C(0x07FFFFFFFF)
+#define DAT_IA_FIELD_NONE				 UINT64_C(0x0)
+
+/* Endpoint attributes */
+
+typedef enum dat_service_type
+{
+    DAT_SERVICE_TYPE_RC		  /* reliable connections */
+} DAT_SERVICE_TYPE;
+
+typedef struct dat_ep_attr
+{
+    DAT_SERVICE_TYPE            service_type;
+    DAT_VLEN                    max_message_size;
+    DAT_VLEN                    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;
+
+typedef struct dat_ep_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_EP_STATE                ep_state;
+    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_LOCAL_IA_ADDRESS_PTR                UINT64_C(0x00000004)
+#define DAT_EP_FIELD_LOCAL_PORT_QUAL                     UINT64_C(0x00000008)
+#define DAT_EP_FIELD_REMOTE_IA_ADDRESS_PTR               UINT64_C(0x00000010)
+#define DAT_EP_FIELD_REMOTE_PORT_QUAL                    UINT64_C(0x00000020)
+#define DAT_EP_FIELD_PZ_HANDLE                           UINT64_C(0x00000040)
+#define DAT_EP_FIELD_RECV_EVD_HANDLE                     UINT64_C(0x00000080)
+#define DAT_EP_FIELD_REQUEST_EVD_HANDLE                  UINT64_C(0x00000100)
+#define DAT_EP_FIELD_CONNECT_EVD_HANDLE                  UINT64_C(0x00000200)
+#define DAT_EP_FIELD_SRQ_HANDLE                          UINT64_C(0x00000400)
+    /* 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(0x7FFFF7FF)
+
+#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;
+
+/* 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 compatability */
+#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_COMPLETION_STATUS;
+
+    /* RMR completion status */
+
+    /* For backwards compatability */
+#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 */
+typedef struct dat_dto_completion_event_data
+{
+    DAT_EP_HANDLE               ep_handle;
+    DAT_DTO_COOKIE              user_cookie;
+    DAT_DTO_COMPLETION_STATUS   status;
+    DAT_VLEN                    transfered_length;
+} 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_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 is
+	 * DAT_HANDLE_NULL because the reserved Service Point is
+	 * automatically destroyed upon generating this event. Can be PSP
+	 * 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;
+} 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_SOFTWARE_EVENT                           = 0x10001
+} 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_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_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_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_ia_close (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+/* helper functions */
+
+extern DAT_RETURN dat_set_consumer_context (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	IN      DAT_CONTEXT);		/* context              */
+
+extern DAT_RETURN dat_get_consumer_context (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	OUT     DAT_CONTEXT * );	/* context              */
+
+extern DAT_RETURN dat_get_handle_type (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	OUT     DAT_HANDLE_TYPE * );	/* handle_type          */
+
+/* CR functions */
+
+extern DAT_RETURN 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_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_cr_reject (
+	IN      DAT_CR_HANDLE )		/* cr_handle            */;
+
+/* 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_cr_handoff (
+	IN      DAT_CR_HANDLE,		/* cr_handle            */
+	IN      DAT_CONN_QUAL);		/* handoff              */
+
+/* EVD functions */
+
+extern DAT_RETURN dat_evd_resize (
+	IN      DAT_EVD_HANDLE,	        /* evd_handle           */
+	IN      DAT_COUNT );	        /* evd_min_qlen         */
+
+extern DAT_RETURN dat_evd_post_se (
+	IN      DAT_EVD_HANDLE,	        /* evd_handle           */
+	IN      const DAT_EVENT * );    /* event                */
+
+extern DAT_RETURN dat_evd_dequeue (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	OUT     DAT_EVENT * );		/* event                */
+
+extern DAT_RETURN 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_evd_free (
+	IN      DAT_EVD_HANDLE );	/* evd_handle           */
+
+/* EP functions */
+
+extern DAT_RETURN 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_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_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_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_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_ep_disconnect (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+extern DAT_RETURN 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_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_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_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_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_ep_free (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+extern DAT_RETURN dat_ep_reset (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+extern DAT_RETURN 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_ep_recv_query (
+        IN      DAT_EP_HANDLE,          /* ep_handle            */
+        OUT     DAT_COUNT *,            /* nbufs_allocated      */
+        OUT     DAT_COUNT *);           /* bufs_alloc_span      */
+
+extern DAT_RETURN 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_lmr_query (
+	IN      DAT_LMR_HANDLE,		/* lmr_handle           */
+	IN      DAT_LMR_PARAM_MASK,	/* lmr_param_mask       */
+	OUT     DAT_LMR_PARAM *);	/* lmr_param            */
+
+extern DAT_RETURN dat_lmr_free (
+	IN      DAT_LMR_HANDLE);	/* lmr_handle           */
+
+/* Non-coherent memory functions */
+
+extern DAT_RETURN 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_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_rmr_create (
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	OUT     DAT_RMR_HANDLE *);	/* rmr_handle           */
+
+extern DAT_RETURN 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_rmr_bind (
+	IN      DAT_RMR_HANDLE,		/* rmr_handle           */
+	IN      const DAT_LMR_TRIPLET *,/* lmr_triplet          */
+	IN      DAT_MEM_PRIV_FLAGS,	/* mem_priv             */
+	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_rmr_free (
+	IN      DAT_RMR_HANDLE);	/* rmr_handle           */
+
+/* PSP functions */
+
+extern DAT_RETURN 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_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_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_psp_free (
+	IN      DAT_PSP_HANDLE );	/* psp_handle           */
+
+/* RSP functions */
+
+extern DAT_RETURN 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_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_rsp_free (
+	IN      DAT_RSP_HANDLE );	/* rsp_handle           */
+
+/* PZ functions */
+
+extern DAT_RETURN dat_pz_create (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_PZ_HANDLE * );	/* pz_handle            */
+
+extern DAT_RETURN 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_pz_free (
+	IN      DAT_PZ_HANDLE );	/* pz_handle            */
+
+/* SRQ functions */
+
+extern DAT_RETURN 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_srq_free (
+	IN      DAT_SRQ_HANDLE);        /* srq_handle           */
+
+extern DAT_RETURN 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_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_srq_resize (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* srq_max_recv_dto     */
+
+extern DAT_RETURN dat_srq_set_lw (
+	IN      DAT_SRQ_HANDLE,         /* srq_handle           */
+	IN      DAT_COUNT);             /* low_watermark        */
+
+/*
+ * 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_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_strerror (
+	IN      DAT_RETURN,		/* dat function return */
+	OUT     const char ** ,		/* major message string */
+	OUT     const char ** );	/* minor message string */
+
+#endif /* _DAT_H_ */
diff --git a/dat/include/dat/dat_error.h b/dat/include/dat/dat_error.h
new file mode 100644
index 0000000..fce83a5
--- /dev/null
+++ b/dat/include/dat/dat_error.h
@@ -0,0 +1,358 @@
+/*
+ * 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_error.h
+ *
+ * PURPOSE: DAT return codes
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 1.2"
+ *
+ * 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		                        = 0x000000,
+
+        /* 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,
+
+        /* Provider does not support the operation yet.               */
+    DAT_NOT_IMPLEMENTED                         = 0xFFFF0000
+} 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_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/dat/dat_platform_specific.h b/dat/include/dat/dat_platform_specific.h
new file mode 100644
index 0000000..8eaf8e9
--- /dev/null
+++ b/dat/include/dat/dat_platform_specific.h
@@ -0,0 +1,208 @@
+/*
+ * 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_platform_specific.h
+ *
+ * PURPOSE: defines Platform-specific types.
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 1.2"
+ *
+ * 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 <dat/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);
+ *
+ */
+
+#if defined (sun) || defined(__sun) || defined(_sun_) || defined (__solaris__)
+/* Solaris begins */
+
+#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;
+
+#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;
+
+/* 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 */
+
+#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 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
+/* Linux ends */
+
+
+/* Win32 begins */
+#elif defined(_MSC_VER) || defined(_WIN32) /* NT. MSC compiler, Win32 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 */
+
+typedef void *                  DAT_PVOID;
+typedef long                    DAT_COUNT;
+
+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 */
+
+#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(__KDAPL__)
+/* must have the DDK for this definition */
+typedef PHYSICAL_ADDRESS	DAT_PADDR;
+#endif /* __KDAPL__ */
+
+/* Win32 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/dat/dat_redirection.h b/dat/include/dat/dat_redirection.h
new file mode 100644
index 0000000..1b7f99a
--- /dev/null
+++ b/dat/include/dat/dat_redirection.h
@@ -0,0 +1,723 @@
+/*
+ * 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_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) \
+	(*DAT_HANDLE_TO_PROVIDER (cr)->cr_reject_func) (\
+		(cr))
+
+#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_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_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_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_QUERY(rmr, mask, param) \
+	(*DAT_HANDLE_TO_PROVIDER (rmr)->rmr_query_func) (\
+		(rmr),               \
+		(mask),              \
+		(param))
+
+#define DAT_RMR_BIND(rmr, lmr, mem_priv, ep, cookie, flags, context) \
+	(*DAT_HANDLE_TO_PROVIDER (rmr)->rmr_bind_func) (\
+		(rmr),               \
+		(lmr),               \
+		(mem_priv),          \
+		(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_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 (srq)->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))
+
+/***************************************************************
+ *
+ * FUNCTION PROTOTYPES
+ ****************************************************************/
+
+typedef DAT_RETURN (*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_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_IA_CLOSE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+typedef DAT_RETURN (*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_SET_CONSUMER_CONTEXT_FUNC) (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	IN      DAT_CONTEXT);		/* context              */
+
+typedef DAT_RETURN (*DAT_GET_CONSUMER_CONTEXT_FUNC) (
+	IN      DAT_HANDLE		/* dat_handle           */,
+	OUT     DAT_CONTEXT * );	/* context              */
+
+typedef DAT_RETURN (*DAT_GET_HANDLE_TYPE_FUNC) (
+	IN      DAT_HANDLE,		/* dat_handle           */
+	OUT     DAT_HANDLE_TYPE * );	/* dat_handle_type       */
+
+/* CR functions */
+
+typedef DAT_RETURN (*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_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_CR_REJECT_FUNC) (
+	IN      DAT_CR_HANDLE )		/* cr_handle            */;
+
+/* 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_CR_HANDOFF_FUNC) (
+    IN          DAT_CR_HANDLE,		/* cr_handle            */
+    IN          DAT_CONN_QUAL);		/* handoff              */
+
+/* EVD functions */
+
+typedef DAT_RETURN (*DAT_EVD_RESIZE_FUNC) (
+	IN      DAT_EVD_HANDLE,	       /* evd_handle           */
+	IN      DAT_COUNT );	       /* evd_min_qlen         */
+
+typedef DAT_RETURN (*DAT_EVD_POST_SE_FUNC) (
+	IN      DAT_EVD_HANDLE,	       /* evd_handle           */
+	IN      const DAT_EVENT * );   /* event                */
+
+typedef DAT_RETURN (*DAT_EVD_DEQUEUE_FUNC) (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	OUT     DAT_EVENT * );		/* event                */
+
+typedef DAT_RETURN (*DAT_EVD_FREE_FUNC) (
+	IN      DAT_EVD_HANDLE );	/* evd_handle           */
+
+typedef DAT_RETURN (*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_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_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_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_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_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_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_EP_DISCONNECT_FUNC) (
+	IN      DAT_EP_HANDLE,		/* ep_handle            */
+	IN      DAT_CLOSE_FLAGS );	/* close_flags          */
+
+typedef DAT_RETURN (*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_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_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_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_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_EP_FREE_FUNC) (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+typedef DAT_RETURN (*DAT_EP_RESET_FUNC) (
+	IN      DAT_EP_HANDLE);		/* ep_handle            */
+
+typedef DAT_RETURN (*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_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_LMR_FREE_FUNC) (
+	IN      DAT_LMR_HANDLE)		/* lmr_handle           */;
+
+typedef DAT_RETURN (*DAT_LMR_QUERY_FUNC) (
+	IN      DAT_LMR_HANDLE		/* lmr_handle           */,
+	IN      DAT_LMR_PARAM_MASK,	/* lmr_param_mask       */
+	OUT     DAT_LMR_PARAM *);	/* lmr_param            */
+
+typedef DAT_RETURN (*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_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_RMR_CREATE_FUNC) (
+	IN      DAT_PZ_HANDLE,		/* pz_handle            */
+	OUT     DAT_RMR_HANDLE *);	/* rmr_handle           */
+
+typedef DAT_RETURN (*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_RMR_BIND_FUNC) (
+	IN      DAT_RMR_HANDLE		/* rmr_handle           */,
+	IN      const DAT_LMR_TRIPLET *,/* lmr_triplet          */
+	IN      DAT_MEM_PRIV_FLAGS,	/* mem_priv             */
+	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_RMR_FREE_FUNC) (
+	IN      DAT_RMR_HANDLE)		/* rmr_handle           */;
+
+/* PSP functions */
+
+typedef DAT_RETURN (*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_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_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_PSP_FREE_FUNC) (
+	IN      DAT_PSP_HANDLE );	/* psp_handle           */
+
+/* RSP functions */
+
+typedef DAT_RETURN (*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_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_RSP_FREE_FUNC) (
+	IN      DAT_RSP_HANDLE );	/* rsp_handle           */
+
+/* PZ functions */
+
+typedef DAT_RETURN (*DAT_PZ_CREATE_FUNC) (
+	IN      DAT_IA_HANDLE,		/* ia_handle            */
+	OUT     DAT_PZ_HANDLE * );	/* pz_handle            */
+
+typedef DAT_RETURN (*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_PZ_FREE_FUNC) (
+	IN      DAT_PZ_HANDLE );	/* pz_handle            */
+
+/* SRQ functions */
+
+typedef DAT_RETURN (*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_SRQ_SET_LW_FUNC) (
+	IN      DAT_SRQ_HANDLE,		/* srq_handle           */
+	IN      DAT_COUNT );		/* srq_low_watermark    */
+
+typedef DAT_RETURN (*DAT_SRQ_FREE_FUNC) (
+	IN      DAT_SRQ_HANDLE);	/* srq_handle           */
+
+typedef DAT_RETURN (*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_SRQ_RESIZE_FUNC) (
+	IN      DAT_SRQ_HANDLE,		/* srq_handle           */
+	IN      DAT_COUNT );		/* srq_queue_length     */
+
+typedef DAT_RETURN (*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          */
+
+#endif /* _DAT_REDIRECTION_H_ */
diff --git a/dat/include/dat/dat_registry.h b/dat/include/dat/dat_registry.h
new file mode 100644
index 0000000..a056406
--- /dev/null
+++ b/dat/include/dat/dat_registry.h
@@ -0,0 +1,100 @@
+/*
+ * 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_registry.h
+ *
+ * PURPOSE: DAT registration API signatures
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 1.2"
+ *
+ * 		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_
+
+#if defined(_UDAT_H_)
+#include <dat/udat_redirection.h>
+#elif defined(_KDAT_H_)
+#include <dat/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_registry_add_provider (
+	IN  const DAT_PROVIDER *,               /* provider          */
+	IN  const DAT_PROVIDER_INFO* );         /* provider info     */
+
+extern DAT_RETURN 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_PROVIDER_INIT_FUNC) (
+	IN const DAT_PROVIDER_INFO *,           /* provider info     */
+	IN const char *);                       /* instance data     */
+
+typedef void ( *DAT_PROVIDER_FINI_FUNC) (
+	IN const DAT_PROVIDER_INFO *);          /* provider info     */
+
+#endif /* _DAT_REGISTRY_H_ */
diff --git a/dat/include/dat/dat_vendor_specific.h b/dat/include/dat/dat_vendor_specific.h
new file mode 100644
index 0000000..4957de3
--- /dev/null
+++ b/dat/include/dat/dat_vendor_specific.h
@@ -0,0 +1,73 @@
+/*
+ * 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_vendor_specific.h
+ *
+ * PURPOSE:
+ *
+ * Description: Header file for "DAPL: Direct Access Programming
+ *		Library, Version: 1.2"
+ *
+ * Mapping rules:
+ *
+ ***************************************************************/
+
+#ifndef _DAT_VENDOR_SPECIFIC_H_
+#define _DAT_VENDOR_SPECIFIC_H_
+
+
+
+/* Vendor-specific extensions */
+
+#if defined(_AMMASSO)
+
+#elif defined(_IBM)
+
+#elif defined(_INFINICON)
+
+#elif defined(_INTEL)
+
+#elif defined(_JNI)
+
+#elif defined(_MELLANOX)
+
+#elif defined(_MYRINET)
+
+#elif defined(_SILIQUENT)
+
+#elif defined(_TOPSPIN)
+
+#elif defined(_VOLTAIRE)
+
+#endif
+
+#endif /* _DAT_VENDOR_SPECIFIC_H_ */
diff --git a/dat/include/dat/udat.h b/dat/include/dat/udat.h
new file mode 100644
index 0000000..be2e5d5
--- /dev/null
+++ b/dat/include/dat/udat.h
@@ -0,0 +1,380 @@
+/*
+ * 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: udat.h
+ *
+ * PURPOSE: defines the user DAT API
+ *
+ * Description: Header file for "uDAPL: User Direct Access Programming
+ * Library, Version: 1.2"
+ *
+ * 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 <dat/udat_config.h>
+
+#include <dat/dat_platform_specific.h>
+
+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;
+
+/* 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;
+
+#include <dat/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_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_LMR_CONTEXT             lmr_context;
+    DAT_RMR_CONTEXT             rmr_context;
+    DAT_VLEN                    registered_size;
+    DAT_VADDR                   registered_address;
+};
+
+
+typedef struct dat_cno_param
+{
+    DAT_IA_HANDLE               ia_handle;
+    DAT_OS_WAIT_PROXY_AGENT     agent;
+} DAT_CNO_PARAM;
+
+typedef enum dat_cno_param_mask
+{
+    DAT_CNO_FIELD_IA_HANDLE          = 0x1,
+    DAT_CNO_FIELD_AGENT              = 0x2,
+    DAT_CNO_FIELD_ALL                = 0x3
+} DAT_CNO_PARAM_MASK;
+
+
+/* General Provider attributes. udat specific. */
+
+typedef enum dat_pz_support
+{
+    DAT_PZ_UNIQUE,
+    DAT_PZ_SHAREABLE
+} DAT_PZ_SUPPORT;
+
+
+#include <dat/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_COUNT                   num_provider_specific_attr;
+    DAT_NAMED_ATTR *            provider_specific_attr;
+};
+
+#define DAT_PROVIDER_FIELD_PROVIDER_NAME                 UINT64_C(0x0000001)
+#define DAT_PROVIDER_FIELD_PROVIDER_VERSION_MAJOR        UINT64_C(0x0000002)
+#define DAT_PROVIDER_FIELD_PROVIDER_VERSION_MINOR        UINT64_C(0x0000004)
+#define DAT_PROVIDER_FIELD_DAPL_VERSION_MAJOR            UINT64_C(0x0000008)
+#define DAT_PROVIDER_FIELD_DAPL_VERSION_MINOR            UINT64_C(0x0000010)
+#define DAT_PROVIDER_FIELD_LMR_MEM_TYPE_SUPPORTED        UINT64_C(0x0000020)
+#define DAT_PROVIDER_FIELD_IOV_OWNERSHIP                 UINT64_C(0x0000040)
+#define DAT_PROVIDER_FIELD_DAT_QOS_SUPPORTED             UINT64_C(0x0000080)
+#define DAT_PROVIDER_FIELD_COMPLETION_FLAGS_SUPPORTED    UINT64_C(0x0000100)
+#define DAT_PROVIDER_FIELD_IS_THREAD_SAFE                UINT64_C(0x0000200)
+#define DAT_PROVIDER_FIELD_MAX_PRIVATE_DATA_SIZE         UINT64_C(0x0000400)
+#define DAT_PROVIDER_FIELD_SUPPORTS_MULTIPATH            UINT64_C(0x0000800)
+#define DAT_PROVIDER_FIELD_EP_CREATOR                    UINT64_C(0x0001000)
+#define DAT_PROVIDER_FIELD_PZ_SUPPORT                    UINT64_C(0x0002000)
+#define DAT_PROVIDER_FIELD_OPTIMAL_BUFFER_ALIGNMENT      UINT64_C(0x0004000)
+#define DAT_PROVIDER_FIELD_EVD_STREAM_MERGING_SUPPORTED  UINT64_C(0x0008000)
+#define DAT_PROVIDER_FIELD_SRQ_SUPPORTED                 UINT64_C(0x0010000)
+#define DAT_PROVIDER_FIELD_SRQ_WATERMARKS_SUPPORTED      UINT64_C(0x0020000)
+#define DAT_PROVIDER_FIELD_SRQ_EP_PZ_DIFFERENCE_SUPPORTED UINT64_C(0x0040000)
+#define DAT_PROVIDER_FIELD_SRQ_INFO_SUPPORTED            UINT64_C(0x0080000)
+#define DAT_PROVIDER_FIELD_EP_RECV_INFO_SUPPORTED        UINT64_C(0x0100000)
+#define DAT_PROVIDER_FIELD_LMR_SYNC_REQ                  UINT64_C(0x0200000)
+#define DAT_PROVIDER_FIELD_DTO_ASYNC_RETURN_GUARANTEED   UINT64_C(0x0400000)
+#define DAT_PROVIDER_FIELD_RDMA_WRITE_FOR_RDMA_READ_REQ  UINT64_C(0x0800000)
+#define DAT_PROVIDER_FIELD_NUM_PROVIDER_SPECIFIC_ATTR    UINT64_C(0x1000000)
+#define DAT_PROVIDER_FIELD_PROVIDER_SPECIFIC_ATTR        UINT64_C(0x2000000)
+
+#define DAT_PROVIDER_FIELD_ALL                           UINT64_C(0x3FFFFFF)
+#define DAT_PROVIDER_FIELD_NONE				 UINT64_C(0x0)
+
+/**************************************************************/
+
+/*
+ * User DAT function call definitions,
+ */
+
+
+extern DAT_RETURN 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           */
+	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   */
+
+/* Event Functions */
+
+extern DAT_RETURN 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_evd_modify_cno (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_CNO_HANDLE);	/* cno_handle           */
+
+extern DAT_RETURN 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_cno_modify_agent (
+	IN 	DAT_CNO_HANDLE,		 /* cno_handle           */
+	IN 	DAT_OS_WAIT_PROXY_AGENT);/* agent                */
+
+extern DAT_RETURN 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_cno_free (
+	IN DAT_CNO_HANDLE);		/* cno_handle            */
+
+extern DAT_RETURN dat_cno_wait (
+	IN  	DAT_CNO_HANDLE,		/* cno_handle            */
+	IN  	DAT_TIMEOUT,		/* timeout               */
+	OUT 	DAT_EVD_HANDLE *);	/* evd_handle            */
+
+extern DAT_RETURN dat_evd_enable (
+	IN      DAT_EVD_HANDLE);	/* evd_handle            */
+
+extern DAT_RETURN 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_evd_disable (
+	IN      DAT_EVD_HANDLE);	/* evd_handle            */
+
+extern DAT_RETURN dat_evd_set_unwaitable (
+	IN DAT_EVD_HANDLE);		/* evd_handle            */
+
+extern DAT_RETURN dat_evd_clear_unwaitable (
+	IN DAT_EVD_HANDLE);		/* evd_handle            */
+
+#endif /* _UDAT_H_ */
diff --git a/dat/include/dat/udat_config.h b/dat/include/dat/udat_config.h
new file mode 100644
index 0000000..f429f15
--- /dev/null
+++ b/dat/include/dat/udat_config.h
@@ -0,0 +1,73 @@
+/*
+ * 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: udat_config.h
+ *
+ * PURPOSE: provides uDAPL configuration information.
+ *
+ * Description: Header file for "uDAPL: User Direct Access Programming
+ *              Library, Version: 1.2"
+ *
+ ***************************************************************/
+#ifndef _UDAT_CONFIG_H_
+#define _UDAT_CONFIG_H_
+
+#define DAT_VERSION_MAJOR 1
+#define DAT_VERSION_MINOR 2
+
+/*
+ * 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 */
+
+#endif /* _UDAT_CONFIG_H_ */
diff --git a/dat/include/dat/udat_redirection.h b/dat/include/dat/udat_redirection.h
new file mode 100644
index 0000000..37724ca
--- /dev/null
+++ b/dat/include/dat/udat_redirection.h
@@ -0,0 +1,299 @@
+/*
+ * 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: 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, \
+                       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),             \
+                (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_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_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           */
+	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   */
+
+/* Event functions */
+
+typedef DAT_RETURN (*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_EVD_MODIFY_CNO_FUNC) (
+	IN      DAT_EVD_HANDLE,		/* evd_handle           */
+	IN      DAT_CNO_HANDLE);	/* cno_handle           */
+
+typedef DAT_RETURN (*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_CNO_MODIFY_AGENT_FUNC) (
+	IN 	DAT_CNO_HANDLE,		 /* cno_handle          */
+	IN 	DAT_OS_WAIT_PROXY_AGENT);/* agent               */
+
+typedef DAT_RETURN (*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_CNO_FREE_FUNC) (
+	IN DAT_CNO_HANDLE);		/* cno_handle           */
+
+typedef DAT_RETURN (*DAT_CNO_WAIT_FUNC) (
+	IN  	DAT_CNO_HANDLE,		/* cno_handle           */
+	IN  	DAT_TIMEOUT,		/* timeout              */
+	OUT 	DAT_EVD_HANDLE *);	/* evd_handle           */
+
+typedef DAT_RETURN (*DAT_EVD_ENABLE_FUNC) (
+	IN      DAT_EVD_HANDLE);	/* evd_handle           */
+
+typedef DAT_RETURN (*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_EVD_DISABLE_FUNC) (
+	IN      DAT_EVD_HANDLE);	/* evd_handle           */
+
+typedef DAT_RETURN (*DAT_EVD_SET_UNWAITABLE_FUNC) (
+	IN      DAT_EVD_HANDLE);        /* evd_handle           */
+
+typedef DAT_RETURN (*DAT_EVD_CLEAR_UNWAITABLE_FUNC) (
+	IN DAT_EVD_HANDLE);		/* evd_handle           */
+
+
+#include <dat/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;
+};
+
+#endif /* _UDAT_REDIRECTION_H_ */
diff --git a/dat/include/dat/udat_vendor_specific.h b/dat/include/dat/udat_vendor_specific.h
new file mode 100644
index 0000000..f03e9f0
--- /dev/null
+++ b/dat/include/dat/udat_vendor_specific.h
@@ -0,0 +1,70 @@
+/*
+ * 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: udat_vendor_specific.h
+ *
+ * PURPOSE: Vendor defined macros & support.
+ *
+ * Description: Header file for "uDAPL: User Direct Access Programming
+ *		Library, Version: 1.2"
+ *
+ ***************************************************************/
+#ifndef _UDAT_VENDOR_SPECIFIC_H_
+#define _UDAT_VENDOR_SPECIFIC_H_
+
+#include <dat/dat_vendor_specific.h>
+
+/* Vendor-specific extensions */
+
+#if defined(_AMMASSO)
+
+#elif defined(_IBM)
+
+#elif defined(_INFINICON)
+
+#elif defined(_INTEL)
+
+#elif defined(_JNI)
+
+#elif defined(_MELLANOX)
+
+#elif defined(_MYRINET)
+
+#elif defined(_SILIQUENT)
+
+#elif defined(_TOPSPIN)
+
+#elif defined(_VOLTAIRE)
+
+#endif
+
+#endif /* _UDAT_VENDOR_SPECIFIC_H_ */
diff --git a/dat/udat/libdat.map b/dat/udat/libdat.map
new file mode 100644
index 0000000..89caca3
--- /dev/null
+++ b/dat/udat/libdat.map
@@ -0,0 +1,77 @@
+DAT_1.2 {
+        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;
+	local: *;
+};
diff --git a/dat/udat/linux/dat_osd.c b/dat/udat/linux/dat_osd.c
new file mode 100644
index 0000000..a8d0359
--- /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..c2ecc16
--- /dev/null
+++ b/dat/udat/linux/dat_osd.h
@@ -0,0 +1,404 @@
+/*
+ * 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 <dat/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))
+
+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_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 100644
index 0000000..cac1b93
--- /dev/null
+++ b/dat/udat/udat.c
@@ -0,0 +1,448 @@
+/*
+ * 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 <dat/udat.h>
+#include <dat/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                                     *
+ *                                                                   *
+ *********************************************************************/
+
+
+/*
+ *
+ * Provider API
+ *
+ */
+
+
+/***********************************************************************
+ * Function: dat_registry_add_provider
+ ***********************************************************************/
+
+DAT_RETURN
+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: dat_registry_add_provider (%s,%x:%x,%x)\n",
+		      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_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_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;
+    unsigned long		return_handle;
+
+    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)
+    {
+	return_handle = dats_set_ia_handle (*ia_handle);
+	if (return_handle >= 0)
+	{
+	    *ia_handle = (DAT_IA_HANDLE)return_handle;
+	}
+    }
+
+    return dat_status;
+}
+
+
+/************************************************************************
+ * Function: dat_ia_close
+ ***********************************************************************/
+
+DAT_RETURN
+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((unsigned long)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((unsigned long)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_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..fa07671
--- /dev/null
+++ b/dat/udat/udat_api.c
@@ -0,0 +1,290 @@
+/*
+ * 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_api.c,v 1.6 2005/03/24 05:58:35 jlentini Exp $
+ **********************************************************************/
+
+#include "dat_osd.h"
+#include <dat/dat_registry.h>
+#include "dat_init.h"
+
+#define UDAT_IS_BAD_HANDLE(h) ( NULL == (p) )
+
+DAT_RETURN 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,
+	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((unsigned long)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,
+				     lmr_handle,
+				     lmr_context,
+				     rmr_context,
+				     registered_length,
+				     registered_address);
+    }
+
+    return dat_status;
+}
+
+
+DAT_RETURN 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((unsigned long)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_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_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((unsigned long)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_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_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_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_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_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_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_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_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_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_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_lmr_query (
+	IN      DAT_LMR_HANDLE		lmr_handle,
+	IN      DAT_LMR_PARAM_MASK	lmv_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,
+			  lmv_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..f8f8a3b
--- /dev/null
+++ b/dat/udat/udat_sr_parser.c
@@ -0,0 +1,1463 @@
+/*
+ * 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 "udat_sr_parser.h"
+#include "dat_sr.h"
+
+
+/*********************************************************************
+ *                                                                   *
+ * Constants                                                         *
+ *                                                                   *
+ *********************************************************************/
+
+#define DAT_SR_CONF_ENV 		"DAT_OVERRIDE"
+#define DAT_SR_CONF_DEFAULT 		"/etc/dat.conf"
+
+#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] = 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_fputc (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/dapltest1.1 b/man/dapltest1.1
new file mode 100644
index 0000000..c1c4682
--- /dev/null
+++ b/man/dapltest1.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/dtest1.1 b/man/dtest1.1
new file mode 100755
index 0000000..1e227e5
--- /dev/null
+++ b/man/dtest1.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..4effd8e
--- /dev/null
+++ b/test/dapltest/Makefile.am
@@ -0,0 +1,57 @@
+INCLUDES =  -I include \
+	    -I mdep/linux \
+	    -I $(srcdir)/../../dat/include
+         
+bin_PROGRAMS = dapltest1
+dapltest1_CFLAGS = -g -Wall -D_GNU_SOURCE
+dapltest1_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
+	
+dapltest1_LDADD = $(top_builddir)/dat/udat/libdat.la
+dapltest1_LDFLAGS = -lpthread  
diff --git a/test/dapltest/Makefile.in b/test/dapltest/Makefile.in
new file mode 100644
index 0000000..85d3991
--- /dev/null
+++ b/test/dapltest/Makefile.in
@@ -0,0 +1,1257 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = dapltest1$(EXEEXT)
+subdir = test/dapltest
+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 =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_dapltest1_OBJECTS = dapltest1-dapl_main.$(OBJEXT) \
+	dapltest1-dapl_params.$(OBJEXT) \
+	dapltest1-dapl_fft_cmd.$(OBJEXT) \
+	dapltest1-dapl_getopt.$(OBJEXT) \
+	dapltest1-dapl_limit_cmd.$(OBJEXT) \
+	dapltest1-dapl_netaddr.$(OBJEXT) \
+	dapltest1-dapl_performance_cmd.$(OBJEXT) \
+	dapltest1-dapl_qos_util.$(OBJEXT) \
+	dapltest1-dapl_quit_cmd.$(OBJEXT) \
+	dapltest1-dapl_server_cmd.$(OBJEXT) \
+	dapltest1-dapl_transaction_cmd.$(OBJEXT) \
+	dapltest1-dapl_bpool.$(OBJEXT) dapltest1-dapl_client.$(OBJEXT) \
+	dapltest1-dapl_client_info.$(OBJEXT) \
+	dapltest1-dapl_cnxn.$(OBJEXT) dapltest1-dapl_execute.$(OBJEXT) \
+	dapltest1-dapl_fft_connmgt.$(OBJEXT) \
+	dapltest1-dapl_fft_endpoint.$(OBJEXT) \
+	dapltest1-dapl_fft_hwconn.$(OBJEXT) \
+	dapltest1-dapl_fft_mem.$(OBJEXT) \
+	dapltest1-dapl_fft_pz.$(OBJEXT) \
+	dapltest1-dapl_fft_queryinfo.$(OBJEXT) \
+	dapltest1-dapl_fft_test.$(OBJEXT) \
+	dapltest1-dapl_fft_util.$(OBJEXT) \
+	dapltest1-dapl_limit.$(OBJEXT) \
+	dapltest1-dapl_memlist.$(OBJEXT) \
+	dapltest1-dapl_performance_client.$(OBJEXT) \
+	dapltest1-dapl_performance_server.$(OBJEXT) \
+	dapltest1-dapl_performance_stats.$(OBJEXT) \
+	dapltest1-dapl_performance_util.$(OBJEXT) \
+	dapltest1-dapl_quit_util.$(OBJEXT) \
+	dapltest1-dapl_server.$(OBJEXT) \
+	dapltest1-dapl_server_info.$(OBJEXT) \
+	dapltest1-dapl_test_data.$(OBJEXT) \
+	dapltest1-dapl_test_util.$(OBJEXT) \
+	dapltest1-dapl_thread.$(OBJEXT) \
+	dapltest1-dapl_transaction_stats.$(OBJEXT) \
+	dapltest1-dapl_transaction_test.$(OBJEXT) \
+	dapltest1-dapl_transaction_util.$(OBJEXT) \
+	dapltest1-dapl_util.$(OBJEXT) dapltest1-dapl_endian.$(OBJEXT) \
+	dapltest1-dapl_global.$(OBJEXT) \
+	dapltest1-dapl_performance_cmd_util.$(OBJEXT) \
+	dapltest1-dapl_quit_cmd_util.$(OBJEXT) \
+	dapltest1-dapl_transaction_cmd_util.$(OBJEXT) \
+	dapltest1-udapl_tdep.$(OBJEXT) \
+	dapltest1-dapl_mdep_user.$(OBJEXT)
+dapltest1_OBJECTS = $(am_dapltest1_OBJECTS)
+dapltest1_DEPENDENCIES = $(top_builddir)/dat/udat/libdat.la
+DEFAULT_INCLUDES = -I. -I$(srcdir) -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 --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(dapltest1_SOURCES)
+DIST_SOURCES = $(dapltest1_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_FALSE = @DEBUG_FALSE@
+DEBUG_TRUE = @DEBUG_TRUE@
+DEFINE_ATTR_LINK_LAYER_FALSE = @DEFINE_ATTR_LINK_LAYER_FALSE@
+DEFINE_ATTR_LINK_LAYER_TRUE = @DEFINE_ATTR_LINK_LAYER_TRUE@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HAVE_LD_VERSION_SCRIPT_FALSE = @HAVE_LD_VERSION_SCRIPT_FALSE@
+HAVE_LD_VERSION_SCRIPT_TRUE = @HAVE_LD_VERSION_SCRIPT_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OS_RHEL4_FALSE = @OS_RHEL4_FALSE@
+OS_RHEL4_TRUE = @OS_RHEL4_TRUE@
+OS_RHEL5_FALSE = @OS_RHEL5_FALSE@
+OS_RHEL5_TRUE = @OS_RHEL5_TRUE@
+OS_SUSE11_FALSE = @OS_SUSE11_FALSE@
+OS_SUSE11_TRUE = @OS_SUSE11_TRUE@
+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@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+INCLUDES = -I include \
+	    -I mdep/linux \
+	    -I $(srcdir)/../../dat/include
+
+dapltest1_CFLAGS = -g -Wall -D_GNU_SOURCE
+dapltest1_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
+
+dapltest1_LDADD = $(top_builddir)/dat/udat/libdat.la
+dapltest1_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 \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  test/dapltest/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  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) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+dapltest1$(EXEEXT): $(dapltest1_OBJECTS) $(dapltest1_DEPENDENCIES) 
+	@rm -f dapltest1$(EXEEXT)
+	$(LINK) $(dapltest1_LDFLAGS) $(dapltest1_OBJECTS) $(dapltest1_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_bpool.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_client.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_client_info.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_cnxn.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_endian.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_execute.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_connmgt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_endpoint.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_hwconn.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_mem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_pz.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_fft_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_getopt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_global.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_limit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_limit_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_mdep_user.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_memlist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_netaddr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_params.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_performance_client.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_performance_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_performance_server.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_performance_stats.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_performance_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_qos_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_quit_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_quit_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_server.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_server_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_server_info.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_test_data.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_test_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_thread.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_transaction_cmd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_transaction_stats.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_transaction_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_transaction_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-dapl_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dapltest1-udapl_tdep.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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 $@ $<
+
+dapltest1-dapl_main.o: cmd/dapl_main.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_main.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_main.Tpo" -c -o dapltest1-dapl_main.o `test -f 'cmd/dapl_main.c' || echo '$(srcdir)/'`cmd/dapl_main.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_main.Tpo" "$(DEPDIR)/dapltest1-dapl_main.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_main.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_main.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_main.o `test -f 'cmd/dapl_main.c' || echo '$(srcdir)/'`cmd/dapl_main.c
+
+dapltest1-dapl_main.obj: cmd/dapl_main.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_main.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_main.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_main.Tpo" "$(DEPDIR)/dapltest1-dapl_main.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_main.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_main.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_params.o: cmd/dapl_params.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_params.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_params.Tpo" -c -o dapltest1-dapl_params.o `test -f 'cmd/dapl_params.c' || echo '$(srcdir)/'`cmd/dapl_params.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_params.Tpo" "$(DEPDIR)/dapltest1-dapl_params.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_params.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_params.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_params.o `test -f 'cmd/dapl_params.c' || echo '$(srcdir)/'`cmd/dapl_params.c
+
+dapltest1-dapl_params.obj: cmd/dapl_params.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_params.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_params.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_params.Tpo" "$(DEPDIR)/dapltest1-dapl_params.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_params.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_params.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_cmd.o: cmd/dapl_fft_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_cmd.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_cmd.Tpo" -c -o dapltest1-dapl_fft_cmd.o `test -f 'cmd/dapl_fft_cmd.c' || echo '$(srcdir)/'`cmd/dapl_fft_cmd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_fft_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_cmd.o `test -f 'cmd/dapl_fft_cmd.c' || echo '$(srcdir)/'`cmd/dapl_fft_cmd.c
+
+dapltest1-dapl_fft_cmd.obj: cmd/dapl_fft_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_cmd.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_cmd.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_fft_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_getopt.o: cmd/dapl_getopt.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_getopt.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_getopt.Tpo" -c -o dapltest1-dapl_getopt.o `test -f 'cmd/dapl_getopt.c' || echo '$(srcdir)/'`cmd/dapl_getopt.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_getopt.Tpo" "$(DEPDIR)/dapltest1-dapl_getopt.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_getopt.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_getopt.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_getopt.o `test -f 'cmd/dapl_getopt.c' || echo '$(srcdir)/'`cmd/dapl_getopt.c
+
+dapltest1-dapl_getopt.obj: cmd/dapl_getopt.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_getopt.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_getopt.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_getopt.Tpo" "$(DEPDIR)/dapltest1-dapl_getopt.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_getopt.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_getopt.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_limit_cmd.o: cmd/dapl_limit_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_limit_cmd.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_limit_cmd.Tpo" -c -o dapltest1-dapl_limit_cmd.o `test -f 'cmd/dapl_limit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_limit_cmd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_limit_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_limit_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_limit_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_limit_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_limit_cmd.o `test -f 'cmd/dapl_limit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_limit_cmd.c
+
+dapltest1-dapl_limit_cmd.obj: cmd/dapl_limit_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_limit_cmd.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_limit_cmd.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_limit_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_limit_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_limit_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_limit_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_netaddr.o: cmd/dapl_netaddr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_netaddr.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_netaddr.Tpo" -c -o dapltest1-dapl_netaddr.o `test -f 'cmd/dapl_netaddr.c' || echo '$(srcdir)/'`cmd/dapl_netaddr.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_netaddr.Tpo" "$(DEPDIR)/dapltest1-dapl_netaddr.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_netaddr.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_netaddr.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_netaddr.o `test -f 'cmd/dapl_netaddr.c' || echo '$(srcdir)/'`cmd/dapl_netaddr.c
+
+dapltest1-dapl_netaddr.obj: cmd/dapl_netaddr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_netaddr.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_netaddr.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_netaddr.Tpo" "$(DEPDIR)/dapltest1-dapl_netaddr.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_netaddr.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_netaddr.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_performance_cmd.o: cmd/dapl_performance_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_cmd.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_cmd.Tpo" -c -o dapltest1-dapl_performance_cmd.o `test -f 'cmd/dapl_performance_cmd.c' || echo '$(srcdir)/'`cmd/dapl_performance_cmd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_performance_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_performance_cmd.o `test -f 'cmd/dapl_performance_cmd.c' || echo '$(srcdir)/'`cmd/dapl_performance_cmd.c
+
+dapltest1-dapl_performance_cmd.obj: cmd/dapl_performance_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_cmd.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_cmd.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_performance_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_qos_util.o: cmd/dapl_qos_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_qos_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_qos_util.Tpo" -c -o dapltest1-dapl_qos_util.o `test -f 'cmd/dapl_qos_util.c' || echo '$(srcdir)/'`cmd/dapl_qos_util.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_qos_util.Tpo" "$(DEPDIR)/dapltest1-dapl_qos_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_qos_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_qos_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_qos_util.o `test -f 'cmd/dapl_qos_util.c' || echo '$(srcdir)/'`cmd/dapl_qos_util.c
+
+dapltest1-dapl_qos_util.obj: cmd/dapl_qos_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_qos_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_qos_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_qos_util.Tpo" "$(DEPDIR)/dapltest1-dapl_qos_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_qos_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_qos_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_quit_cmd.o: cmd/dapl_quit_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_quit_cmd.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_quit_cmd.Tpo" -c -o dapltest1-dapl_quit_cmd.o `test -f 'cmd/dapl_quit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_quit_cmd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_quit_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_quit_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_quit_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_quit_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_quit_cmd.o `test -f 'cmd/dapl_quit_cmd.c' || echo '$(srcdir)/'`cmd/dapl_quit_cmd.c
+
+dapltest1-dapl_quit_cmd.obj: cmd/dapl_quit_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_quit_cmd.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_quit_cmd.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_quit_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_quit_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_quit_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_quit_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_server_cmd.o: cmd/dapl_server_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_server_cmd.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_server_cmd.Tpo" -c -o dapltest1-dapl_server_cmd.o `test -f 'cmd/dapl_server_cmd.c' || echo '$(srcdir)/'`cmd/dapl_server_cmd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_server_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_server_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_server_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_server_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_server_cmd.o `test -f 'cmd/dapl_server_cmd.c' || echo '$(srcdir)/'`cmd/dapl_server_cmd.c
+
+dapltest1-dapl_server_cmd.obj: cmd/dapl_server_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_server_cmd.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_server_cmd.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_server_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_server_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_server_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_server_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_transaction_cmd.o: cmd/dapl_transaction_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_cmd.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Tpo" -c -o dapltest1-dapl_transaction_cmd.o `test -f 'cmd/dapl_transaction_cmd.c' || echo '$(srcdir)/'`cmd/dapl_transaction_cmd.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_transaction_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_transaction_cmd.o `test -f 'cmd/dapl_transaction_cmd.c' || echo '$(srcdir)/'`cmd/dapl_transaction_cmd.c
+
+dapltest1-dapl_transaction_cmd.obj: cmd/dapl_transaction_cmd.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_cmd.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cmd/dapl_transaction_cmd.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_bpool.o: test/dapl_bpool.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_bpool.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_bpool.Tpo" -c -o dapltest1-dapl_bpool.o `test -f 'test/dapl_bpool.c' || echo '$(srcdir)/'`test/dapl_bpool.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_bpool.Tpo" "$(DEPDIR)/dapltest1-dapl_bpool.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_bpool.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_bpool.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_bpool.o `test -f 'test/dapl_bpool.c' || echo '$(srcdir)/'`test/dapl_bpool.c
+
+dapltest1-dapl_bpool.obj: test/dapl_bpool.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_bpool.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_bpool.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_bpool.Tpo" "$(DEPDIR)/dapltest1-dapl_bpool.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_bpool.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_bpool.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_client.o: test/dapl_client.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_client.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_client.Tpo" -c -o dapltest1-dapl_client.o `test -f 'test/dapl_client.c' || echo '$(srcdir)/'`test/dapl_client.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_client.Tpo" "$(DEPDIR)/dapltest1-dapl_client.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_client.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_client.o `test -f 'test/dapl_client.c' || echo '$(srcdir)/'`test/dapl_client.c
+
+dapltest1-dapl_client.obj: test/dapl_client.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_client.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_client.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_client.Tpo" "$(DEPDIR)/dapltest1-dapl_client.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_client.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_client_info.o: test/dapl_client_info.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_client_info.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_client_info.Tpo" -c -o dapltest1-dapl_client_info.o `test -f 'test/dapl_client_info.c' || echo '$(srcdir)/'`test/dapl_client_info.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_client_info.Tpo" "$(DEPDIR)/dapltest1-dapl_client_info.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_client_info.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client_info.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_client_info.o `test -f 'test/dapl_client_info.c' || echo '$(srcdir)/'`test/dapl_client_info.c
+
+dapltest1-dapl_client_info.obj: test/dapl_client_info.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_client_info.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_client_info.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_client_info.Tpo" "$(DEPDIR)/dapltest1-dapl_client_info.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_client_info.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_client_info.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_cnxn.o: test/dapl_cnxn.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_cnxn.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_cnxn.Tpo" -c -o dapltest1-dapl_cnxn.o `test -f 'test/dapl_cnxn.c' || echo '$(srcdir)/'`test/dapl_cnxn.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_cnxn.Tpo" "$(DEPDIR)/dapltest1-dapl_cnxn.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_cnxn.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_cnxn.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_cnxn.o `test -f 'test/dapl_cnxn.c' || echo '$(srcdir)/'`test/dapl_cnxn.c
+
+dapltest1-dapl_cnxn.obj: test/dapl_cnxn.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_cnxn.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_cnxn.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_cnxn.Tpo" "$(DEPDIR)/dapltest1-dapl_cnxn.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_cnxn.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_cnxn.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_execute.o: test/dapl_execute.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_execute.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_execute.Tpo" -c -o dapltest1-dapl_execute.o `test -f 'test/dapl_execute.c' || echo '$(srcdir)/'`test/dapl_execute.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_execute.Tpo" "$(DEPDIR)/dapltest1-dapl_execute.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_execute.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_execute.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_execute.o `test -f 'test/dapl_execute.c' || echo '$(srcdir)/'`test/dapl_execute.c
+
+dapltest1-dapl_execute.obj: test/dapl_execute.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_execute.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_execute.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_execute.Tpo" "$(DEPDIR)/dapltest1-dapl_execute.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_execute.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_execute.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_connmgt.o: test/dapl_fft_connmgt.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_connmgt.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Tpo" -c -o dapltest1-dapl_fft_connmgt.o `test -f 'test/dapl_fft_connmgt.c' || echo '$(srcdir)/'`test/dapl_fft_connmgt.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_connmgt.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_connmgt.o `test -f 'test/dapl_fft_connmgt.c' || echo '$(srcdir)/'`test/dapl_fft_connmgt.c
+
+dapltest1-dapl_fft_connmgt.obj: test/dapl_fft_connmgt.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_connmgt.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_connmgt.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_connmgt.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_endpoint.o: test/dapl_fft_endpoint.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_endpoint.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Tpo" -c -o dapltest1-dapl_fft_endpoint.o `test -f 'test/dapl_fft_endpoint.c' || echo '$(srcdir)/'`test/dapl_fft_endpoint.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_endpoint.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_endpoint.o `test -f 'test/dapl_fft_endpoint.c' || echo '$(srcdir)/'`test/dapl_fft_endpoint.c
+
+dapltest1-dapl_fft_endpoint.obj: test/dapl_fft_endpoint.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_endpoint.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_endpoint.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_endpoint.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_hwconn.o: test/dapl_fft_hwconn.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_hwconn.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Tpo" -c -o dapltest1-dapl_fft_hwconn.o `test -f 'test/dapl_fft_hwconn.c' || echo '$(srcdir)/'`test/dapl_fft_hwconn.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_hwconn.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_hwconn.o `test -f 'test/dapl_fft_hwconn.c' || echo '$(srcdir)/'`test/dapl_fft_hwconn.c
+
+dapltest1-dapl_fft_hwconn.obj: test/dapl_fft_hwconn.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_hwconn.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_hwconn.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_hwconn.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_mem.o: test/dapl_fft_mem.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_mem.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_mem.Tpo" -c -o dapltest1-dapl_fft_mem.o `test -f 'test/dapl_fft_mem.c' || echo '$(srcdir)/'`test/dapl_fft_mem.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_mem.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_mem.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_mem.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_mem.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_mem.o `test -f 'test/dapl_fft_mem.c' || echo '$(srcdir)/'`test/dapl_fft_mem.c
+
+dapltest1-dapl_fft_mem.obj: test/dapl_fft_mem.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_mem.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_mem.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_mem.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_mem.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_mem.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_mem.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_pz.o: test/dapl_fft_pz.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_pz.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_pz.Tpo" -c -o dapltest1-dapl_fft_pz.o `test -f 'test/dapl_fft_pz.c' || echo '$(srcdir)/'`test/dapl_fft_pz.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_pz.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_pz.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_pz.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_pz.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_pz.o `test -f 'test/dapl_fft_pz.c' || echo '$(srcdir)/'`test/dapl_fft_pz.c
+
+dapltest1-dapl_fft_pz.obj: test/dapl_fft_pz.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_pz.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_pz.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_pz.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_pz.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_pz.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_pz.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_queryinfo.o: test/dapl_fft_queryinfo.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_queryinfo.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Tpo" -c -o dapltest1-dapl_fft_queryinfo.o `test -f 'test/dapl_fft_queryinfo.c' || echo '$(srcdir)/'`test/dapl_fft_queryinfo.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_queryinfo.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_queryinfo.o `test -f 'test/dapl_fft_queryinfo.c' || echo '$(srcdir)/'`test/dapl_fft_queryinfo.c
+
+dapltest1-dapl_fft_queryinfo.obj: test/dapl_fft_queryinfo.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_queryinfo.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_queryinfo.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_queryinfo.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_test.o: test/dapl_fft_test.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_test.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_test.Tpo" -c -o dapltest1-dapl_fft_test.o `test -f 'test/dapl_fft_test.c' || echo '$(srcdir)/'`test/dapl_fft_test.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_test.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_test.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_test.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_test.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_test.o `test -f 'test/dapl_fft_test.c' || echo '$(srcdir)/'`test/dapl_fft_test.c
+
+dapltest1-dapl_fft_test.obj: test/dapl_fft_test.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_test.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_test.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_test.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_test.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_test.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_test.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_fft_util.o: test/dapl_fft_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_util.Tpo" -c -o dapltest1-dapl_fft_util.o `test -f 'test/dapl_fft_util.c' || echo '$(srcdir)/'`test/dapl_fft_util.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_util.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_fft_util.o `test -f 'test/dapl_fft_util.c' || echo '$(srcdir)/'`test/dapl_fft_util.c
+
+dapltest1-dapl_fft_util.obj: test/dapl_fft_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_fft_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_fft_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_fft_util.Tpo" "$(DEPDIR)/dapltest1-dapl_fft_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_fft_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_fft_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_limit.o: test/dapl_limit.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_limit.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_limit.Tpo" -c -o dapltest1-dapl_limit.o `test -f 'test/dapl_limit.c' || echo '$(srcdir)/'`test/dapl_limit.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_limit.Tpo" "$(DEPDIR)/dapltest1-dapl_limit.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_limit.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_limit.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_limit.o `test -f 'test/dapl_limit.c' || echo '$(srcdir)/'`test/dapl_limit.c
+
+dapltest1-dapl_limit.obj: test/dapl_limit.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_limit.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_limit.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_limit.Tpo" "$(DEPDIR)/dapltest1-dapl_limit.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_limit.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_limit.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_memlist.o: test/dapl_memlist.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_memlist.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_memlist.Tpo" -c -o dapltest1-dapl_memlist.o `test -f 'test/dapl_memlist.c' || echo '$(srcdir)/'`test/dapl_memlist.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_memlist.Tpo" "$(DEPDIR)/dapltest1-dapl_memlist.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_memlist.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_memlist.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_memlist.o `test -f 'test/dapl_memlist.c' || echo '$(srcdir)/'`test/dapl_memlist.c
+
+dapltest1-dapl_memlist.obj: test/dapl_memlist.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_memlist.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_memlist.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_memlist.Tpo" "$(DEPDIR)/dapltest1-dapl_memlist.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_memlist.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_memlist.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_performance_client.o: test/dapl_performance_client.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_client.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_client.Tpo" -c -o dapltest1-dapl_performance_client.o `test -f 'test/dapl_performance_client.c' || echo '$(srcdir)/'`test/dapl_performance_client.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_client.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_client.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_client.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_client.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_performance_client.o `test -f 'test/dapl_performance_client.c' || echo '$(srcdir)/'`test/dapl_performance_client.c
+
+dapltest1-dapl_performance_client.obj: test/dapl_performance_client.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_client.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_client.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_client.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_client.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_client.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_client.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_performance_server.o: test/dapl_performance_server.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_server.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_server.Tpo" -c -o dapltest1-dapl_performance_server.o `test -f 'test/dapl_performance_server.c' || echo '$(srcdir)/'`test/dapl_performance_server.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_server.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_server.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_server.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_server.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_performance_server.o `test -f 'test/dapl_performance_server.c' || echo '$(srcdir)/'`test/dapl_performance_server.c
+
+dapltest1-dapl_performance_server.obj: test/dapl_performance_server.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_server.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_server.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_server.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_server.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_server.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_server.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_performance_stats.o: test/dapl_performance_stats.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_stats.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_stats.Tpo" -c -o dapltest1-dapl_performance_stats.o `test -f 'test/dapl_performance_stats.c' || echo '$(srcdir)/'`test/dapl_performance_stats.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_stats.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_stats.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_stats.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_stats.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_performance_stats.o `test -f 'test/dapl_performance_stats.c' || echo '$(srcdir)/'`test/dapl_performance_stats.c
+
+dapltest1-dapl_performance_stats.obj: test/dapl_performance_stats.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_stats.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_stats.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_stats.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_stats.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_stats.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_stats.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_performance_util.o: test/dapl_performance_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_util.Tpo" -c -o dapltest1-dapl_performance_util.o `test -f 'test/dapl_performance_util.c' || echo '$(srcdir)/'`test/dapl_performance_util.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_util.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_performance_util.o `test -f 'test/dapl_performance_util.c' || echo '$(srcdir)/'`test/dapl_performance_util.c
+
+dapltest1-dapl_performance_util.obj: test/dapl_performance_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_util.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_performance_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_quit_util.o: test/dapl_quit_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_quit_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_quit_util.Tpo" -c -o dapltest1-dapl_quit_util.o `test -f 'test/dapl_quit_util.c' || echo '$(srcdir)/'`test/dapl_quit_util.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_quit_util.Tpo" "$(DEPDIR)/dapltest1-dapl_quit_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_quit_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_quit_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_quit_util.o `test -f 'test/dapl_quit_util.c' || echo '$(srcdir)/'`test/dapl_quit_util.c
+
+dapltest1-dapl_quit_util.obj: test/dapl_quit_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_quit_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_quit_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_quit_util.Tpo" "$(DEPDIR)/dapltest1-dapl_quit_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_quit_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_quit_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_server.o: test/dapl_server.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_server.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_server.Tpo" -c -o dapltest1-dapl_server.o `test -f 'test/dapl_server.c' || echo '$(srcdir)/'`test/dapl_server.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_server.Tpo" "$(DEPDIR)/dapltest1-dapl_server.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_server.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_server.o `test -f 'test/dapl_server.c' || echo '$(srcdir)/'`test/dapl_server.c
+
+dapltest1-dapl_server.obj: test/dapl_server.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_server.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_server.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_server.Tpo" "$(DEPDIR)/dapltest1-dapl_server.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_server.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_server_info.o: test/dapl_server_info.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_server_info.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_server_info.Tpo" -c -o dapltest1-dapl_server_info.o `test -f 'test/dapl_server_info.c' || echo '$(srcdir)/'`test/dapl_server_info.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_server_info.Tpo" "$(DEPDIR)/dapltest1-dapl_server_info.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_server_info.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server_info.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_server_info.o `test -f 'test/dapl_server_info.c' || echo '$(srcdir)/'`test/dapl_server_info.c
+
+dapltest1-dapl_server_info.obj: test/dapl_server_info.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_server_info.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_server_info.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_server_info.Tpo" "$(DEPDIR)/dapltest1-dapl_server_info.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_server_info.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_server_info.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_test_data.o: test/dapl_test_data.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_test_data.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_test_data.Tpo" -c -o dapltest1-dapl_test_data.o `test -f 'test/dapl_test_data.c' || echo '$(srcdir)/'`test/dapl_test_data.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_test_data.Tpo" "$(DEPDIR)/dapltest1-dapl_test_data.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_test_data.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_data.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_test_data.o `test -f 'test/dapl_test_data.c' || echo '$(srcdir)/'`test/dapl_test_data.c
+
+dapltest1-dapl_test_data.obj: test/dapl_test_data.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_test_data.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_test_data.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_test_data.Tpo" "$(DEPDIR)/dapltest1-dapl_test_data.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_test_data.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_data.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_test_util.o: test/dapl_test_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_test_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_test_util.Tpo" -c -o dapltest1-dapl_test_util.o `test -f 'test/dapl_test_util.c' || echo '$(srcdir)/'`test/dapl_test_util.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_test_util.Tpo" "$(DEPDIR)/dapltest1-dapl_test_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_test_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_test_util.o `test -f 'test/dapl_test_util.c' || echo '$(srcdir)/'`test/dapl_test_util.c
+
+dapltest1-dapl_test_util.obj: test/dapl_test_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_test_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_test_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_test_util.Tpo" "$(DEPDIR)/dapltest1-dapl_test_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_test_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_test_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_thread.o: test/dapl_thread.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_thread.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_thread.Tpo" -c -o dapltest1-dapl_thread.o `test -f 'test/dapl_thread.c' || echo '$(srcdir)/'`test/dapl_thread.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_thread.Tpo" "$(DEPDIR)/dapltest1-dapl_thread.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_thread.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_thread.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_thread.o `test -f 'test/dapl_thread.c' || echo '$(srcdir)/'`test/dapl_thread.c
+
+dapltest1-dapl_thread.obj: test/dapl_thread.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_thread.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_thread.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_thread.Tpo" "$(DEPDIR)/dapltest1-dapl_thread.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_thread.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_thread.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_transaction_stats.o: test/dapl_transaction_stats.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_stats.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_stats.Tpo" -c -o dapltest1-dapl_transaction_stats.o `test -f 'test/dapl_transaction_stats.c' || echo '$(srcdir)/'`test/dapl_transaction_stats.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_stats.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_stats.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_stats.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_stats.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_transaction_stats.o `test -f 'test/dapl_transaction_stats.c' || echo '$(srcdir)/'`test/dapl_transaction_stats.c
+
+dapltest1-dapl_transaction_stats.obj: test/dapl_transaction_stats.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_stats.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_stats.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_stats.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_stats.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_stats.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_stats.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_transaction_test.o: test/dapl_transaction_test.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_test.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_test.Tpo" -c -o dapltest1-dapl_transaction_test.o `test -f 'test/dapl_transaction_test.c' || echo '$(srcdir)/'`test/dapl_transaction_test.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_test.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_test.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_test.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_test.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_transaction_test.o `test -f 'test/dapl_transaction_test.c' || echo '$(srcdir)/'`test/dapl_transaction_test.c
+
+dapltest1-dapl_transaction_test.obj: test/dapl_transaction_test.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_test.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_test.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_test.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_test.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_test.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_test.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_transaction_util.o: test/dapl_transaction_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_util.Tpo" -c -o dapltest1-dapl_transaction_util.o `test -f 'test/dapl_transaction_util.c' || echo '$(srcdir)/'`test/dapl_transaction_util.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_util.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_transaction_util.o `test -f 'test/dapl_transaction_util.c' || echo '$(srcdir)/'`test/dapl_transaction_util.c
+
+dapltest1-dapl_transaction_util.obj: test/dapl_transaction_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_util.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_transaction_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_util.o: test/dapl_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_util.Tpo" -c -o dapltest1-dapl_util.o `test -f 'test/dapl_util.c' || echo '$(srcdir)/'`test/dapl_util.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_util.Tpo" "$(DEPDIR)/dapltest1-dapl_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_util.o `test -f 'test/dapl_util.c' || echo '$(srcdir)/'`test/dapl_util.c
+
+dapltest1-dapl_util.obj: test/dapl_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_util.Tpo" "$(DEPDIR)/dapltest1-dapl_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test/dapl_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_endian.o: common/dapl_endian.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_endian.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_endian.Tpo" -c -o dapltest1-dapl_endian.o `test -f 'common/dapl_endian.c' || echo '$(srcdir)/'`common/dapl_endian.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_endian.Tpo" "$(DEPDIR)/dapltest1-dapl_endian.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_endian.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_endian.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_endian.o `test -f 'common/dapl_endian.c' || echo '$(srcdir)/'`common/dapl_endian.c
+
+dapltest1-dapl_endian.obj: common/dapl_endian.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_endian.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_endian.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_endian.Tpo" "$(DEPDIR)/dapltest1-dapl_endian.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_endian.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_endian.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_global.o: common/dapl_global.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_global.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_global.Tpo" -c -o dapltest1-dapl_global.o `test -f 'common/dapl_global.c' || echo '$(srcdir)/'`common/dapl_global.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_global.Tpo" "$(DEPDIR)/dapltest1-dapl_global.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_global.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_global.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_global.o `test -f 'common/dapl_global.c' || echo '$(srcdir)/'`common/dapl_global.c
+
+dapltest1-dapl_global.obj: common/dapl_global.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_global.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_global.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_global.Tpo" "$(DEPDIR)/dapltest1-dapl_global.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_global.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_global.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_performance_cmd_util.o: common/dapl_performance_cmd_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_cmd_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_performance_cmd_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_performance_cmd_util.o `test -f 'common/dapl_performance_cmd_util.c' || echo '$(srcdir)/'`common/dapl_performance_cmd_util.c
+
+dapltest1-dapl_performance_cmd_util.obj: common/dapl_performance_cmd_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_performance_cmd_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Tpo" "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_performance_cmd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_performance_cmd_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_quit_cmd_util.o: common/dapl_quit_cmd_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_quit_cmd_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Tpo" "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_quit_cmd_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_quit_cmd_util.o `test -f 'common/dapl_quit_cmd_util.c' || echo '$(srcdir)/'`common/dapl_quit_cmd_util.c
+
+dapltest1-dapl_quit_cmd_util.obj: common/dapl_quit_cmd_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_quit_cmd_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Tpo" "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_quit_cmd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_quit_cmd_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_transaction_cmd_util.o: common/dapl_transaction_cmd_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_cmd_util.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_transaction_cmd_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_transaction_cmd_util.o `test -f 'common/dapl_transaction_cmd_util.c' || echo '$(srcdir)/'`common/dapl_transaction_cmd_util.c
+
+dapltest1-dapl_transaction_cmd_util.obj: common/dapl_transaction_cmd_util.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_transaction_cmd_util.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Tpo" "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_transaction_cmd_util.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='common/dapl_transaction_cmd_util.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-udapl_tdep.o: udapl/udapl_tdep.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-udapl_tdep.o -MD -MP -MF "$(DEPDIR)/dapltest1-udapl_tdep.Tpo" -c -o dapltest1-udapl_tdep.o `test -f 'udapl/udapl_tdep.c' || echo '$(srcdir)/'`udapl/udapl_tdep.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-udapl_tdep.Tpo" "$(DEPDIR)/dapltest1-udapl_tdep.Po"; else rm -f "$(DEPDIR)/dapltest1-udapl_tdep.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='udapl/udapl_tdep.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-udapl_tdep.o `test -f 'udapl/udapl_tdep.c' || echo '$(srcdir)/'`udapl/udapl_tdep.c
+
+dapltest1-udapl_tdep.obj: udapl/udapl_tdep.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-udapl_tdep.obj -MD -MP -MF "$(DEPDIR)/dapltest1-udapl_tdep.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-udapl_tdep.Tpo" "$(DEPDIR)/dapltest1-udapl_tdep.Po"; else rm -f "$(DEPDIR)/dapltest1-udapl_tdep.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='udapl/udapl_tdep.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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`
+
+dapltest1-dapl_mdep_user.o: mdep/linux/dapl_mdep_user.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_mdep_user.o -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_mdep_user.Tpo" -c -o dapltest1-dapl_mdep_user.o `test -f 'mdep/linux/dapl_mdep_user.c' || echo '$(srcdir)/'`mdep/linux/dapl_mdep_user.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dapltest1-dapl_mdep_user.Tpo" "$(DEPDIR)/dapltest1-dapl_mdep_user.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_mdep_user.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mdep/linux/dapl_mdep_user.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-dapl_mdep_user.o `test -f 'mdep/linux/dapl_mdep_user.c' || echo '$(srcdir)/'`mdep/linux/dapl_mdep_user.c
+
+dapltest1-dapl_mdep_user.obj: mdep/linux/dapl_mdep_user.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dapltest1_CFLAGS) $(CFLAGS) -MT dapltest1-dapl_mdep_user.obj -MD -MP -MF "$(DEPDIR)/dapltest1-dapl_mdep_user.Tpo" -c -o dapltest1-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@	then mv -f "$(DEPDIR)/dapltest1-dapl_mdep_user.Tpo" "$(DEPDIR)/dapltest1-dapl_mdep_user.Po"; else rm -f "$(DEPDIR)/dapltest1-dapl_mdep_user.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mdep/linux/dapl_mdep_user.c' object='dapltest1-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) $(dapltest1_CFLAGS) $(CFLAGS) -c -o dapltest1-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
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+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-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/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..9a13c49
--- /dev/null
+++ b/test/dapltest/cmd/dapl_fft_cmd.c
@@ -0,0 +1,354 @@
+/*
+ * 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..ccf9ddf
--- /dev/null
+++ b/test/dapltest/cmd/dapl_getopt.c
@@ -0,0 +1,181 @@
+/*
+ * 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..42c6924
--- /dev/null
+++ b/test/dapltest/cmd/dapl_limit_cmd.c
@@ -0,0 +1,235 @@
+/*
+ * 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..6cfd706
--- /dev/null
+++ b/test/dapltest/cmd/dapl_main.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"
+
+/* 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;
+
+    /* check memory leaking */
+    /*
+     * DT_Mdep_LockInit(&Alloc_Count_Lock); alloc_count = 0;
+     */
+
+#if 0
+#if defined(WIN32)
+    /* Cannot be done from DT_Mdep_Init as dapl_init makes some socket
+     * calls....So need to do this before calling dapl_init */
+    WORD            wv = MAKEWORD (1, 1);
+    WSADATA         wsaData;
+    WSAStartup (wv, &wsaData);
+#endif
+#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 */
+    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 ( 0 );
+}
+
+
+void
+Dapltest_Main_Usage (void)
+{
+    DT_Mdep_printf ("USAGE:\n");
+    DT_Mdep_printf ("USAGE:     dapltest -T <Test_Type> [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 ("NOTE:\tRun as server taking defaults (dapltest -T S)\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..e1600d5
--- /dev/null
+++ b/test/dapltest/cmd/dapl_netaddr.c
@@ -0,0 +1,144 @@
+/*
+ * 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..91efa98
--- /dev/null
+++ b/test/dapltest/cmd/dapl_params.c
@@ -0,0 +1,305 @@
+/*
+ * 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..1d24b90
--- /dev/null
+++ b/test/dapltest/cmd/dapl_performance_cmd.c
@@ -0,0 +1,320 @@
+/*
+ * 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..f9e5add
--- /dev/null
+++ b/test/dapltest/cmd/dapl_qos_util.c
@@ -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.
+ */
+
+#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..c835d89
--- /dev/null
+++ b/test/dapltest/cmd/dapl_quit_cmd.c
@@ -0,0 +1,142 @@
+/*
+ * 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..1ae9ca7
--- /dev/null
+++ b/test/dapltest/cmd/dapl_server_cmd.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_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..892f3a0
--- /dev/null
+++ b/test/dapltest/cmd/dapl_transaction_cmd.c
@@ -0,0 +1,500 @@
+/*
+ * 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..84ff573
--- /dev/null
+++ b/test/dapltest/common/dapl_endian.c
@@ -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.
+ */
+
+#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..4e92106
--- /dev/null
+++ b/test/dapltest/common/dapl_global.c
@@ -0,0 +1,36 @@
+/*
+ * 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..7cb1b88
--- /dev/null
+++ b/test/dapltest/common/dapl_performance_cmd_util.c
@@ -0,0 +1,64 @@
+/*
+ * 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..dad5b64
--- /dev/null
+++ b/test/dapltest/common/dapl_quit_cmd_util.c
@@ -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.
+ */
+
+#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..04981cd
--- /dev/null
+++ b/test/dapltest/common/dapl_transaction_cmd_util.c
@@ -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.
+ */
+
+#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..a5992f2
--- /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"
+
+void
+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..98785eb
--- /dev/null
+++ b/test/dapltest/include/dapl_proto.h
@@ -0,0 +1,669 @@
+/*
+ * 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 <dat/kdat.h>
+#else
+#include <dat/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"
+
+/*
+ * 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 */
+void            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 */
+void            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 */
+void            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,
+					DAT_EVD_HANDLE reqt_evd_hdl,
+					unsigned int num_eps,
+					int op_indx,
+					bool poll);
+
+bool            DT_handle_recv_op (DT_Tdep_Print_Head* phead, 
+					Ep_Context_t * ep_context,
+					DAT_EVD_HANDLE recv_evd_hdl,
+					DAT_EVD_HANDLE reqt_evd_hdl,
+					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,
+					DAT_EVD_HANDLE reqt_evd_hdl,
+					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 */
+void        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 */
+void	    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..bf314c3
--- /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 ) ;
+
+void
+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..3e1a8e7
--- /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;
+
+} 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;
+    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            *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..015e53c
--- /dev/null
+++ b/test/dapltest/mdep/linux/dapl_mdep_user.c
@@ -0,0 +1,605 @@
+/*
+ * 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;
+}
+
+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;
+}
+
+
+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..16170a7
--- /dev/null
+++ b/test/dapltest/mdep/linux/dapl_mdep_user.h
@@ -0,0 +1,188 @@
+/*
+ * 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>
+
+/* inet_ntoa */
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+/* Default Device Name */
+#define DT_MdepDeviceName    "OpenIB-cma"
+
+/* 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
+ */
+
+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
+}
+
+/*
+ * 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..4c3db38
--- /dev/null
+++ b/test/dapltest/test/dapl_bpool.c
@@ -0,0 +1,389 @@
+/*
+ * 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,
+			    &iov,
+			    mflags,
+			    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..a7d1144
--- /dev/null
+++ b/test/dapltest/test/dapl_client.c
@@ -0,0 +1,637 @@
+/*
+ * 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 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
+ */
+void
+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;
+    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;
+    }
+    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))
+    {
+	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);
+	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);
+	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
+	    {
+
+		ret = DT_Tdep_evd_dequeue ( recv_evd_hdl,
+					&event);
+		drained++;
+	    } while (DAT_GET_TYPE(ret) != 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;
+	    }
+	}
+	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);
+	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"))
+    {
+	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");
+	    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);
+	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"))
+    {
+	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"))
+    {
+	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);
+	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);
+	    }
+	    DT_Transaction_Test_Client (pt_ptr,
+				    ia_handle,
+				    server_netaddr);
+	    break;
+	}
+
+    case QUIT_TEST:
+    {
+	DT_Quit_Cmd_PT_Print (phead, Quit_Cmd);
+        break;
+    }
+
+	case PERFORMANCE_TEST:
+	{
+	    if (Performance_Cmd->debug)
+	    {
+		DT_Performance_Cmd_PT_Print (phead, Performance_Cmd);
+	    }
+			
+	    DT_Performance_Test_Client (params_ptr,
+				        pt_ptr,
+				       ia_handle,
+				       server_netaddr);
+	    break;
+	}
+    }
+
+    /*********************************************************************
+     * Done - clean up and go home
+     */
+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.
+	 */
+	ret = dat_ep_disconnect (ep_handle, DAT_CLOSE_ABRUPT_FLAG);
+	if (ret != DAT_SUCCESS)
+	{
+	    DT_Tdep_PT_Printf (phead, 
+		    	    "%s: dat_ep_disconnect (abrupt) error: %s\n",
+			    module,
+			    DT_RetToString (ret));
+	}
+	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
+	{
+	    ret = DT_Tdep_evd_dequeue ( recv_evd_hdl,
+				   &event);
+	} while (ret == DAT_SUCCESS);
+
+	ret = dat_ep_free (ep_handle);
+	if (ret != DAT_SUCCESS)
+	{
+	    DT_Tdep_PT_Printf (phead, 
+		    	     "%s: dat_ep_free error: %s\n",
+			      module, 
+			      DT_RetToString (ret));
+	    /* keep going */
+	}
+    }
+
+    /* Free the 3 EVDs */
+    if (conn_evd_hdl)
+    {
+	ret = DT_Tdep_evd_free (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 going */
+	}
+    }
+    if (reqt_evd_hdl)
+    {
+	ret = DT_Tdep_evd_free (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 going */
+	}
+    }
+    if (recv_evd_hdl)
+    {
+	ret = DT_Tdep_evd_free (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 going */
+	}
+    }
+
+    /* Free the PZ */
+    if (pz_handle)
+    {
+	ret = dat_pz_free (pz_handle);
+	if (ret != DAT_SUCCESS)
+	{
+	    DT_Tdep_PT_Printf (phead, 
+		    	     "%s: dat_pz_free error: %s\n",
+			     module, 
+			     DT_RetToString (ret));
+	    /* keep going */
+	}
+    }
+
+    /* Close the IA */
+    if (ia_handle)
+    {
+	/* dat_ia_close cleans up async evd handle, too */
+	ret = dat_ia_close (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 (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 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);
+}
diff --git a/test/dapltest/test/dapl_client_info.c b/test/dapltest/test/dapl_client_info.c
new file mode 100644
index 0000000..e8db937
--- /dev/null
+++ b/test/dapltest/test/dapl_client_info.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_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..c45f5d6
--- /dev/null
+++ b/test/dapltest/test/dapl_cnxn.c
@@ -0,0 +1,77 @@
+/*
+ * 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..77b61f2
--- /dev/null
+++ b/test/dapltest/test/dapl_execute.c
@@ -0,0 +1,102 @@
+/*
+ * 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"
+
+void
+DT_Execute_Test (Params_t *params_ptr)
+{
+    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;
+	    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;
+	    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;
+	    DT_cs_Limit (params_ptr, 
+		    	 Limit_Cmd);
+	    break;
+	}
+	case PERFORMANCE_TEST:
+	{
+	    Performance_Cmd = &params_ptr->u.Performance_Cmd;
+	    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;
+	    DT_cs_FFT (params_ptr, 
+		       FFT_Cmd);
+	    break;
+	}
+    }
+}
diff --git a/test/dapltest/test/dapl_fft_connmgt.c b/test/dapltest/test/dapl_fft_connmgt.c
new file mode 100644
index 0000000..bdd8b2e
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_connmgt.c
@@ -0,0 +1,126 @@
+/*
+ * 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..9d9bd56
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_endpoint.c
@@ -0,0 +1,296 @@
+/*
+ * 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..6bca300
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_hwconn.c
@@ -0,0 +1,229 @@
+/*
+ * 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..a696dec
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_mem.c
@@ -0,0 +1,253 @@
+/*
+ * 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..3d6aec5
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_pz.c
@@ -0,0 +1,272 @@
+/*
+ * 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..f9e8ad6
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_queryinfo.c
@@ -0,0 +1,664 @@
+/*
+ * 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..05c782a
--- /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"
+
+void
+DT_cs_FFT (Params_t *params_ptr, FFT_Cmd_t * cmd)
+{
+    DT_Tdep_Print_Head *phead;
+
+    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");
+	    break;
+	}
+    }
+}
+
diff --git a/test/dapltest/test/dapl_fft_util.c b/test/dapltest/test/dapl_fft_util.c
new file mode 100644
index 0000000..a09c6f4
--- /dev/null
+++ b/test/dapltest/test/dapl_fft_util.c
@@ -0,0 +1,382 @@
+/*
+ * 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..e308bef
--- /dev/null
+++ b/test/dapltest/test/dapl_limit.c
@@ -0,0 +1,1542 @@
+/*
+ * 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,
+	     void **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;
+    void *old_handles = *old_ptrptr;
+    void *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;
+#   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;
+	void *hptr = DT_Mdep_Malloc (count * sizeof(OneOpen));
+	OneOpen	*hdlptr	= (OneOpen *)hptr;
+
+	/* 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, &hptr, &count, sizeof(*hdlptr)))
+		{
+		    DT_Tdep_PT_Printf (phead, "%s: IAs opened: %d\n", module, w);
+		    retval = true;
+		    break;
+		}
+		hdlptr	= (OneOpen *)hptr;
+		/* 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;
+	void *hptr = DT_Mdep_Malloc (count * sizeof(DAT_PZ_HANDLE));
+	DAT_PZ_HANDLE *hdlptr = (DAT_PZ_HANDLE *)hptr;
+
+	/* 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, &hptr, &count, sizeof(*hdlptr)))
+		{
+		    DT_Tdep_PT_Printf (phead, "%s: PZs created: %d\n", module, w);
+		    retval = true;
+		    break;
+		}
+		hdlptr = (DAT_PZ_HANDLE *)hptr;
+		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;
+	void *hptr = DT_Mdep_Malloc (count * sizeof(DAT_CNO_HANDLE));
+	DAT_CNO_HANDLE *hdlptr = (DAT_CNO_HANDLE *)hptr;
+				    
+	/* 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, &hptr, &count, sizeof (*hdlptr)))
+		{
+		    DT_Tdep_PT_Printf (phead, "%s: CNOs created: %d\n", module, w);
+		    retval = true;
+		    break;
+		}
+		hdlptr = (DAT_CNO_HANDLE *)hptr;
+		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;
+	void *hptr = DT_Mdep_Malloc(count * sizeof(DAT_EVD_HANDLE));
+	DAT_EVD_HANDLE *hdlptr = (DAT_EVD_HANDLE *)hptr;
+				    
+	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, &hptr, &count, sizeof(*hdlptr)))
+		{
+		    DT_Tdep_PT_Printf (phead, "%s: EVDs created: %d\n", module, w);
+		    retval = true;
+		    break;
+		}
+		hdlptr = (DAT_EVD_HANDLE *)hptr;
+		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;
+	void *hptr = DT_Mdep_Malloc(count * sizeof(DAT_EP_HANDLE));
+	DAT_EP_HANDLE *hdlptr = (DAT_EP_HANDLE *)hptr;
+
+	/* 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, &hptr, &count, sizeof(*hdlptr)))
+		{
+		    DT_Tdep_PT_Printf (phead, "%s: EPs created: %d\n", module, w);
+		    retval = true;
+		    break;
+		}
+		hdlptr = (DAT_EP_HANDLE *)hptr;
+		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;
+	void *hptr = DT_Mdep_Malloc(count * sizeof (DAT_RSP_HANDLE));
+	DAT_RSP_HANDLE *hdlptr	= (DAT_RSP_HANDLE *)hptr;
+	void *eptr = DT_Mdep_Malloc(count * sizeof (DAT_EP_HANDLE));			   
+	DAT_EP_HANDLE *epptr = (DAT_EP_HANDLE *)eptr;
+
+	/* 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, &hptr, &count1, sizeof(*hdlptr)))
+		    {
+			DT_Tdep_PT_Printf (phead, "%s: RSPs created: %d\n", module, w);
+			retval = true;
+			break;
+		    }
+		    hdlptr = (DAT_RSP_HANDLE *)hptr;
+		    
+		    if (!more_handles (phead, &eptr, &count2, sizeof(*epptr)))
+		    {
+			DT_Tdep_PT_Printf (phead, "%s: RSPs created: %d\n", module, w);
+			retval = true;
+			break;
+		    }
+		    epptr = (DAT_EP_HANDLE *)eptr;
+		    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;
+	void *hptr = DT_Mdep_Malloc (count * sizeof (DAT_PSP_HANDLE));
+	DAT_PSP_HANDLE *hdlptr	= (DAT_PSP_HANDLE *)hptr;
+
+	/* 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, &hptr, &count, sizeof(*hdlptr)))
+		{
+		    DT_Tdep_PT_Printf (phead, "%s: PSPs created: %d\n", module, w);
+		    retval = true;
+		    break;
+		}
+		hdlptr = (DAT_PSP_HANDLE *)hptr;
+		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;
+	void *hptr = DT_Mdep_Malloc (count * sizeof(Bpool*)); 
+	Bpool **hdlptr = (Bpool **)hptr;
+				    
+	/* 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, &hptr, &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;
+		}
+		hdlptr = (Bpool **)hptr;
+		/*
+		 * 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;
+	void *hptr = 
+		DT_Mdep_Malloc(count * cmd->width * sizeof(DAT_LMR_TRIPLET));
+	DAT_LMR_TRIPLET *hdlptr	= (DAT_LMR_TRIPLET *)hptr;
+
+	/* 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, &hptr, &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;
+		}
+		hdlptr = (DAT_LMR_TRIPLET *)hptr;
+		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
+ */
+void
+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;
+
+error:
+    DT_Tdep_PT_Printf (phead, "error occurs, can not continue with limit test\n");
+    DT_Tdep_PT_Printf (phead, "%s\n", star);
+    return;
+}
+
diff --git a/test/dapltest/test/dapl_memlist.c b/test/dapltest/test/dapl_memlist.c
new file mode 100644
index 0000000..4d00c4c
--- /dev/null
+++ b/test/dapltest/test/dapl_memlist.c
@@ -0,0 +1,140 @@
+/*
+ * 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..815b94d
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_client.c
@@ -0,0 +1,522 @@
+/*
+ * 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
+
+/****************************************************************************/
+void
+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;
+
+    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"));
+}
+
+
+/****************************************************************************/
+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].pad             = 0U;
+	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.pad             = 0U;
+    rmr_triplet.target_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..2b04ff9
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_server.c
@@ -0,0 +1,412 @@
+/*
+ * 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..ce29272
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_stats.c
@@ -0,0 +1,399 @@
+/*
+ * 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 bytes\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..78a638e
--- /dev/null
+++ b/test/dapltest/test/dapl_performance_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"
+
+#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].pad             = 0U;
+	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.pad             = 0U;
+    rmr_triplet.target_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..e0e190d
--- /dev/null
+++ b/test/dapltest/test/dapl_quit_util.c
@@ -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.
+ */
+
+#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..d7c2557
--- /dev/null
+++ b/test/dapltest/test/dapl_server.c
@@ -0,0 +1,886 @@
+/*
+ * 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 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;
+	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; */
+		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..d3df19b
--- /dev/null
+++ b/test/dapltest/test/dapl_server_info.c
@@ -0,0 +1,51 @@
+/*
+ * 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..51f5539
--- /dev/null
+++ b/test/dapltest/test/dapl_test_data.c
@@ -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.
+ */
+
+#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..8f3b261
--- /dev/null
+++ b/test/dapltest/test/dapl_test_util.c
@@ -0,0 +1,714 @@
+/*
+ * 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);
+	    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..c37bc92
--- /dev/null
+++ b/test/dapltest/test/dapl_thread.c
@@ -0,0 +1,134 @@
+/*
+ * 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..3e1f152
--- /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..82ee6f9
--- /dev/null
+++ b/test/dapltest/test/dapl_transaction_test.c
@@ -0,0 +1,2026 @@
+/*
+ * 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
+
+/****************************************************************************/
+void
+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;
+
+    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");
+	    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);
+}
+
+
+/****************************************************************************/
+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;
+    }
+
+    /* 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->recv_evd_hdl);	 /* recv */
+    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->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->reqt_evd_hdl);	 /* request + rmr bind */
+    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->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->creq_evd_hdl);  /* cr */
+	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->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->conn_evd_hdl);	 /* conn */
+    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->conn_evd_hdl = 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);
+
+	/*
+	 * 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->recv_evd_hdl, /* recv     */
+			    test_ptr->reqt_evd_hdl, /* request  */
+			    test_ptr->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->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->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->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->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->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->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->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->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->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->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->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->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->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);
+
+    /* no sync at end of transaction run, wait before cleanup */
+    sleep(1);
+
+    /*
+     * 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->conn_evd_hdl,
+						    &ep_handle))
+		{
+		    DT_Tdep_PT_Printf (phead, "Test[" F64x "]: bad disconnect event\n",
+				    test_ptr->base_port);
+		}
+		else
+		{
+		    /*
+		     * We have successfully obtained a completed EP. We are
+		     * racing with the remote node on disconnects, so we
+		     * don't know which EP this is. Run the list and
+		     * remove it so we don't disconnect a disconnected EP
+		     */
+		    for (j = 0;  j < test_ptr->cmd->eps_per_thread;  j++)
+		    {
+			if ( test_ptr->ep_context[j].ep_handle == ep_handle )
+			{
+			    test_ptr->ep_context[j].ep_handle = NULL;
+			    break;
+			}
+		    }
+                    if (j == test_ptr->cmd->eps_per_thread)
+                    {
+                        /* invalid ep_handle returned */
+                        DT_Tdep_PT_Printf(phead,
+                                          "Test[" F64x "]: disconnect"
+                                          " event with unknown EP=%p "
+                                          " possible duplicate\n",
+                                          test_ptr->base_port,
+                                          ep_handle);
+                        ep_handle = NULL;
+                    }
+
+		}
+	    }
+	    else /* !success - QP may be in error state */
+	    {
+		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->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 */
+		}
+	    }
+	}   /* end foreach per-EP context */
+
+	DT_MemListFree (pt_ptr, test_ptr->ep_context);
+    }
+
+    /* 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 (pt_ptr->local_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_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->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->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->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->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->reqt_evd_hdl,
+					     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->reqt_evd_hdl,
+					     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->reqt_evd_hdl,
+					      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->recv_evd_hdl,
+					      test_ptr->reqt_evd_hdl,
+					      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..d26ca85
--- /dev/null
+++ b/test/dapltest/test/dapl_transaction_util.c
@@ -0,0 +1,804 @@
+/*
+ * 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].pad             = 0U;
+	    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,
+		  DAT_EVD_HANDLE reqt_evd_hdl,
+		  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].pad             = 0U;
+	    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, 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,
+		  DAT_EVD_HANDLE recv_evd_hdl,
+		  DAT_EVD_HANDLE reqt_evd_hdl,
+		  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, 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, 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,
+		  DAT_EVD_HANDLE reqt_evd_hdl,
+		  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].pad             = 0U;
+	    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.pad             = 0U;
+	rmr_triplet.target_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.target_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, 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..8e9929c
--- /dev/null
+++ b/test/dapltest/test/dapl_util.c
@@ -0,0 +1,242 @@
+/*
+ * 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)
+    {
+	return ( (unsigned char *)
+	       (((unsigned long)val + ((unsigned long)align) - 1) & ~ (((unsigned long)align) - 1)));
+    }
+    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..fb1343b
--- /dev/null
+++ b/test/dapltest/udapl/udapl_tdep.c
@@ -0,0 +1,131 @@
+/*
+ * 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 */
+}
+
+void
+DT_Tdep_Execute_Test (Params_t *params_ptr)
+{
+    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,
+			   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..496601c
--- /dev/null
+++ b/test/dtest/Makefile.am
@@ -0,0 +1,5 @@
+bin_PROGRAMS = dtest1
+dtest1_SOURCES = dtest.c
+dtest1_CFLAGS = -g -Wall -D_GNU_SOURCE
+INCLUDES =  -I $(srcdir)/../../dat/include 
+dtest1_LDADD = $(top_builddir)/dat/udat/libdat.la
diff --git a/test/dtest/Makefile.in b/test/dtest/Makefile.in
new file mode 100644
index 0000000..df239a9
--- /dev/null
+++ b/test/dtest/Makefile.in
@@ -0,0 +1,472 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = dtest1$(EXEEXT)
+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 =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_dtest1_OBJECTS = dtest1-dtest.$(OBJEXT)
+dtest1_OBJECTS = $(am_dtest1_OBJECTS)
+dtest1_DEPENDENCIES = $(top_builddir)/dat/udat/libdat.la
+DEFAULT_INCLUDES = -I. -I$(srcdir) -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 --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(dtest1_SOURCES)
+DIST_SOURCES = $(dtest1_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_FALSE = @DEBUG_FALSE@
+DEBUG_TRUE = @DEBUG_TRUE@
+DEFINE_ATTR_LINK_LAYER_FALSE = @DEFINE_ATTR_LINK_LAYER_FALSE@
+DEFINE_ATTR_LINK_LAYER_TRUE = @DEFINE_ATTR_LINK_LAYER_TRUE@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HAVE_LD_VERSION_SCRIPT_FALSE = @HAVE_LD_VERSION_SCRIPT_FALSE@
+HAVE_LD_VERSION_SCRIPT_TRUE = @HAVE_LD_VERSION_SCRIPT_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OS_RHEL4_FALSE = @OS_RHEL4_FALSE@
+OS_RHEL4_TRUE = @OS_RHEL4_TRUE@
+OS_RHEL5_FALSE = @OS_RHEL5_FALSE@
+OS_RHEL5_TRUE = @OS_RHEL5_TRUE@
+OS_SUSE11_FALSE = @OS_SUSE11_FALSE@
+OS_SUSE11_TRUE = @OS_SUSE11_TRUE@
+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@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+dtest1_SOURCES = dtest.c
+dtest1_CFLAGS = -g -Wall -D_GNU_SOURCE
+INCLUDES = -I $(srcdir)/../../dat/include 
+dtest1_LDADD = $(top_builddir)/dat/udat/libdat.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 \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  test/dtest/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  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) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+dtest1$(EXEEXT): $(dtest1_OBJECTS) $(dtest1_DEPENDENCIES) 
+	@rm -f dtest1$(EXEEXT)
+	$(LINK) $(dtest1_LDFLAGS) $(dtest1_OBJECTS) $(dtest1_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dtest1-dtest.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ 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 $@ $<
+
+dtest1-dtest.o: dtest.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtest1_CFLAGS) $(CFLAGS) -MT dtest1-dtest.o -MD -MP -MF "$(DEPDIR)/dtest1-dtest.Tpo" -c -o dtest1-dtest.o `test -f 'dtest.c' || echo '$(srcdir)/'`dtest.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dtest1-dtest.Tpo" "$(DEPDIR)/dtest1-dtest.Po"; else rm -f "$(DEPDIR)/dtest1-dtest.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dtest.c' object='dtest1-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) $(dtest1_CFLAGS) $(CFLAGS) -c -o dtest1-dtest.o `test -f 'dtest.c' || echo '$(srcdir)/'`dtest.c
+
+dtest1-dtest.obj: dtest.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dtest1_CFLAGS) $(CFLAGS) -MT dtest1-dtest.obj -MD -MP -MF "$(DEPDIR)/dtest1-dtest.Tpo" -c -o dtest1-dtest.obj `if test -f 'dtest.c'; then $(CYGPATH_W) 'dtest.c'; else $(CYGPATH_W) '$(srcdir)/dtest.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/dtest1-dtest.Tpo" "$(DEPDIR)/dtest1-dtest.Po"; else rm -f "$(DEPDIR)/dtest1-dtest.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dtest.c' object='dtest1-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) $(dtest1_CFLAGS) $(CFLAGS) -c -o dtest1-dtest.obj `if test -f 'dtest.c'; then $(CYGPATH_W) 'dtest.c'; else $(CYGPATH_W) '$(srcdir)/dtest.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+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-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/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..0255a90
--- /dev/null
+++ b/test/dtest/dtest.c
@@ -0,0 +1,1826 @@
+/*
+ * Copyright (c) 2005 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>
+#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>
+
+#ifndef DAPL_PROVIDER
+#define DAPL_PROVIDER "OpenIB-cma"
+#endif
+
+#define F64x "%"PRIx64""
+#define MAX_POLLING_CNT 50000
+#define MAX_RDMA_RD    4
+#define MAX_PROCS      1000
+
+/* Header files needed for DAT/uDAPL */
+#include    "dat/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    (1000*1000*20)
+#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;
+static DAT_EP_PARAM       ep_param;
+char                      hostname[256] = {0};
+char                      provider[256] = 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 {
+    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;
+} time;
+
+/* defaults */
+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();
+double     get_time();
+void       init_data();
+
+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, int 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(_format, _aa...) \
+       if (verbose)               \
+           printf(_format, ##_aa)
+int
+main(int argc, char **argv)
+{
+       int i,c;
+       DAT_RETURN  ret;
+
+       /* parse arguments */
+       while ((c = getopt(argc, argv, "scvpb:d:B:h:P:")) != -1)
+       {
+               switch(c)
+               {
+                       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 (!server) {
+               printf("%d Running as client - %s\n",getpid(),provider); fflush(stdout);
+       } else {
+               printf("%d Running as server - %s\n",getpid(),provider); fflush(stdout);
+       }
+
+       /* allocate send and receive buffers */
+       if (((rbuf = malloc(buf_len*burst)) == NULL) ||
+           ((sbuf = malloc(buf_len*burst)) == NULL)) {
+               perror("malloc");
+               exit(1);
+       }
+       memset( &time, 0, sizeof(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 creating events: %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);
+
+       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);
+       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);
+       fflush(stdout);
+
+       /*********** 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());
+
+cleanup:
+       /* 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));
+               exit(1);
+       } else
+               LOGPRINTF("%d Closed Interface Adaptor\n",getpid());
+
+        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 );
+
+       /* free rdma buffers */
+       free(rbuf);
+       free(sbuf);
+       return(0);
+}
+
+
+double get_time()
+{
+       struct timeval tp;
+
+       gettimeofday(&tp, NULL);
+       return ((double) tp.tv_sec + (double) tp.tv_usec * 1e-6);
+}
+
+void init_data()
+{
+       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;
+    iov.pad             = 0;
+    iov.virtual_address = (DAT_VADDR)(unsigned long)data;
+    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 "F64x" 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, int 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;
+
+     /* 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,
+                           &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,
+                           &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;
+       l_iov.pad             = 0;
+       l_iov.virtual_address = (DAT_VADDR)(unsigned long)&rmr_recv_msg[ i ];
+       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..\n", getpid());
+       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 );
+       }
+
+       if (delay) sleep(delay); /* use to test rdma_cma timeout logic */
+
+        /* 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());
+       ret = dat_cr_accept( h_cr, h_ep, 0, (DAT_PVOID)0 );
+        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;
+
+       if (getaddrinfo (hostname, NULL, NULL, &target) != 0) {
+           printf("\n remote name resolution failed!\n");
+           exit ( 1 );
+       }
+
+       printf ("%d Server Name: %s \n", getpid(), hostname);
+       printf ("%d Server Net Address: %s\n", getpid(),
+           inet_ntoa(((struct sockaddr_in *)target->ai_addr)->sin_addr));
+
+       remote_addr = *((DAT_IA_ADDRESS_PTR)target->ai_addr);
+       freeaddrinfo(target);
+
+       LOGPRINTF("%d Connecting to server\n",getpid());
+       ret = dat_ep_connect(   h_ep,
+                               &remote_addr,
+                               conn_id,
+                               CONN_TIMEOUT,
+                               0,
+                               (DAT_PVOID)0,
+                               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());
+
+    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 );
+    }
+    printf("\n%d CONNECTED!\n\n",getpid());
+    connected = 1;
+
+    /*
+     *  Setup our remote memory and tell the other side about it
+     */
+    rmr_send_msg.rmr_context    = rmr_context_recv;
+    rmr_send_msg.pad            = 0;
+    rmr_send_msg.target_address = (DAT_VADDR)(unsigned long)rbuf;
+    rmr_send_msg.segment_length = RDMA_BUFFER_SIZE;
+
+    printf("%d Send RMR to remote: snd_msg: r_key_ctx=%x,pad=%x, "
+	   "va="F64x",len="F64x"\n",
+           getpid(), rmr_send_msg.rmr_context, rmr_send_msg.pad,
+           rmr_send_msg.target_address, rmr_send_msg.segment_length );
+
+    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 );
+    }
+
+    r_iov = rmr_recv_msg[ recv_msg_index ];
+
+    printf("%d Received RMR from remote: r_iov: r_key_ctx=%x,pad=%x "
+	   ",va="F64x",len="F64x"\n",
+           getpid(), r_iov.rmr_context, r_iov.pad,
+           r_iov.target_address, r_iov.segment_length );
+
+    recv_msg_index++;
+
+    return ( DAT_SUCCESS );
+}
+
+
+void
+disconnect_ep()
+{
+    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 exit then.
+        */
+       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());
+           }
+       }
+
+    	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( )
+{
+       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].pad             = 0;
+	   l_iov[i].segment_length  = buf_len/MSG_IOV_COUNT;
+	   l_iov[i].virtual_address = (DAT_VADDR)(unsigned long)
+					(&sbuf[l_iov[i].segment_length*i]);
+
+	   LOGPRINTF("%d rdma_write iov[%d] buf=%p,len="F64x"\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
+        */
+       rmr_send_msg.rmr_context    = rmr_context_recv;
+       rmr_send_msg.pad            = 0;
+       rmr_send_msg.target_address = (DAT_VADDR)(unsigned long)rbuf;
+       rmr_send_msg.segment_length = RDMA_BUFFER_SIZE;
+
+       printf("%d Sending 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
+        */
+       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 );
+       }
+
+       r_iov = rmr_recv_msg[ recv_msg_index ];
+
+       printf("%d Received RMR from remote: r_iov: ctx=%x,pad=%x,va=%p,len="F64x"\n",
+                   getpid(), r_iov.rmr_context,
+            r_iov.pad,
+            (void*)(unsigned long)r_iov.target_address,
+                   r_iov.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( )
+{
+       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.pad             = 0;
+       l_iov.virtual_address = (DAT_VADDR)(unsigned long)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(),
+			(int)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 2nd time to indicate completion
+        */
+       rmr_send_msg.rmr_context    = rmr_context_recv;
+       rmr_send_msg.pad            = 0;
+       rmr_send_msg.target_address = (DAT_VADDR)(unsigned long)rbuf;
+       rmr_send_msg.segment_length = RDMA_BUFFER_SIZE;
+
+       printf("%d Sending 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 );
+       }
+
+       r_iov = rmr_recv_msg[ recv_msg_index ];
+
+       printf("%d Received RMR from remote: r_iov: ctx=%x,pad=%x,va=%p,len="F64x"\n",
+               getpid(), r_iov.rmr_context, r_iov.pad,
+               (void*)(unsigned long)r_iov.target_address, r_iov.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.pad             = 0;
+       l_iov.virtual_address = (DAT_VADDR)(unsigned long)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;
+    }
+    sleep(1);
+
+    /* 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,
+               buf_len, 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,
+                           h_pz,
+                           DAT_MEM_PRIV_ALL_FLAG,
+                           &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 recv 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,
+                           h_pz,
+                           DAT_MEM_PRIV_ALL_FLAG,
+                           &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;
+
+    /* create CNO */
+    if (use_cno) {
+        start = get_time();
+        ret = dat_cno_create( h_ia, DAT_OS_WAIT_PROXY_AGENT_NULL, &h_dto_cno  );
+        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,
+                         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 );
+    }
+
+    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()
+{
+    printf("\n DAPL USAGE \n\n");
+    printf("s: server\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\n");
+    printf("P: provider (default=OpenIB-cma)\n");
+    printf("\n");
+}
+

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



More information about the Pkg-ofed-commits mailing list